private void AddNewUserToolStripMenuItem_Click(object sender, EventArgs e) { frmSearchUser user = new frmSearchUser(); frmMaintainUsers users = new frmMaintainUsers(user); frmParent parent = this; users.setMode("add"); users.clearForm(); users.MdiParent = parent; users.Show(); }
private void AddToolStripMenuItem2_Click(object sender, EventArgs e) { //add new user if (getUserAdmin() == false) { MessageBox.Show("Access denied: Only admin users have access to this feature"); } else { frmSearchUser user = new frmSearchUser(); frmMaintainUsers users = new frmMaintainUsers(user); frmParent parent = this; users.setMode("add"); users.clearForm(); users.MdiParent = parent; users.Show(); } }