C# 登录跳转
2020-12-13 15:19
标签:io ar os for sp on art log bs private void Main_Load(object sender, EventArgs e) { private void tolNewStudent_Click(object sender, EventArgs e) { private void tolNewTeacher_Click(object sender, EventArgs e) { C# 登录跳转 标签:io ar os for sp on art log bs 原文地址:http://www.cnblogs.com/yuchen352416/p/4074853.html
this.Hide(); // 隐藏自己
new FormLogin(this).Show(); // 打开登录窗体
}
NewStudent ns = new NewStudent();
ns.MdiParent = this;
ns.StartPosition = FormStartPosition.CenterScreen;
ns.Show();
}
NewTeacher nt = new NewTeacher();
nt.MdiParent = this;
nt.StartPosition = FormStartPosition.CenterScreen;
nt.Show();
}
private void btnSubmit_Click(object sender, EventArgs e) {
u = new User(this.txtUserName.Text,this.txtPassWord.Text,this.cboUserType.Text);
if ("admin" == u.UserName && "admin" == u.PassWord) {
if (!("" == u.UserType)) {
flage = 1;
this.Close();
fForm.Show();
fForm.WindowState = FormWindowState.Maximized;
} else {
MessageBox.Show("请选择登录类型","类型提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
} else {
MessageBox.Show("用户名或密码不正确","登录失败",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
}