Пример #1
0
        private void adminToolStripMenuItem_Click(object sender, EventArgs e)
        {
            fAdmin f = new fAdmin();

            f.loginAccount = LoginAccount;
            f.InsertFood  += f_InsertFood;
            f.UptateFood  += f_UpdateFood;
            f.DeleteFood  += f_DeleteFood;
            f.ShowDialog();
        }
Пример #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string Username = txtUserName.Text;
            string Password = txtPassWord.Text;

            if (Login(Username, Password))
            {
                BEL_TaiKhoan tk = BAL_TaiKhoan.Instance.LoadTK(Username, Password);
                fAdmin       Ad = new fAdmin(tk);
                this.Hide();
                Ad.ShowDialog();
                this.Show();
            }
            else
            {
                MessageBox.Show("Sai tên tài khoản hoặc mật khẩu", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }