Exemplo n.º 1
0
        //button bán hàng
        private void btnSell_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Form f = IsActive(typeof(frmSell));

            if (f == null)
            {
                Form fSell = new frmSell();
                fSell.MdiParent = this;
                fSell.Show();
            }
            else
            {
                f.Activate();
            }
        }
Exemplo n.º 2
0
 private void tsbSell_Click(object sender, EventArgs e)
 {
     if (m_frmSell == null || m_frmSell.IsDisposed)
     {
         m_frmSell           = new frmSell(_SystemUser);
         m_frmSell.MdiParent = this;
     }
     this._SearchGood  = m_frmSell.ISearchGood;
     m_frmSell.Visible = false;
     m_frmSell.Activate();
     m_frmSell.WindowState = FormWindowState.Maximized;
     m_frmSell.Show();
     this.tsslCurrent.Text = "当前操作:销售管理";
     m_iOutput             = m_frmSell.IOutput;
 }
Exemplo n.º 3
0
        private void BtnSell_ItemClick(object sender, ItemClickEventArgs e)
        {
            Form f = IsActive(typeof(frmSell));
            VaiTro_ChucNangDTO phanquyenBH = btnBanHang.Tag as VaiTro_ChucNangDTO;

            if (f == null)
            {
                frmSell fSell = new frmSell(phanquyenBH, username);
                fSell.ThemNhatKyHeThong += ThemNhatKy_Main;
                fSell.MdiParent          = this;
                fSell.Show();
            }
            else
            {
                f.Activate();
            }
        }
Exemplo n.º 4
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;
                }
            }
        }