private void addUsersToolStripMenuItem_Click(object sender, EventArgs e) { if (lblposition.Text == "Administrator") { frmsignup obj = new frmsignup(); obj.Show(); this.Hide(); } else { MessageBox.Show("Oops Access Denied... Your not an Adminsitrator or a Manager to Access!", "Access Denied", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void btnnew_Click(object sender, EventArgs e) { if (frmdashboard.sendPosition == "Administrator") { frmsignup obj = new frmsignup(); obj.Show(); this.Hide(); } else { MessageBox.Show("Oops Access Denied... Your not an Adminsitrator or a Manager to Access!", "Access Denied", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }