예제 #1
0
 /// <summary>
 /// Tab选择时显示dataGridView
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (tabControl1.SelectedTab.Name == "StuPertabPage")
     {
         PergroupBox.Enabled           = true;
         FamgroupBox.Enabled           = false;
         SchgroupBox.Enabled           = false;
         StuPerdataGridView.DataSource = stuBaseInfoBLL.Find_PerStuInfo();
     }
     else if (tabControl1.SelectedTab.Name == "StuFamtabPage")
     {
         PergroupBox.Enabled           = false;
         FamgroupBox.Enabled           = true;
         SchgroupBox.Enabled           = false;
         StuFamdataGridView.DataSource = stuBaseInfoBLL.Find_FamStuInfo();
     }
     else if (tabControl1.SelectedTab.Name == "StuSchtabPage")
     {
         PergroupBox.Enabled           = false;
         FamgroupBox.Enabled           = false;
         SchgroupBox.Enabled           = true;
         StuSchdataGridView.DataSource = stuBaseInfoBLL.Find_SchStuInfo();
     }
     else
     {
         PergroupBox.Enabled           = true;
         FamgroupBox.Enabled           = true;
         SchgroupBox.Enabled           = true;
         StuAlldataGridView.DataSource = stuBaseInfoBLL.Find_ALLStuInformation();
     }
 }