コード例 #1
0
ファイル: formMDI.cs プロジェクト: jsoques/openmiracle
 /// <summary>
 /// Calls frmChangeFinancialYear form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void changeFinancialYearToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         frmChangeFinancialYear objChangeFinancialYear = new frmChangeFinancialYear();
         frmChangeFinancialYear open = Application.OpenForms["frmChangeFinancialYear"] as frmChangeFinancialYear;
         if (open == null)
         {
             objChangeFinancialYear.MdiParent = this;
             objChangeFinancialYear.Show();
         }
         else
         {
             open.Activate();
             if (open.WindowState == FormWindowState.Minimized)
             {
                 open.WindowState = FormWindowState.Normal;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MDI  146: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #2
0
 /// <summary>
 /// Calls frmChangeFinancialYear form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void changeFinancialYearToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmChangeFinancialYear", "View"))
         {
             frmChangeFinancialYear objChangeFinancialYear = new frmChangeFinancialYear();
             frmChangeFinancialYear open = Application.OpenForms["frmChangeFinancialYear"] as frmChangeFinancialYear;
             if (open == null)
             {
                 objChangeFinancialYear.MdiParent = this;
                 objChangeFinancialYear.Show();
             }
             else
             {
                 open.Activate();
                 if (open.WindowState == FormWindowState.Minimized)
                 {
                     open.WindowState = FormWindowState.Normal;
                 }
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MDI  146: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }