Ejemplo n.º 1
0
 private void tsbRecording_Click(object sender, EventArgs e)
 {
     if (m_frmRecodrd == null || m_frmRecodrd.IsDisposed)
     {
         m_frmRecodrd           = new frmRecording();
         m_frmRecodrd.MdiParent = this;
     }
     m_frmRecodrd.Visible = false;
     m_frmRecodrd.Activate();
     m_frmRecodrd.WindowState = FormWindowState.Maximized;
     m_frmRecodrd.Show();
     this.tsslCurrent.Text = "当前操作:记账";//
     m_iOutput             = m_frmRecodrd.IOutput;
     this._SearchGood      = null;
 }
Ejemplo 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;
                }
            }
        }