Esempio n. 1
0
 private void tsbProviders_Click(object sender, EventArgs e)
 {
     if (m_frmProviders == null || m_frmProviders.IsDisposed)
     {
         m_frmProviders           = new frmProviders();
         m_frmProviders.MdiParent = this;
     }
     m_frmProviders.Visible = false;
     m_frmProviders.Activate();
     m_frmProviders.WindowState = FormWindowState.Maximized;
     m_frmProviders.Show();
     this.tsslCurrent.Text = "当前操作:供应商管理";
     m_iOutput             = m_frmProviders.IOutput;
     this._SearchGood      = null;
 }
        public static frmProviders CreateInstance()
        {
            frmProviders theInstance = new frmProviders();

            theInstance.Form_Load();
            //The MDI form in the VB6 project had its
            //AutoShowChildren property set to True
            //To simulate the VB6 behavior, we need to
            //automatically Show the form whenever it
            //is loaded.  If you do not want this behavior
            //then delete the following line of code
            //UPGRADE_TODO: (2018) Remove the next line of code to stop form from automatically showing. More Information: http://www.vbtonet.com/ewis/ewi2018.aspx
            theInstance.Show();
            return(theInstance);
        }
Esempio n. 3
0
        private void tsbLock_Click(object sender, EventArgs e)
        {
            this.toolStripTop.Visible    = false;
            this.MainMenuStrip.Visible   = false;
            this.StatusBarBottom.Visible = false;

            if (m_frmPurchas != null && !m_frmPurchas.IsDisposed)
            {
                m_frmPurchas.Visible = !m_frmPurchas.Visible;
            }
            if (m_frmSell != null && !m_frmSell.IsDisposed)
            {
                m_frmSell.Visible = !m_frmSell.Visible;
            }
            if (m_frmStock != null && !m_frmStock.IsDisposed)
            {
                m_frmStock.Visible = !m_frmStock.Visible;
            }
            if (m_frmProviders != null && !m_frmProviders.IsDisposed)
            {
                m_frmProviders.Visible = !m_frmProviders.Visible;
            }
            if (m_frmUserManage != null && !m_frmUserManage.IsDisposed)
            {
                m_frmUserManage.Visible = !m_frmUserManage.Visible;
            }
            if (m_frmRecodrd != null && !m_frmRecodrd.IsDisposed)
            {
                m_frmRecodrd.Visible = !m_frmRecodrd.Visible;
            }
            Login l = new Login();

            l._CurrentState = CurrentState.Lock;
            if (l.ShowDialog(this) == DialogResult.OK)
            {
                this.toolStripTop.Visible    = true;
                this.StatusBarBottom.Visible = true;
                this.MainMenuStrip.Visible   = true;

                CheckRight(l._SystemUser);
                if (this._SystemUser.UserNO == l._SystemUser.UserNO)
                {
                    #region  一用户
                    if (m_frmPurchas != null && !m_frmPurchas.IsDisposed)
                    {
                        m_frmPurchas.Visible = !m_frmPurchas.Visible;
                    }
                    if (m_frmSell != null && !m_frmSell.IsDisposed)
                    {
                        m_frmSell.Visible = !m_frmSell.Visible;
                    }
                    if (m_frmStock != null && !m_frmStock.IsDisposed)
                    {
                        m_frmStock.Visible = !m_frmStock.Visible;
                    }
                    if (m_frmProviders != null && !m_frmProviders.IsDisposed)
                    {
                        m_frmProviders.Visible = !m_frmProviders.Visible;
                    }
                    if (m_frmUserManage != null && !m_frmUserManage.IsDisposed)
                    {
                        m_frmUserManage.Visible = !m_frmUserManage.Visible;
                    }
                    if (m_frmRecodrd != null && !m_frmRecodrd.IsDisposed)
                    {
                        m_frmRecodrd.Visible = !m_frmRecodrd.Visible;
                    }
                    #endregion
                }
                else
                {
                    #region 其它用户
                    m_frmPurchas    = null;
                    m_frmSell       = null;
                    m_frmStock      = null;
                    m_frmProviders  = null;
                    m_frmUserManage = null;
                    m_frmRecodrd    = null;
                    #endregion
                    this._SystemUser = l._SystemUser;
                }
            }
        }