Exemplo n.º 1
0
        private void FrmBanHang_FormClosed(object sender, FormClosedEventArgs e)
        {
            _Instance = null;

            frmDatMon frmDM = new frmDatMon();

            frmDM.MdiParent = this.MdiParent;
            frmDM.Dock      = DockStyle.Fill;

            frmDM.Show();
            frmDM.TaoHDBanHang();
        }
Exemplo n.º 2
0
        // MDI frmDatMon
        void MoFormDatMon()
        {
            Form frm = KiemTraFormTonTai(typeof(frmDatMon));

            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                frmDatMon m_frmDatMon = frmDatMon.Instance;
                m_frmDatMon.MdiParent = this;
                m_frmDatMon.Dock      = DockStyle.Fill;
                m_frmDatMon.Show();
            }
        }
Exemplo n.º 3
0
        private void btnXuatHD_Click(object sender, EventArgs e)
        {
            if (txtTienCuaKH.Text != "")
            {
                _hdBH.TrangThai = 1;
                _hdBH.TonTai    = 1;
                _hdBH.NgayLapHD = DateTime.Now;
                _hdBH.TienCuaKH = Convert.ToInt32(txtTienCuaKH.Text);
                _hdBH.TienThua  = Convert.ToInt32(txtTienCuaKH.Text) - _hdBH.TongTien;
                if (HDBanHangBUS.CapNhatHoaDon(_hdBH))
                {
                    MessageBox.Show("Đặt món thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.None);

                    int    tienKH     = int.Parse(txtTienCuaKH.Text.Replace(",", ""));
                    string tienCuaKH  = String.Format("{0:#,##0}", tienKH);
                    int    tienThua   = Convert.ToInt32(txtTienCuaKH.Text) - _hdBH.TongTien;
                    string tienThuaKH = String.Format("{0:#,##0}", tienThua);
                    frmBaoCao._tienMat  = tienCuaKH;
                    frmBaoCao._tienThua = tienThuaKH;
                    frmBaoCao frmBC = new frmBaoCao();
                    frmBC.HienHDBanHang(_hdBH.MaHD);
                    frmBC.Show();

                    frmDatMon frmDM = new frmDatMon();
                    frmDM.MdiParent = this.MdiParent;
                    frmDM.Dock      = DockStyle.Fill;
                    frmDM.Show();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Đặt món thất bại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show("Mời bạn nhập tiền khách đưa!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemplo n.º 4
0
 private void frmDatMon_FormClosed(object sender, FormClosedEventArgs e)
 {
     _Instance = null;
 }