private void toolStripMenuItem7_Click(object sender, EventArgs e) { try { frmUserRights frm = new frmUserRights(); frmUserRights open = Application.OpenForms["frmUserRights"] as frmUserRights; if (open == null) { frm.MdiParent = this; frm.Show(); } else { open.Activate(); if (open.WindowState == FormWindowState.Minimized) { open.WindowState = FormWindowState.Normal; } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnUserRights_Click(object sender, RoutedEventArgs e) { frmUserRights frm = new frmUserRights(Convert.ToInt32(cmbUserType.SelectedValue)); this.Hide(); frm.ShowDialog(); this.Show(); }
private void mnuUserRights_Click(object sender, EventArgs e) { Form t = Application.OpenForms["frmUserRights"]; if (t == null) { frmUserRights m = new frmUserRights(); m.MdiParent = this; m.Show(); } }
private void btnUserRights_Click(object sender, RoutedEventArgs e) { frmUserRights frm = new frmUserRights(0, "HOME"); userPrevilage = new UserPrevilage(this.btnUserRights.Tag.ToString()); if (userPrevilage.Show == true) { frm.btnSave.IsEnabled = Convert.ToBoolean(userPrevilage.AddNew); this.Close(); frm.ShowDialog(); } }