private void button1_Click(object sender, EventArgs e) { Model.Student student = new Model.Student() { StuId = this.textBox1.Text.Trim(), StuPsd = this.textBox2.Text.Trim() }; Model.Student studentLogin = studentLogic.UserLogin(student); if (studentLogin == null) { MessageBox.Show("账号或密码错误,请重新输入"); return; } else { this.DialogResult = DialogResult.OK; //MessageBox.Show("登陆成功"); this.uid = student.StuId; 学生 a = new 学生(this.uid);//新窗体弹窗,旧的隐藏 this.Hide(); a.ShowDialog(); this.Show(); } }
private void button4_Click(object sender, EventArgs e) { 学生 a = new 学生(uid);//新窗体弹窗,旧的隐藏 this.Hide(); a.ShowDialog(); this.Show(); }