예제 #1
0
 //复选框 系部 被点击
 private void checkBox1_MouseClick(object sender, MouseEventArgs e)
 {
     radioButton1.Checked = false;
     //控制下拉菜单的隐藏显示
     if (checkBox1.Checked)
     {
         comboBox2.Visible = true;
         //给系部添加数据
         addCombo(SQLTools.getMenu(0), comboBox2);
     }
     else
     {
         comboBox2.Visible = false;
     }
 }
예제 #2
0
 //复选框 专业 被点击
 private void checkBox2_MouseClick(object sender, MouseEventArgs e)
 {
     radioButton1.Checked = false;
     if (checkBox2.Checked)
     {
         comboBox3.Visible = true;
     }
     else
     {
         comboBox3.Visible = false;
     }
     //判断系部是否被选择,不被选择添加所有数据
     if (!checkBox1.Checked)
     {
         addCombo(SQLTools.getMenu(1), comboBox3);
     }
 }
예제 #3
0
 //系部被下拉选择
 private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
 {
     //给专业设置相应数据  形成联动
     addCombo(SQLTools.getMenu(comboBox2.SelectedItem.ToString()), comboBox3);
 }