protected void cbpViewReport_Callback(object sender, CallbackEventArgsBase e)
        {
            int IDPhieuThu = int.Parse(e.Parameter);
            var PhieuTT    = DBDataProvider.DB.kPhieuThanhToanNCCs.Where(x => x.IDPhieuThu == IDPhieuThu).SingleOrDefault();

            hdfViewReport["view"]               = 1;
            oPhieuTTExport                      = new oThanhToan();
            oPhieuTTExport.NgayThu              = DBDataProvider.TinhThanhCty() + ", " + Formats.ConvertToFullStringDate(DateTime.Parse(PhieuTT.NgayThu.ToString()));
            oPhieuTTExport.IDKhachHang          = Convert.ToInt32(PhieuTT.KhachHangID);
            oPhieuTTExport.STTPhieuThu          = Convert.ToInt32(PhieuTT.STTPhieuThu);
            oPhieuTTExport.TieuDe               = "PHIẾU THANH TOÁN " + PhieuTT.STTPhieuThu;
            oPhieuTTExport.SoHoaDon             = PhieuTT.SoHoaDon;
            oPhieuTTExport.TenKhachHang         = PhieuTT.khKhachHang.HoTen;
            oPhieuTTExport.MaKhachHang          = PhieuTT.khKhachHang.MaKhachHang;
            oPhieuTTExport.DienThoai            = PhieuTT.khKhachHang.DienThoai;
            oPhieuTTExport.NoiDung              = PhieuTT.NoiDung;
            oPhieuTTExport.SoTienThu            = Convert.ToDouble(PhieuTT.SoTienThu);
            oPhieuTTExport.CongNoTruocThanhToan = Convert.ToDouble(PhieuTT.CongNoCu);
            oPhieuTTExport.CongNoSauThanhToan   = Convert.ToDouble(PhieuTT.CongNoCu - PhieuTT.SoTienThu);
        }
Exemplo n.º 2
0
        private void CreateReportReview()
        {
            hdfViewReport["view"]  = 1;
            oPhieuTTExport         = new oThanhToan();
            oPhieuTTExport.NgayThu = DBDataProvider.TinhThanhCty() + ", " + Formats.ConvertToFullStringDate(DateTime.Parse(dateNgayTT.Text.ToString()));
            var KH = DBDataProvider.DB.khKhachHangs.Where(x => x.IDKhachHang == Convert.ToInt32(ccbKhachHang.Value.ToString())).FirstOrDefault();

            oPhieuTTExport.STTPhieuThu             = 0000;
            oPhieuTTExport.TieuDe                  = "PHIẾU THANH TOÁN ";
            oPhieuTTExport.XemTruoc                = "(Xem trước)";
            oPhieuTTExport.SoHoaDon                = txtHoaDon.Text;
            oPhieuTTExport.TenKhachHang            = KH.HoTen;
            oPhieuTTExport.MaKhachHang             = KH.MaKhachHang;
            oPhieuTTExport.DienThoai               = KH.DienThoai;
            oPhieuTTExport.NoiDung                 = memoNoiDungTT.Text;
            oPhieuTTExport.SoTienThu               = Convert.ToDouble(speSoTienTT.Number);
            oPhieuTTExport.CongNoTruocThanhToan    = Convert.ToDouble(KH.CongNo);
            oPhieuTTExport.CongNoSauThanhToan      = Convert.ToDouble(KH.CongNo) - Convert.ToDouble(speSoTienTT.Number);
            cbpThanhToan.JSProperties["cp_rpView"] = true;
        }