コード例 #1
0
ファイル: frmMDI.cs プロジェクト: joemash/school-erp
 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);
     }
 }
コード例 #2
0
        private void btnUserRights_Click(object sender, RoutedEventArgs e)
        {
            frmUserRights frm = new frmUserRights(Convert.ToInt32(cmbUserType.SelectedValue));

            this.Hide();
            frm.ShowDialog();
            this.Show();
        }
コード例 #3
0
ファイル: frmMain.cs プロジェクト: anand1606/ContractPayroll
        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();
            }
        }
コード例 #4
0
        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();
            }
        }