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