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

                    frmProductRegister frm = new frmProductRegister();
                    frmProductRegister open = Application.OpenForms["frmProductRegister"] as frmProductRegister;
                    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 73: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }