private void textBox1_TextChanged(object sender, EventArgs e) { if (usermodel.StaffID > 0) { var passcheck = StaffModel.Decrypt(usermodel.Password); var passinput = textBox1.Text; SetImgLogin(passinput); if (passinput.Count() == 4) { if (passinput == passcheck) { if (CheckCallform == 0) { UserLoginModel.UserLoginInfo = usermodel; frmMain frm = new frmMain(); frm.ShowDialog(); this.Close(); } else { this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); } } else { var passshow = textBox1.Text; if (passshow.Count() > 0) { this.lblMessger.Visible = true; //frmMessager frm = new frmMessager("Messenger", "Pin code isn't correct."); //frm.ShowDialog(); textBox1.Text = ""; } } } } else { var passshow = textBox1.Text; if (passshow.Count() > 0) { frmMessager frm = new frmMessager("Messenger", "Please chose user name"); frmOpacity.ShowDialog(this, frm); textBox1.Text = ""; } } }
private void button9_Click(object sender, EventArgs e) { frmMain frm = new frmMain(); frm.ShowDialog(); }
private void textBox1_TextChanged(object sender, EventArgs e) { if (usermodel.StaffID > 0) { var passcheck = StaffModel.Decrypt(usermodel.Password); var passinput = textBox1.Text; SetImgLogin(passinput); if (passinput.Count() == 4) { if (passinput == passcheck) { if (CheckCallform == 0) { UserLoginModel.UserLoginInfo = usermodel; frmMain frm = new frmMain(); frm.ShowDialog(); this.Close(); } else { if (usermodel.DepartmentID == 1 || usermodel.DepartmentID == 2) { this.DialogResult = System.Windows.Forms.DialogResult.OK; UserVoidItem.UserLoginInfo = usermodel; this.Close(); } else { frmMessager frmMes = new frmMessager("Login", "You can not login!"); frmMes.ShowDialog(); this.DialogResult = System.Windows.Forms.DialogResult.OK; UserVoidItem.UserLoginInfo = usermodel; this.Close(); } } } else { var passshow = textBox1.Text; if (passshow.Count() > 0) { this.lblMessger.Visible = true; //frmMessager frm = new frmMessager("Messenger", "Pin code isn't correct."); //frm.ShowDialog(); textBox1.Text = ""; } } } } else { var passshow = textBox1.Text; if (passshow.Count() > 0) { frmMessager frm = new frmMessager("Messenger", "Please chose user name"); frmOpacity.ShowDialog(this, frm); textBox1.Text = ""; } } }
private void btnBack_Click(object sender, EventArgs e) { frmMain frm = new frmMain(); this.Close(); frm.ShowDialog(); }