private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e) { try { if (dataGridView1.CurrentCell.RowIndex > -1) { textBox1.Text = Grid_Inof(dataGridView1); //显示职工信息表的当前记录 MyMC.Ena_Button(N_First, N_Previous, N_Next, N_Cauda, 1, 1, 1, 1); //使窗体中的编辑按钮可用 //获取工作简历表中的信息 DataSet WDset = MyDataClass.getDataSet("select Sut_ID,ID,BeginDate as 开始时间,EndDate as 结束时间, Branch as 部门, Business as 职务, WordUnit as 工作单位 from tb_WordResume where Sut_ID='" + tem_ID + "'", "tb_WordResume"); MyMC.Correlation_Table(WDset, dataGridView2); //将WDset存储的信息显示在dataGridView2控件中 if (WDset.Tables[0].Rows.Count < 1) //当WDset中没有信息时 //清空相应的控件 { MyMC.Clear_Grids(WDset.Tables[0].Columns.Count, groupBox7.Controls, "Word_"); } //获取家庭关系表中的信息 DataSet FDset = MyDataClass.getDataSet("select Sut_ID,ID,LeaguerName as 家庭成员名称,Nexus as 与本人的关系, BirthDate as 出生日期, WordUnit as 工作单位, Business as 职务, Visage as 政治面貌, Phone as 电话 from tb_Family where Sut_ID='" + tem_ID + "'", "tb_Family"); MyMC.Correlation_Table(FDset, dataGridView3); if (FDset.Tables[0].Rows.Count < 1) { MyMC.Clear_Grids(FDset.Tables[0].Columns.Count, groupBox10.Controls, "Famity_"); } //获取工作简历表中的信息 DataSet TDset = MyDataClass.getDataSet("select Sut_ID,ID,TrainFashion as 培训方式,BeginDate as 培训开始时间, EndDate as 培训结束时间, Speciality as 培训专业, TrainUnit as 培训单位, KulturMemo as 培训内容, Charge as 费用, Effect as 效果 from tb_TrainNote where Sut_ID='" + tem_ID + "'", "tb_TrainNote"); MyMC.Correlation_Table(TDset, dataGridView4); if (TDset.Tables[0].Rows.Count < 1) { MyMC.Clear_Grids(TDset.Tables[0].Columns.Count, groupBox12.Controls, "TrainNote_"); } //获取奖惩记录表中的信息 DataSet RDset = MyDataClass.getDataSet("select Sut_ID,ID,RPKind as 奖惩种类,RPDate as 奖惩时间, SealMan as 批准人, QuashDate as 撤消时间, QuashWhys as 撤消原因 from tb_RANDP where Sut_ID='" + tem_ID + "'", "tb_RANDP"); MyMC.Correlation_Table(RDset, dataGridView5); if (RDset.Tables[0].Rows.Count < 1) { MyMC.Clear_Grids(RDset.Tables[0].Columns.Count, groupBox14.Controls, "RANDP_"); } //获取个人简历表中的信息 SqlDataReader Read_Memo = MyDataClass.getcom("Select * from tb_Individual where ID='" + tem_ID + "'"); if (Read_Memo.Read()) { Ind_Mome.Text = Read_Memo[1].ToString(); } else { Ind_Mome.Clear(); } //MyMC.Show_DGrid(dataGridView2, groupBox7.Controls, "Word_"); } } catch { } }
private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e) { try { if (dataGridView1.CurrentCell.RowIndex > -1) { textBox1.Text = Grid_Inof(dataGridView1); //显示商标信息表的当前记录 MyMC.Ena_Button(N_First, N_Previous, N_Next, N_Cauda, 1, 1, 1, 1); //使窗体中的编辑按钮可用 //获取商标拜访表中的信息 DataSet WDset = MyDataClass.getDataSet("select TM_ID,ID,拜访人姓名,所在部门, 拜访日期,拜访对象,拜访地点,拜访成果,备注 from tb_商标拜访 where TM_ID='" + tem_ID + "'", "tb_商标拜访"); MyMC.Correlation_Table(WDset, dataGridView2); //将WDset存储的信息显示在dataGridView2控件中 if (WDset.Tables[0].Rows.Count < 1) //当WDset中没有信息时 //清空相应的控件 { MyMC.Clear_Grids(WDset.Tables[0].Columns.Count, groupBox14.Controls, "B_"); } //获取商标接待表中的信息 DataSet FDset = MyDataClass.getDataSet("select TM_ID,ID,接待人姓名,所在部门, 接待日期,接待对象,接待地点,接待成果,备注 from tb_商标接待 where TM_ID='" + tem_ID + "'", "tb_商标接待"); MyMC.Correlation_Table(FDset, dataGridView3); if (FDset.Tables[0].Rows.Count < 1) { MyMC.Clear_Grids(FDset.Tables[0].Columns.Count, groupBox6.Controls, "C_"); } //获取心得体会表中的信息 SqlDataReader Read_Memo = MyDataClass.getcom("Select * from tb_商标心得体会 where ID='" + tem_ID + "'"); if (Read_Memo.Read()) { Ind_Mome.Text = Read_Memo[1].ToString(); } else { Ind_Mome.Clear(); } //MyMC.Show_DGrid(dataGridView2, groupBox7.Controls, "Word_"); } this.toolStripProgressBar1.Minimum = 0; this.toolStripProgressBar1.Maximum = 1; this.toolStripProgressBar1.Step = 10; for (int i = 0; i <= 1; i++) { this.toolStripProgressBar1.PerformStep(); } } catch { } }