I have three form,one is Admin , one is Employee and another is Mainform and this mainform contains menustrip bar with some item.Admin and Employee form has a button "ok".
Now i want when i click button " ok " in Admin form and the Mainform comes and i can see all the item in menustrip bar but when i click button " ok " in Employee form that time in mainform menustrip bar "EDIT" item will be as disabled.
Can i do it?
What is the code?
I don't know the code.
Loading
Benjamin KemnerPosted Aug 15, 2011, 4:36 AM
private bool isAdmin = true;
public bool IsAdmin{
set{
isAdmin = value;
editToolStripMenuItem.Enabled = value;
};
get{
return isAdmin;
}
};
The code to open is:
// employee
MainForm mainForm = new MainForm();
mainForm.IsAdmin = false;
mainForm.ShowDialog();
// admin
MainForm mainForm = new MainForm();
mainForm.IsAdmin = true;
mainFrom.ShowDialog();
Nahhyan JugalPosted Aug 15, 2011, 2:12 PM