Ejemplo n.º 1
0
        private void adminToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!this.account.IsAdmin)
            {
                MessageBox.Show("Bạn không có quyền truy cập", "Thông báo");
                return;
            }
            fAdmin f = new fAdmin();

            this.Hide();
            f.ShowDialog();
            this.Show();
        }
Ejemplo n.º 2
0
        private void adminToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AccountDTO dto = AccountDAO.Instance.getLoginAccount(this.username);

            if (!dto.IsAdmin)
            {
                MessageBox.Show("Bạn không có quyền truy cập", "Thông báo");
                return;
            }
            fAdmin f = new fAdmin();

            this.Hide();
            f.ShowDialog();
            this.Show();
        }