Ejemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            教师 a = new 教师(uid);//新窗体弹窗,旧的隐藏

            this.Hide();
            a.ShowDialog();
            this.Show();
        }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     MODEL.Teacher teacher = new MODEL.Teacher()
     {
         UserId   = this.textBox1.Text.Trim(),
         Password = this.textBox2.Text.Trim()
     };
     MODEL.Teacher teacherLogin = teacherLogic.UserLogin(teacher);
     if (teacherLogin == null)
     {
         MessageBox.Show("账号或密码错误,请重新输入");
         return;
     }
     else
     {
         this.DialogResult = DialogResult.OK;
         //MessageBox.Show("登陆成功");
         this.uid = teacher.UserId;
         教师 a = new 教师(uid);//新窗体弹窗,旧的隐藏
         this.Hide();
         a.ShowDialog();
         this.Show();
     }
 }