private void bunifuButton3_Click(object sender, EventArgs e) { tea01Entities2 db = new tea01Entities2(); Staff staff = db.Staffs.Find(SignIn.username); Boolean flag = false; foreach (var i in staff.Permisions) { if (i.PermisionName == "Full") { //MessageBox.Show(j.ActionName); flag = true; ManageStaff manageStaff = new ManageStaff(); this.Hide(); manageStaff.ShowDialog(); this.Close(); } } if (!flag) { MessageBox.Show("Hãy phấn đấu và bạn sẽ có quyền vào đây"); } }
private void ManageStaff_PreviewMouseDown(object sender, MouseButtonEventArgs e) { ManageStaff manageStaff = new ManageStaff(); manageStaff.Show(); Hide(); }