private void btnBACK_Click(object sender, EventArgs e) { FrmMain_Admin frmMainAdmin = new FrmMain_Admin(usernameLogin); frmMainAdmin.Show(); this.Close(); }
// button home private void btnHome_Click(object sender, EventArgs e) { if (isAdmin) { FrmMain_Admin frmMainAdmin = new FrmMain_Admin(usernameLogin); frmMainAdmin.Show(); } else { FrmMain_Member frmMainMember = new FrmMain_Member(usernameLogin); frmMainMember.Show(); } this.Close(); }
// Login application private void btnLogin_Click(object sender, EventArgs e) { if (BLL_ACCOUNT.Instance.checkAccount(txtUSER.Text.Trim(), txtPASSWORD.Text.Trim())) { if (BLL_ACCOUNT.Instance.isAdmin(txtUSER.Text.Trim())) { FrmMain_Admin frmMainAdmin = new FrmMain_Admin(txtUSER.Text.Trim()); frmMainAdmin.Show(); } else { FrmMain_Member frmMainMember = new FrmMain_Member(txtUSER.Text.Trim()); frmMainMember.Show(); } this.Hide(); } else { lbINFO.Text = "Kiểm tra lại tài khoản và mật khẩu"; txtPASSWORD.Clear(); } }