Exemplo n.º 1
0
        //根据学号查询信息
        private void btnSearch1_Click(object sender, EventArgs e)
        {
            if (this.txtStudentNumber.Text.Trim().Length == 0)
            {
                MessageBox.Show("请输入要查询的学号!", "信息提示");
                this.txtStudentNumber.Focus();
                return;
            }
            //根据学号查询学院对象
            Student objStudent = objStudentService.GetStudent(this.txtStudentNumber.Text.Trim());

            if (objStudent == null)
            {
                MessageBox.Show("您输入的学号不正确,未找到该学生信息", "信息提示");
                this.txtStudentNumber.Focus();
                this.txtStudentNumber.SelectAll();
                return;
            }
            else
            {
                //创建学生信息展示窗体
                FrmStudentSearch objStudentSearchFrom = new FrmStudentSearch(objStudent);
                objStudentSearchFrom.Show();
            }
        }
Exemplo n.º 2
0
        //查找学生信息
        private void ToolStripMenuItemStuSearch_Click(object sender, EventArgs e)
        {
            FrmStudentSearch add = new FrmStudentSearch();

            add.Show(dockPanel1);
        }