CSDN博客

img shishn

更新学生基本信息的学号

发表于2004/12/29 15:25:00  556人阅读

private void Button1_Click(object sender, System.EventArgs e)
  {
   string professionway=this.DropDownList1.SelectedValue.Trim().ToString();
   int i,j,k;
//   System.DateTime datetime=DateTime.Parse("8/6/1986");
   DataSet dspro=teachingres.getProfessionWay(professionway,"","");
   int pronum=dspro.Tables[0].Rows.Count;
   for(i=0;i<pronum;i++)
   {
    string pro=dspro.Tables[0].Rows[i].ItemArray[0].ToString();
    string newstudentsn=pro.Trim()+"000";
       DataSet dsclass=teachingres.getClass(pro);
       int classnum=dsclass.Tables[0].Rows.Count;
    for(j=0;j<classnum;j++)
    {
     string classno=dsclass.Tables[0].Rows[j].ItemArray[0].ToString();
     DataSet dsstudent=studentinfo.findStudent("",classno,"","");
     int studentno=dsstudent.Tables[0].Rows.Count;
     for(k=0;k<studentno;k++)
     {
      int sn=Int32.Parse(newstudentsn)+1;
      newstudentsn=sn.ToString();
//      studentinfo.updataStudent(newstudent,)
      string studentsn=dsstudent.Tables[0].Rows[k].ItemArray[0].ToString();
      studentinfo.updataStudent(studentsn,newstudentsn,"","","","","","","","","","","","","","","","","","");
     }
    }
      }
阅读全文
0 0

相关文章推荐

img
取 消
img