Ejemplo n.º 1
0
 /// <summary>
 /// Calls frmDebitNoteRegister form
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void debitNoteRegisterToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckUserPrivilege.PrivilegeCheck(PublicVariables._decCurrentUserId, "frmDebitNoteRegister", "View"))
         {
             frmDebitNoteRegister objDebitNoteRegister = new frmDebitNoteRegister();
             frmDebitNoteRegister open = Application.OpenForms["frmDebitNoteRegister"] as frmDebitNoteRegister;
             if (open == null)
             {
                 objDebitNoteRegister.MdiParent = this;
                 objDebitNoteRegister.Show();
             }
             else
             {
                 open.Activate();
                 if (open.WindowState == FormWindowState.Minimized)
                 {
                     open.WindowState = FormWindowState.Normal;
                 }
             }
         }
         else
         {
             Messages.NoPrivillageMessage();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MDI 140: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }