Пример #1
0
 /// <summary>
 /// 设置奖惩等级comboBox
 /// 并根据奖惩等级查询
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TypecomboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     LevelcomboBox.ResetText();   // 重设text
     LevelcomboBox.Items.Clear(); // 清空表单
     LevelcomboBox.Enabled = true;
     if (TypecomboBox.SelectedIndex == 0)
     {
         LevelcomboBox.Items.Add("国家级");
         LevelcomboBox.Items.Add("省级");
         LevelcomboBox.Items.Add("市级");
         LevelcomboBox.Items.Add("校级");
         LevelcomboBox.Items.Add("院级");
         LevelcomboBox.Items.Add("年级");
     }
     else
     {
         LevelcomboBox.Items.Add("留校查看");
         LevelcomboBox.Items.Add("记过");
         LevelcomboBox.Items.Add("严重警告");
         LevelcomboBox.Items.Add("警告");
         LevelcomboBox.Items.Add("学校通报批评");
         LevelcomboBox.Items.Add("学院通报批评");
         LevelcomboBox.Items.Add("年级通报批评");
     }
     dataTable = rpBLL.Find_RPInfoByRPType(typeISdictionary[TypecomboBox.SelectedIndex]);
     QueryRPForm_Load(sender, e);
 }
Пример #2
0
        /// <summary>
        /// 根据学号查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void QueryRPbutton_Click(object sender, EventArgs e)
        {
            string stunum = StuNumtextBox.Text.Trim();

            if (stunum.Length != 0)
            {
                dataTable = rpBLL.Find_RPInfoByStuNum(stunum);
            }
            else
            {
                dataTable = rpBLL.Find_AllRPInfo();
            }
            TypecomboBox.ResetText();
            TypecomboBox.Items.Clear();
            LevelcomboBox.ResetText();   // 重设text
            LevelcomboBox.Items.Clear(); // 清空表单
            QueryRPForm_Load(sender, e);
        }