Пример #1
0
 /// <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);
     }
 }