コード例 #1
0
 private void ViewUserRoleButton_Click(object sender, EventArgs e)
 {
     if (LoggedInUser.RoleId == 1)
     {
         //Display Form and Do what you want
         ViewRolesForm vrf = new ViewRolesForm();
         vrf.ShowDialog();
     }
     else
     {
         MessageBox.Show("You are not allowed to perform this operation.", "Access Denied", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #2
0
        private void viewRolesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ViewRolesForm vrf = new ViewRolesForm();

            vrf.ShowDialog();
        }