private void btReceptionistLogin_Click(object sender, EventArgs e) { string caption = "输入提示"; //用户名或密码都不为空 if (CheckInput()) { //检索用户名密码都存在 string message = string.Empty; if (CheckUser(ref message)) { Member member = new Member(); member.MemberId = this.txtReceptionistID.Text.Trim(); member.MemberPwd = this.txtReceptionistPwd.Text.Trim(); receptionist.MemberId = txtReceptionistID.Text; receptionist.MemberPwd = txtReceptionistPwd.Text; //通过账号密码是否为空,账号密码是否能在数据库中找到,是之通过验证,打开前台的管理界面 ReceptionistMainform rm = new ReceptionistMainform(); rm.rl = this; this.Hide();//隐藏登陆窗体 rm.ShowDialog(); this.Close(); } else { MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }
private void btReceptionistLogin_Click(object sender, EventArgs e) { string caption = "输入提示"; //用户名或密码都不为空 if (CheckInput()) { //检索用户名密码都存在 string message = string.Empty; if (CheckUser(ref message)) { Member member = new Member(); member.MemberId =this.txtReceptionistID .Text.Trim(); member.MemberPwd =this.txtReceptionistPwd .Text.Trim(); receptionist.MemberId = txtReceptionistID.Text; receptionist.MemberPwd = txtReceptionistPwd.Text; //通过账号密码是否为空,账号密码是否能在数据库中找到,是之通过验证,打开前台的管理界面 ReceptionistMainform rm = new ReceptionistMainform(); rm.rl = this; this.Hide();//隐藏登陆窗体 rm.ShowDialog(); this.Close(); } else { MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }