private void addInventoryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (lblposition.Text == "Administrator")
     {
         frmstock obj = new frmstock();
         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);
     }
 }
Example #2
0
 private void btnstock_Click(object sender, EventArgs e)
 {
     if (frmdashboard.sendPosition == "Administrator")
     {
         frmstock obj = new frmstock();
         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);
     }
 }