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