Beispiel #1
0
        private void btnInhoadon_Click(object sender, EventArgs e)
        {
            ArrayList listdv = new ArrayList();
            ArrayList listp  = new ArrayList();

            listdv.Clear();
            listp.Clear();
            if (flagtinhtien == true)
            {
                listdv = new ArrayList(inhddvBUS.inhoadondv(labMaHD.Text));
                listp  = new ArrayList(inhdpBUS.InHoaDonPhong(labMaHD.Text));
                qlks3lopDataSet.InhoadonDichVuDataTable dtdv = new qlks3lopDataSet.InhoadonDichVuDataTable();
                qlks3lopDataSet.InhoadonPhongDataTable  dtp  = new qlks3lopDataSet.InhoadonPhongDataTable();
                foreach (InHoaDonDichVuDTO hddv in listdv)
                {
                    dtdv.Rows.Add(hddv.Maphieuthue, hddv.Tendichvu, hddv.Gia, hddv.Donvitinh, hddv.Soluong, hddv.MaPhong, hddv.Mahoadon, hddv.Ngay);
                }
                foreach (InHoaDonPhongDTO hdp in listp)
                {
                    dtp.Rows.Add(hdp.Mahoadon, hdp.Tenkhachhang, hdp.Songayo, hdp.CMND, hdp.Diachi, hdp.Pass, hdp.Sodienthoai, hdp.Email, hdp.Ngayden, hdp.Ngaydi, hdp.Sotiendatcoc, hdp.Gia, hdp.Maphong, hdp.Tennhanvien, hdp.Tongtien);
                }
                InHoaDon frmInHoaDon = new InHoaDon();
                frmInHoaDon.dtdv = dtdv;
                frmInHoaDon.dtp  = dtp;
                frmInHoaDon.ShowDialog();
                //show_MaPT();
            }
            else
            {
                MessageBox.Show("Thanh toán trước khi in hóa đơn");
            }
        }
Beispiel #2
0
        private void btnInhoadon_Click(object sender, EventArgs e)
        {
            ArrayList listdv = new ArrayList();
            ArrayList listp = new ArrayList();
            listdv.Clear();
            listp.Clear();
            if (flagtinhtien == true)
            {

                listdv = new ArrayList(inhddvBUS.inhoadondv(labMaHD.Text));
                listp = new ArrayList(inhdpBUS.InHoaDonPhong(labMaHD.Text));
                qlks3lopDataSet.InhoadonDichVuDataTable dtdv = new qlks3lopDataSet.InhoadonDichVuDataTable();
                qlks3lopDataSet.InhoadonPhongDataTable dtp = new qlks3lopDataSet.InhoadonPhongDataTable();
                foreach (InHoaDonDichVuDTO hddv in listdv)
                {
                    dtdv.Rows.Add(hddv.Maphieuthue, hddv.Tendichvu, hddv.Gia, hddv.Donvitinh, hddv.Soluong, hddv.MaPhong, hddv.Mahoadon, hddv.Ngay);
                }
                foreach (InHoaDonPhongDTO hdp in listp)
                {
                    dtp.Rows.Add(hdp.Mahoadon, hdp.Tenkhachhang, hdp.Songayo, hdp.CMND, hdp.Diachi, hdp.Coquan, hdp.Sodienthoai, hdp.Email, hdp.Ngayden, hdp.Ngaydi, hdp.Sotiendatcoc, hdp.Gia, hdp.Maphong, hdp.Tennhanvien, hdp.Tongtien);
                }
                InHoaDon frmInHoaDon = new InHoaDon();
                frmInHoaDon.dtdv = dtdv;
                frmInHoaDon.dtp = dtp;
                frmInHoaDon.ShowDialog();
                //show_MaPT();
            }
            else MessageBox.Show("Thanh toán trước khi in hóa đơn");
        }