Exemplo n.º 1
0
        private void btnGhiNoP_Click(object sender, EventArgs e)
        {
            if (KetThuc)
            {
                try
                {
                    Ban          = false;
                    MaHD         = txtHDPhong.Text;
                    etp.TenPhong = txtTenPhong.Text;
                    MaPhong      = Int32.Parse(bus_Phong.MaPhong(etp));
                    TienNo       = float.Parse(txtThanhTienP.Text);

                    MaHD          = txtHDPhong.Text;
                    etx.SoPhieu   = txtHDPhong.Text;
                    etx.PhuThu    = float.Parse(txtPhuThup.Text);
                    etx.KhuyenMai = float.Parse(txtTienKMP.Text);
                    bus_px.ThanhToan_Cafe_No(etx);
                    etp.MaPhong = MaPhong;
                    bus_Phong.ThanhToanBan(etp);
                    khoanutPhong();
                    LoadBan();

                    frmThongTinNo _TTNo = new frmThongTinNo();
                    _TTNo.ShowDialog();
                }
                catch
                {
                    MessageBox.Show("Đã xảy ra lỗi !");
                }
            }
            else
            {
                MessageBox.Show("Chưa kết thúc !");
            }
        }
Exemplo n.º 2
0
        private void btnGhiNoBan_Click(object sender, EventArgs e)
        {
            Ban          = true;
            MaHD         = txtHDBan.Text;
            etp.TenPhong = txtTenBan.Text;
            MaBan        = Int32.Parse(bus_Phong.MaPhong(etp));
            TienNo       = float.Parse(txtThanhTienBan.Text);

            MaHD          = txtHDBan.Text;
            etx.SoPhieu   = txtHDBan.Text;
            etx.PhuThu    = float.Parse(txtPhuThuBan.Text);
            etx.KhuyenMai = float.Parse(txtTienKM.Text);
            bus_px.ThanhToan_Cafe_No(etx);
            etp.MaPhong = MaBan;
            bus_Phong.ThanhToanBan(etp);
            khoanut();
            LoadBan();


            frmThongTinNo _TTNo = new frmThongTinNo();

            _TTNo.ShowDialog();
        }