private void BtnBack_Click(object sender, EventArgs e) { this.Close(); frmStart frmStart = new frmStart(); frmStart.Show(); }
private void BtnLogin_Click(object sender, EventArgs e) { LogAdminBLL logAdminBLL = new LogAdminBLL(); tblAdmin admin = new tblAdmin(); admin.Username = txtUserName.Text; admin.Password = txtPassword.Text; if (logAdminBLL.getLogin(admin).HasRows) { tblLogTrail log = new tblLogTrail(); LogTrailBLL bll = new LogTrailBLL(); log.Dater = lblDateTime.Text; log.Descrip = "User: "******" has successfully Logged In!"; log.Authority = "Admin"; bll.Insert(log); frmStart frmStart = (frmStart)Application.OpenForms["frmStart"]; frmStart.Hide(); frmAdminMenu frmAdminMenu = new frmAdminMenu(); frmAdminMenu.Show(); this.Hide(); } else { DialogResult = MessageBox.Show("Không được phép truy cập! ", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Stop); } }
private void LblUser_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("Are you sure? ", "Log Out", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dialogResult == DialogResult.Yes) { this.Close(); frmStart frmStart = new frmStart(); frmStart.Show(); frmLogAdmin frmLogAdmin = new frmLogAdmin(); frmLogAdmin.Show(); } }
private void BtnBack_Click(object sender, EventArgs e) { tblLogTrail log = new tblLogTrail(); LogTrailBLL bll = new LogTrailBLL(); log.Dater = DateTime.Now.ToString(); log.Descrip = "User: "******" has successfully logged Out!"; log.Authority = "Cashier"; bll.Insert(log); this.Close(); frmStart frmStart = new frmStart(); frmStart.Show(); }
private void BtnLogin_Click(object sender, EventArgs e) { LoginBLL loginBLL = new LoginBLL(); tblLogin login = new tblLogin(); login.Username = txtUserName.Text; login.Password = txtPassword.Text; if (loginBLL.getLogin(login).HasRows) { MessageBox.Show("Welcome", "Susscess", MessageBoxButtons.OK, MessageBoxIcon.None); frmStart frmStart = (frmStart)Application.OpenForms["frmStart"]; frmStart.Hide(); this.Hide(); } else { DialogResult = MessageBox.Show("Khôngg được phép truy cập! ", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Stop); } }
private void LblUser_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("Are you sure? ", "Log Out", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dialogResult == DialogResult.Yes) { tblLogTrail log = new tblLogTrail(); LogTrailBLL bll = new LogTrailBLL(); log.Dater = DateTime.Now.ToString(); log.Descrip = "User: "******" has successfully logged Out!"; log.Authority = "Admin"; bll.Insert(log); this.Close(); frmStart frmStart = new frmStart(); frmStart.Show(); frmLogAdmin frmLogAdmin = new frmLogAdmin(); frmLogAdmin.Show(); } }