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