Exemplo n.º 1
0
        private void frmStudentView_Load(object sender, EventArgs e)
        {
            operate.getImage(stuID, pictureBox1);
            stuIDValue.Text = stuID;
            DataSet ds = operate.getTable("select * from stuInfo where stuID='" + stuID + "'");

            ds.Dispose();
            stuNameValue.Text      = ds.Tables[0].Rows[0][1].ToString();
            stuFmrNameValue.Text   = ds.Tables[0].Rows[0][3].ToString();
            stuSexValue.Text       = ds.Tables[0].Rows[0][4].ToString();
            stuBirthValue.Text     = ds.Tables[0].Rows[0][5].ToString();
            stuNationValue.Text    = ds.Tables[0].Rows[0][6].ToString();
            stuPoliValue.Text      = ds.Tables[0].Rows[0][7].ToString();
            stuResValue.Text       = ds.Tables[0].Rows[0][8].ToString();
            stuIDCValue.Text       = ds.Tables[0].Rows[0][9].ToString();
            stuWorkPlaceValue.Text = ds.Tables[0].Rows[0][10].ToString();
            stuPCValue.Text        = ds.Tables[0].Rows[0][11].ToString();
            stuWorkTelValue.Text   = ds.Tables[0].Rows[0][12].ToString();
            stuAddValue.Text       = ds.Tables[0].Rows[0][13].ToString();
            stuTelValue.Text       = ds.Tables[0].Rows[0][14].ToString();
            stuExpValue.Text       = ds.Tables[0].Rows[0][15].ToString();
            stuPrzCrtValue.Text    = ds.Tables[0].Rows[0][16].ToString();
            if (isTeacher == true)
            {
                button1.Visible = true;
            }
            else
            {
                button1.Visible = false;
            }
        }
Exemplo n.º 2
0
        private void frmStudent_Load(object sender, EventArgs e)
        {
            operate.getImage(stuID, pictureBox1);
            stuIDValue.Text = stuID;
            DataSet ds = operate.getTable("select * from stuInfo where stuID='" + stuID + "'");

            ds.Dispose();
            stuNameValue.Text      = ds.Tables[0].Rows[0][1].ToString();
            stuFmrNameValue.Text   = ds.Tables[0].Rows[0][3].ToString();
            stuSexValue.Text       = ds.Tables[0].Rows[0][4].ToString();
            stuBirthValue.Text     = ds.Tables[0].Rows[0][5].ToString();
            stuNationValue.Text    = ds.Tables[0].Rows[0][6].ToString();
            stuPoliValue.Text      = ds.Tables[0].Rows[0][7].ToString();
            stuResValue.Text       = ds.Tables[0].Rows[0][8].ToString();
            stuIDCValue.Text       = ds.Tables[0].Rows[0][9].ToString();
            stuWorkPlaceValue.Text = ds.Tables[0].Rows[0][10].ToString();
            stuPCValue.Text        = ds.Tables[0].Rows[0][11].ToString();
            stuWorkTelValue.Text   = ds.Tables[0].Rows[0][12].ToString();
            stuAddValue.Text       = ds.Tables[0].Rows[0][13].ToString();
            stuTelValue.Text       = ds.Tables[0].Rows[0][14].ToString();
            stuExpValue.Text       = ds.Tables[0].Rows[0][15].ToString();
            stuPrzCrtValue.Text    = ds.Tables[0].Rows[0][16].ToString();
            string dgvs = "select id as '编号',reqType as '申请类型',reqDate as '申请日期',reqResult as '申请结果',conDate as '申核日期' from requestInfo where reqPeople='" + stuNameValue.Text + "'";

            operate.bindDataGridView(dataGridView1, dgvs);
            dgvs = "select corID as '企业编号',corName as '企业名',corTel as '企业电话',corAdd as '企业地址' from corInfo";
            operate.bindDataGridView(dataGridView2, dgvs);
            label3.Text = ds.Tables[0].Rows[0][2].ToString();
        }