Exemplo n.º 1
0
 private void tsbPurchas_Click(object sender, EventArgs e)
 {
     if (m_frmPurchas == null || m_frmPurchas.IsDisposed)
     {
         m_frmPurchas           = new frmPurchas(this._SystemUser);
         m_frmPurchas.MdiParent = this;
     }
     this._SearchGood     = m_frmPurchas.ISearchGood;
     m_frmPurchas.Visible = false;
     m_frmPurchas.Activate();
     m_frmPurchas.WindowState = FormWindowState.Maximized;
     m_frmPurchas.Show();
     this.tsslCurrent.Text = "当前操作:进货管理";//
     m_iOutput             = m_frmPurchas.IOutput;
 }
Exemplo n.º 2
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;
                }
            }
        }