Beispiel #1
0
        public rp_satis_raporu(int masa_id, DateTime ilk_tarih, DateTime son_tarih)
        {
            InitializeComponent();

            lbl_siparis_tarihi.Text = ilk_tarih.ToShortDateString() + " - " + son_tarih.ToShortDateString();

            DataTable dt = SQL.get("SELECT fh.kayit_tarihi, fh.miktar, p.deger, m.masa_adi FROM finans_hareket fh INNER JOIN parametreler p ON p.parametre_id = fh.hareket_tipi_parametre_id INNER JOIN adisyon a ON a.adisyon_id = fh.referans_id INNER JOIN masalar m ON m.masa_id = a.masa_id WHERE fh.silindi = 0 AND fh.hareket_tipi_parametre_id IN (25, 26, 27) AND (m.masa_id = " + masa_id + " OR " + masa_id + " = 0) AND fh.kayit_tarihi BETWEEN '" + ilk_tarih.ToString("yyyy-MM-dd HH:mm:ss.fff") + "' AND DATEADD(DAY, 0, '" + son_tarih.ToString("yyyy-MM-dd HH:mm:ss.fff") + "')");

            this.DataSource = dt;

            XRBinding binding0 = new XRBinding("Text", this.DataSource, "kayit_tarihi", "");

            xrTableCell4.DataBindings.Add(binding0);
            XRBinding binding1 = new XRBinding("Text", this.DataSource, "deger", "");

            xrTableCell5.DataBindings.Add(binding1);
            XRBinding binding2 = new XRBinding("Text", this.DataSource, "masa_adi", "");

            xrTableCell6.DataBindings.Add(binding2);
            XRBinding binding3 = new XRBinding("Text", this.DataSource, "miktar", "{0:c2}");

            xrTableCell7.DataBindings.Add(binding3);
            XRBinding binding4 = new XRBinding("Text", this.DataSource, "miktar", "{0:c2}");

            xrTableCell12.DataBindings.Add(binding4);

            XRSummary sum1 = new XRSummary(SummaryRunning.Page, SummaryFunc.Sum, "{0:c2}");

            xrTableCell12.Summary = sum1;
        }
Beispiel #2
0
        public void gettieudegau(string tungay, string denngay, string makhuyenmai)
        {
            xrLabel5.Text = "BÁO CÁO ĐỐI CHIẾU CHIẾT KHẤU GẤU ĐỎ";
            xrLabel1.Text = gen.GetString("select Top 1 CompanyName from Center");
            xrLabel2.Text = gen.GetString("select Top 1 Address from Center");
            xrLabel6.Text = "MÃ KHUYẾN MÃI - " + makhuyenmai.ToUpper();

            xrLabel4.Text = "In lúc: " + String.Format("{0:HH:mm:ss}", DateTime.Now) + " ngày: " + String.Format("{0:dd-MM-yyyy}", DateTime.Now);

            DataTable da = new DataTable();

            da = gen.GetTable("select Substring(RefNo,7,9) as 'Số phiếu',RefDate as 'Ngày lập',REPLACE(InvoiceNo,'UNI','') as 'Đơn hàng',case when FreeCode='" + makhuyenmai + "' then sotien end as 'Số tiền',case when FreeCode<>'" + makhuyenmai + "' then sotien end as 'Tiền khác', case when FreeCode<>'" + makhuyenmai + "' then FreeCode end 'Chương trình khác',tongtien as 'Tổng tiền',chietkhau as 'Chiết khấu',Case when tongtien-chietkhau<>0 then tongtien-chietkhau end as 'Chênh lệch' from (select a.InvoiceNo,FreeCode,sotien,tongtien from (select a.InvoiceNo,FreeCode,SUM(Amount) as sotien from (select * from INOutwardCheck where Amount<>0) a, (select distinct InvoiceNo  from INOutwardCheck where FreeCode='" + makhuyenmai + "') b where a.InvoiceNo=b.InvoiceNo group by a.InvoiceNo,FreeCode) a,(select a.InvoiceNo,SUM(Amount) as tongtien from (select * from INOutwardCheck where Amount<>0) a, (select distinct InvoiceNo  from INOutwardCheck where FreeCode='" + makhuyenmai + "') b where a.InvoiceNo=b.InvoiceNo group by a.InvoiceNo) b where a.InvoiceNo=b.InvoiceNo) a,(select RefNo,RefDate,JournalMemo,Round(TotalFreightAmount/1.1,0) as chietkhau from INOutward) b where a.InvoiceNo=b.JournalMemo order by RefNo,RefDate,[Số tiền] DESC");

            DataSource = da;

            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();
            XRSummary summarytotal2 = new XRSummary();
            XRSummary summarytotal3 = new XRSummary();
            XRSummary summarytotal4 = new XRSummary();
            XRSummary summarytotal5 = new XRSummary();

            Bands.Add(GroupHeader1);
            GroupField groupField = new GroupField("Đơn hàng");

            GroupHeader1.GroupFields.Add(groupField);
            xrTableCell10.DataBindings.Add("Text", DataSource, "Đơn hàng");
            xrTableCell9.DataBindings.Add("Text", DataSource, "Ngày lập", "{0:dd/MM/yy}");
            xrTableCell8.DataBindings.Add("Text", DataSource, "Số phiếu");
            xrTableCell15.DataBindings.Add("Text", DataSource, "Chiết khấu", "{0:n0}");
            xrTableCell18.DataBindings.Add("Text", DataSource, "Chênh lệch", "{0:n0}");

            summarytotal.Running          = SummaryRunning.Group;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell11.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
            xrTableCell11.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Group;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n0}";
            xrTableCell12.DataBindings.Add("Text", DataSource, "Tiền khác", "{0:n0}");
            xrTableCell12.Summary = summarytotal1;

            summarytotal4.Running          = SummaryRunning.Report;
            summarytotal4.IgnoreNullValues = true;
            summarytotal4.FormatString     = "{0:n0}";
            xrTableCell20.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
            xrTableCell20.Summary = summarytotal4;

            summarytotal5.Running          = SummaryRunning.Report;
            summarytotal5.IgnoreNullValues = true;
            summarytotal5.FormatString     = "{0:n0}";
            xrTableCell21.DataBindings.Add("Text", DataSource, "Tiền khác", "{0:n0}");
            xrTableCell21.Summary = summarytotal5;

            xrTableCell22.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
            xrTableCell24.DataBindings.Add("Text", DataSource, "Tiền khác", "{0:n0}");
            xrTableCell26.DataBindings.Add("Text", DataSource, "Chương trình khác");
        }
Beispiel #3
0
        public void BindData(DataTable da)
        {
            DataSource = da;

            xrTableCell4.DataBindings.Add("Text", DataSource, "STT");
            xrTableCell8.DataBindings.Add("Text", DataSource, "Tên hàng");
            xrTableCell11.DataBindings.Add("Text", DataSource, "ĐVT");
            xrTableCell12.DataBindings.Add("Text", DataSource, "Loại");
            xrTableCell13.DataBindings.Add("Text", DataSource, "Đơn giá", "{0:n2}");
            xrTableCell10.DataBindings.Add("Text", DataSource, "Thành tiền", "{0:n0}");
            xrTableCell1.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");

            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();


            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n2}";
            xrLabel10.DataBindings.Add("Text", DataSource, "Loại", "{0:n2}");
            xrLabel10.Summary = summarytotal;

            /*summarytotal1.Running = SummaryRunning.Report;
             * summarytotal1.IgnoreNullValues = true;
             * summarytotal1.FormatString = "{0:n0}";
             * xrLabel11.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
             * xrLabel11.Summary = summarytotal1;*/
        }
Beispiel #4
0
        public void BindDataSum(DataTable da)
        {
            xrTable4.Visible = false;
            DataSource       = da;

            Bands.Add(GroupHeader1);
            GroupField groupField = new GroupField("Số phiếu");

            GroupHeader1.GroupFields.Add(groupField);
            xrTableCell1.DataBindings.Add("Text", DataSource, "Số phiếu");
            xrTableCell2.DataBindings.Add("Text", DataSource, "Ngày", "{0:dd-MM-yyyy}");
            xrTableCell3.DataBindings.Add("Text", DataSource, "Lý do");
            xrTableCell4.DataBindings.Add("Text", DataSource, "Nhân viên");


            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();

            summarytotal.Running          = SummaryRunning.Group;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell20.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
            xrTableCell20.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n0}";
            xrTableCell19.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
            xrTableCell19.Summary = summarytotal1;

            xrTableCell7.DataBindings.Add("Text", DataSource, "Tài khoản nợ");
            xrTableCell10.DataBindings.Add("Text", DataSource, "Tài khoản có");
            xrTableCell11.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
        }
Beispiel #5
0
        public void BindData(DataTable da)
        {
            if (da.Rows.Count > 11)
            {
                this.PageHeight = 1169;
                this.PageWidth  = 827;
                this.PaperKind  = System.Drawing.Printing.PaperKind.A4;

                this.TopMargin.HeightF    = 40F;
                this.BottomMargin.HeightF = 40F;
            }

            DataSource = da;
            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();


            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell17.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell17.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n2}";
            xrTableCell18.DataBindings.Add("Text", DataSource, "Số lượng QĐ", "{0:n2}");
            xrTableCell18.Summary = summarytotal1;

            xrTableCell4.DataBindings.Add("Text", DataSource, "STT");
            xrTableCell8.DataBindings.Add("Text", DataSource, "Tên hàng");
            xrTableCell11.DataBindings.Add("Text", DataSource, "ĐVT");
            xrTableCell12.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell13.DataBindings.Add("Text", DataSource, "Số lượng QĐ", "{0:n2}");
        }
Beispiel #6
0
        public rp_finans_raporu(DateTime ilk_tarih, DateTime son_tarih)
        {
            InitializeComponent();

            lbl_siparis_tarihi.Text = ilk_tarih.ToShortDateString() + " - " + son_tarih.ToShortDateString();

            DataTable dt = SQL.get("SELECT fh.kayit_tarihi, fh.miktar, p.deger FROM finans_hareket fh INNER JOIN parametreler p ON p.parametre_id = fh.hareket_tipi_parametre_id WHERE fh.silindi = 0 AND fh.kayit_tarihi BETWEEN '" + ilk_tarih.ToString("yyyy-MM-dd HH:mm:ss.fff") + "' AND DATEADD(DAY, 0, '" + son_tarih.ToString("yyyy-MM-dd HH:mm:ss.fff") + "')");

            this.DataSource = dt;

            XRBinding binding0 = new XRBinding("Text", this.DataSource, "kayit_tarihi", "");

            xrTableCell2.DataBindings.Add(binding0);
            XRBinding binding1 = new XRBinding("Text", this.DataSource, "deger", "");

            xrTableCell4.DataBindings.Add(binding1);
            XRBinding binding3 = new XRBinding("Text", this.DataSource, "miktar", "{0:c2}");

            xrTableCell5.DataBindings.Add(binding3);
            XRBinding binding4 = new XRBinding("Text", this.DataSource, "miktar", "{0:c2}");

            xrTableCell8.DataBindings.Add(binding4);

            XRSummary sum1 = new XRSummary(SummaryRunning.Page, SummaryFunc.Sum, "{0:c2}");

            xrTableCell8.Summary = sum1;
        }
Beispiel #7
0
        private void XtraReport1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            // Create a data binding object.
            XRBinding binding = new XRBinding("Text", null, "table.MyData");

            // Add the data binding to the label's collection of bindings.
            xrSummaryLabel.DataBindings.Add(binding);


            // Create an XRSummary object.
            XRSummary summary = new XRSummary();

            // Set a function which should be calculated.
            summary.Func = SummaryFunc.Sum;

            // Set a range for which the function should be calculated.
            summary.Running = SummaryRunning.Group;

            // Set the output string format.
            summary.FormatString = "{0:c2}";

            // Make the label calculate the specified function for the
            // value specified by its DataBindings.Text property.
            xrSummaryLabel.Summary = summary;
        }
Beispiel #8
0
        public void BindDatakm(DataTable da)
        {
            DataSource = da;

            Bands.Add(GroupHeader1);
            GroupField groupField1 = new GroupField("Mã hàng");

            GroupHeader1.GroupFields.Add(groupField1);


            xrTableCell1.DataBindings.Add("Text", DataSource, "Mã hàng");
            xrTableCell3.DataBindings.Add("Text", DataSource, "Tên hàng");

            xrTableCell4.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            XRSummary summary = new XRSummary();

            summary.Running          = SummaryRunning.Group;
            summary.IgnoreNullValues = true;
            summary.FormatString     = "{0:n0}";
            xrTableCell4.Summary     = summary;

            xrTableCell5.DataBindings.Add("Text", DataSource, "Trọng lượng", "{0:n2}");
            XRSummary summary1 = new XRSummary();

            summary1.Running          = SummaryRunning.Group;
            summary1.IgnoreNullValues = true;
            summary1.FormatString     = "{0:n2}";
            xrTableCell5.Summary      = summary1;



            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();
            XRSummary summarytotal3 = new XRSummary();
            XRSummary summarytotal4 = new XRSummary();
            XRSummary summarytotal5 = new XRSummary();
            XRSummary summarytotal6 = new XRSummary();
            XRSummary summarytotal7 = new XRSummary();
            XRSummary summarytotal8 = new XRSummary();


            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell22.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell22.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n2}";
            xrTableCell23.DataBindings.Add("Text", DataSource, "Trọng lượng", "{0:n2}");
            xrTableCell23.Summary = summarytotal1;


            xrTableCell16.DataBindings.Add("Text", DataSource, "Ngày lập", "{0:dd-MM-yyyy}");
            xrTableCell11.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell12.DataBindings.Add("Text", DataSource, "Trọng lượng", "{0:n2}");
            xrTableCell6.DataBindings.Add("Text", DataSource, "Phiếu");
            xrTableCell10.DataBindings.Add("Text", DataSource, "Tên khách");
        }
Beispiel #9
0
        private void bSuppliersList_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            wrSuppliers.Server2Client sc  = new wrSuppliers.Server2Client();
            wrSuppliers.wsSuppliers   sup = new wrSuppliers.wsSuppliers();
            sc = sup.getSuppliersFull();

            rptSuppliers rpt = new rptSuppliers()
            {
                DataSource = sc.dataTable
            };

            XRSummary tbal = new XRSummary();

            rpt.lbCNM.DataBindings.Add("Text", null, "SupplierName");
            rpt.lbADR.DataBindings.Add("Text", null, "Address");
            rpt.lbPHN.DataBindings.Add("Text", null, "Phone");
            rpt.lbEML.DataBindings.Add("Text", null, "Email");
            rpt.lbBAL.DataBindings.Add("Text", null, "Balance", "{0:C2}");
            rpt.lbTBAL.DataBindings.Add("Text", null, "Balance", "{0:C2}");

            tbal.FormatString  = "{0:C2}";
            tbal.Running       = SummaryRunning.Report;
            rpt.lbTBAL.Summary = tbal;

            dv.PrintingSystem = rpt.PrintingSystem;
            rpt.CreateDocument(true);
        }
Beispiel #10
0
        public rptStokDurumu()
        {
            InitializeComponent();
            NetSatisContext  context        = new NetSatisContext();
            StokDAL          stokDal        = new StokDAL();
            ObjectDataSource stokDataSource = new ObjectDataSource {
                DataSource = stokDal.StokListele(context)
            };

            this.DataSource = stokDataSource;

            colStokKodu.DataBindings.Add("Text", this.DataSource, "StokKodu");
            colStokAdi.DataBindings.Add("Text", this.DataSource, "StokAdi");
            colBirim.DataBindings.Add("Text", this.DataSource, "Birim");
            colSatisKdv.DataBindings.Add("Text", this.DataSource, "SatisKdv");
            colStokGiris.DataBindings.Add("Text", this.DataSource, "StokGiris");
            colStokCikis.DataBindings.Add("Text", this.DataSource, "StokCikis");
            colMevcutStok.DataBindings.Add("Text", this.DataSource, "MevcutStok");


            XRSummary sumStokToplam = new XRSummary();

            sumStokToplam.Func         = SummaryFunc.Sum;
            sumStokToplam.Running      = SummaryRunning.Group;
            sumStokToplam.FormatString = "{0:N2}";

            lblToplamStok.DataBindings.Add("Text", null, "MevcutStok");
            lblToplamStok.Summary = sumStokToplam;
        }
Beispiel #11
0
        public void BindData(DataTable da)
        {
            DataSource = da;

            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();
            XRSummary summarytotal2 = new XRSummary();
            XRSummary summarytotal3 = new XRSummary();

            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell7.DataBindings.Add("Text", DataSource, "Doanh thu", "{0:n0}");
            xrTableCell7.Summary = summarytotal;

            summarytotal2.Running          = SummaryRunning.Report;
            summarytotal2.IgnoreNullValues = true;
            summarytotal2.FormatString     = "{0:n0}";
            xrTableCell10.DataBindings.Add("Text", DataSource, "Chi phí", "{0:n0}");
            xrTableCell10.Summary = summarytotal2;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n0}";
            xrTableCell11.DataBindings.Add("Text", DataSource, "Chênh lệch", "{0:n0}");
            xrTableCell11.Summary = summarytotal1;


            xrTableCell1.DataBindings.Add("Text", DataSource, "Mã kho");
            xrTableCell2.DataBindings.Add("Text", DataSource, "Tên kho");
            xrTableCell9.DataBindings.Add("Text", DataSource, "Doanh thu", "{0:n0}");
            xrTableCell12.DataBindings.Add("Text", DataSource, "Chi phí", "{0:n0}");
            xrTableCell3.DataBindings.Add("Text", DataSource, "Chênh lệch", "{0:n0}");
        }
Beispiel #12
0
        private XtraReport rpt()
        {
            sc   = new wrCustomers.Server2Client();
            cust = new wrCustomers.wsCustomers();
            sc   = cust.getCustomersFull();
            Utils u = new Utils();

            rptCustomers rpt = new rptCustomers()
            {
                DataSource = sc.dataTable
            };

            XRSummary tbal = new XRSummary();

            rpt.lbCNM.DataBindings.Add("Text", null, "CustomerName");
            rpt.lbADR.DataBindings.Add("Text", null, "Address");
            rpt.lbPHN.DataBindings.Add("Text", null, "Phone");
            rpt.lbEML.DataBindings.Add("Text", null, "Email");
            rpt.lbBAL.DataBindings.Add("Text", null, "Balance", "{0:C2}");
            rpt.lbTBAL.DataBindings.Add("Text", null, "Balance", "{0:C2}");

            tbal.FormatString  = "{0:C2}";
            tbal.Running       = SummaryRunning.Report;
            rpt.lbTBAL.Summary = tbal;
            return(rpt);
        }
Beispiel #13
0
        public void BindDatatong(DataTable da)
        {
            DataSource = da;
            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();


            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell20.DataBindings.Add("Text", DataSource, "Số tiền nợ", "{0:n0}");
            xrTableCell20.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n0}";
            xrTableCell21.DataBindings.Add("Text", DataSource, "Số tiền có", "{0:n0}");
            xrTableCell21.Summary = summarytotal1;


            xrTableCell6.DataBindings.Add("Text", DataSource, "Số phiếu");
            xrTableCell16.DataBindings.Add("Text", DataSource, "Tên khách hàng", "{0:dd-MM-yyyy}");
            xrTableCell10.DataBindings.Add("Text", DataSource, "Lý do");
            xrTableCell11.DataBindings.Add("Text", DataSource, "TK nợ");
            xrTableCell12.DataBindings.Add("Text", DataSource, "TK có");
            xrTableCell13.DataBindings.Add("Text", DataSource, "Số tiền nợ", "{0:n0}");
            xrTableCell14.DataBindings.Add("Text", DataSource, "Số tiền có", "{0:n0}");
        }
Beispiel #14
0
        public void BindData(DataTable da)
        {
            DataSource = da;
            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();
            XRSummary summarytotal3 = new XRSummary();

            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell22.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell22.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n2}";
            xrTableCell23.DataBindings.Add("Text", DataSource, "Số lượng quy đổi", "{0:n2}");
            xrTableCell23.Summary = summarytotal1;

            summarytotal3.Running          = SummaryRunning.Report;
            summarytotal3.IgnoreNullValues = true;
            summarytotal3.FormatString     = "{0:n0}";
            xrTableCell24.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
            xrTableCell24.Summary = summarytotal3;

            xrTableCell16.DataBindings.Add("Text", DataSource, "Mã hàng");
            xrTableCell10.DataBindings.Add("Text", DataSource, "Tên hàng");
            xrTableCell11.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell12.DataBindings.Add("Text", DataSource, "Số lượng quy đổi", "{0:n2}");
            xrTableCell13.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
        }
        public rp_personel_iptal_ozet(DateTime tarih1, DateTime tarih2)
        {
            InitializeComponent();
            lbl_tarih.Text = tarih1.Day + "." + tarih1.Month + "." + tarih1.Year + "-" + tarih2.Day + "." + tarih2.Month + "." + tarih2.Year;

            DataTable dt = SQL.get("SELECT * FROM(SELECT ad_soyad = k.ad + ' ' + k.soyad, tutar = (SELECT SUM(ak.miktar * u.fiyat) FROM adisyon_kalem ak INNER JOIN urunler u ON u.urun_id = ak.urun_id WHERE ak.silindi = 1 AND ak.durum_parametre_id != 51 AND ak.kaydeden_kullanici_id = k.kullanici_id AND ak.kayit_tarihi BETWEEN '" + tarih1.ToString("yyyy-MM-dd HH:mm:00.000") + "' AND DATEADD(DAY, 0, '" + tarih2.ToString("yyyy-MM-dd HH:mm:00.000") + "')) FROM kullanicilar k WHERE k.silindi = 0) tbl WHERE tbl.tutar != 0");

            this.DataSource = dt;

            XRBinding binding0 = new XRBinding("Text", this.DataSource, "ad_soyad", "");

            tc_urun.DataBindings.Add(binding0);
            XRBinding binding1 = new XRBinding("Text", this.DataSource, "tutar", "{0:n2}");

            tc_tutar.DataBindings.Add(binding1);

            XRBinding binding6 = new XRBinding("Text", this.DataSource, "tutar", "{0:c2}");

            tc_top_tutar.DataBindings.Add(binding6);
            XRSummary sum2 = new XRSummary(SummaryRunning.Page, SummaryFunc.Sum, "{0:c2}");

            tc_top_tutar.Summary = sum2;

            GroupField sortField = new GroupField("tutar");

            sortField.SortOrder = XRColumnSortOrder.Descending;
            this.Detail.SortFields.Add(sortField);
        }
Beispiel #16
0
        public void BindData(DataTable da)
        {
            DataSource = da;
            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();

            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell13.DataBindings.Add("Text", DataSource, "Thành tiền", "{0:n0}");
            xrTableCell13.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n2}";
            xrTableCell11.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n2}");
            xrTableCell11.Summary = summarytotal1;

            xrTableCell1.DataBindings.Add("Text", DataSource, "STT");
            xrTableCell2.DataBindings.Add("Text", DataSource, "Tên hàng");
            xrTableCell3.DataBindings.Add("Text", DataSource, "ĐVT");
            xrTableCell4.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n2}");
            xrTableCell5.DataBindings.Add("Text", DataSource, "Đơn giá", "{0:n2}");
            xrTableCell6.DataBindings.Add("Text", DataSource, "Thành tiền", "{0:n0}");
            xrTableCell21.DataBindings.Add("Text", DataSource, "Ghi chú");
        }
Beispiel #17
0
        public void BindData(string role)
        {
            DataSource = gen.GetTable("bangkethanhtoan '" + role + "'");
            XRSummary summarytotal1 = new XRSummary();
            XRSummary summarytotal2 = new XRSummary();
            XRSummary summarytotal3 = new XRSummary();

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n0}";
            xrTableCell16.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
            xrTableCell16.Summary = summarytotal1;

            summarytotal2.Running          = SummaryRunning.Report;
            summarytotal2.IgnoreNullValues = true;
            summarytotal2.FormatString     = "{0:n0}";
            xrTableCell17.DataBindings.Add("Text", DataSource, "Thuế", "{0:n0}");
            xrTableCell17.Summary = summarytotal2;

            summarytotal3.Running          = SummaryRunning.Report;
            summarytotal3.IgnoreNullValues = true;
            summarytotal3.FormatString     = "{0:n0}";
            xrTableCell18.DataBindings.Add("Text", DataSource, "Thành tiền", "{0:n0}");
            xrTableCell18.Summary = summarytotal3;

            xrTableCell5.DataBindings.Add("Text", DataSource, "Diễn giải");
            xrTableCell6.DataBindings.Add("Text", DataSource, "Ngày", "{0:dd/MM/yy}");
            xrTableCell8.DataBindings.Add("Text", DataSource, "Số");
            xrTableCell9.DataBindings.Add("Text", DataSource, "Ký hiệu");
            xrTableCell10.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
            xrTableCell11.DataBindings.Add("Text", DataSource, "Thuế", "{0:n0}");
            xrTableCell21.DataBindings.Add("Text", DataSource, "Thành tiền", "{0:n0}");
        }
Beispiel #18
0
        public void BindData(DataTable da)
        {
            DataSource = da;

            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();
            XRSummary summarytotal3 = new XRSummary();
            XRSummary summarytotal4 = new XRSummary();
            XRSummary summarytotal5 = new XRSummary();
            XRSummary summarytotal6 = new XRSummary();
            XRSummary summarytotal7 = new XRSummary();
            XRSummary summarytotal8 = new XRSummary();


            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell27.DataBindings.Add("Text", DataSource, "Nợ đầu kỳ", "{0:n0}");
            xrTableCell27.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n0}";
            xrTableCell28.DataBindings.Add("Text", DataSource, "Có đầu kỳ", "{0:n0}");
            xrTableCell28.Summary = summarytotal1;

            summarytotal3.Running          = SummaryRunning.Report;
            summarytotal3.IgnoreNullValues = true;
            summarytotal3.FormatString     = "{0:n0}";
            xrTableCell29.DataBindings.Add("Text", DataSource, "Nợ phát sinh", "{0:n0}");
            xrTableCell29.Summary = summarytotal3;

            summarytotal4.Running          = SummaryRunning.Report;
            summarytotal4.IgnoreNullValues = true;
            summarytotal4.FormatString     = "{0:n0}";
            xrTableCell30.DataBindings.Add("Text", DataSource, "Có phát sinh", "{0:n0}");
            xrTableCell30.Summary = summarytotal4;

            summarytotal7.Running          = SummaryRunning.Report;
            summarytotal7.IgnoreNullValues = true;
            summarytotal7.FormatString     = "{0:n0}";
            xrTableCell33.DataBindings.Add("Text", DataSource, "Nợ cuối kỳ", "{0:n0}");
            xrTableCell33.Summary = summarytotal7;

            summarytotal8.Running          = SummaryRunning.Report;
            summarytotal8.IgnoreNullValues = true;
            summarytotal8.FormatString     = "{0:n0}";
            xrTableCell34.DataBindings.Add("Text", DataSource, "Có cuối kỳ", "{0:n0}");
            xrTableCell34.Summary = summarytotal8;

            xrTableCell15.DataBindings.Add("Text", DataSource, "Mã khách");
            xrTableCell16.DataBindings.Add("Text", DataSource, "Họ tên khách hàng");
            xrTableCell17.DataBindings.Add("Text", DataSource, "Nợ đầu kỳ", "{0:n0}");
            xrTableCell18.DataBindings.Add("Text", DataSource, "Có đầu kỳ", "{0:n0}");
            xrTableCell19.DataBindings.Add("Text", DataSource, "Nợ phát sinh", "{0:n0}");
            xrTableCell20.DataBindings.Add("Text", DataSource, "Có phát sinh", "{0:n0}");
            xrTableCell23.DataBindings.Add("Text", DataSource, "Nợ cuối kỳ", "{0:n0}");
            xrTableCell24.DataBindings.Add("Text", DataSource, "Có cuối kỳ", "{0:n0}");
        }
Beispiel #19
0
        public void BindData2(DataTable da)
        {
            GroupHeader1.Visible = true;
            xrTable10.Visible    = true;
            xrTable11.Visible    = true;
            xrTableCell18.Text   = "Ghi chú";

            DataSource = da;



            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();
            XRSummary summarytotal3 = new XRSummary();


            Bands.Add(GroupHeader1);
            GroupField groupField = new GroupField("Nhóm");

            GroupHeader1.GroupFields.Add(groupField);
            xrTableCell2.DataBindings.Add("Text", DataSource, "Nhóm");

            xrTableCell4.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            XRSummary summary = new XRSummary();

            summary.Running          = SummaryRunning.Group;
            summary.IgnoreNullValues = true;
            summary.FormatString     = "{0:n0}";
            xrTableCell4.Summary     = summary;

            xrTableCell5.DataBindings.Add("Text", DataSource, "Số lượng quy đổi", "{0:n2}");
            XRSummary summary1 = new XRSummary();

            summary1.Running          = SummaryRunning.Group;
            summary1.IgnoreNullValues = true;
            summary1.FormatString     = "{0:n2}";
            xrTableCell5.Summary      = summary1;



            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell22.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell22.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n2}";
            xrTableCell23.DataBindings.Add("Text", DataSource, "Số lượng quy đổi", "{0:n2}");
            xrTableCell23.Summary = summarytotal1;


            xrTableCell16.DataBindings.Add("Text", DataSource, "Mã hàng");
            xrTableCell10.DataBindings.Add("Text", DataSource, "Tên hàng");
            xrTableCell11.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell12.DataBindings.Add("Text", DataSource, "Số lượng quy đổi", "{0:n2}");
        }
Beispiel #20
0
        public rptStokHareketleri()
        {
            InitializeComponent();

            NetSatisContext context        = new NetSatisContext();
            StokHareketDAL  stokHareketDal = new StokHareketDAL();

            ObjectDataSource datasource = new ObjectDataSource {
                DataSource = stokHareketDal.GetAll(context)
            };

            this.DataSource = datasource;

            colFisKodu.DataBindings.Add("Text", this.DataSource, "FisKodu");
            //colHareket.DataBindings.Add("Text", this.DataSource, "Hareket");
            //colStokKodu.DataBindings.Add("Text", this.DataSource, "StokKodu");
            //colStokAdi.DataBindings.Add("Text", this.DataSource, "StokAdi");
            colSatisKdv.DataBindings.Add("Text", this.DataSource, "Kdv");
            colBirimi.DataBindings.Add("Text", this.DataSource, "Birimi");
            colMiktar.DataBindings.Add("Text", this.DataSource, "Miktar");
            colBirimFiyat.DataBindings.Add("Text", this.DataSource, "BirimFiyati", "{0:C2}");
            colIndirimOrani.DataBindings.Add("Text", this.DataSource, "IndirimOrani");

            CalculatedField calcIndirimTutari = new CalculatedField();

            this.CalculatedFields.Add(calcIndirimTutari);
            calcIndirimTutari.Name       = "IndirimTutar";
            calcIndirimTutari.Expression = "([BirimFiyati]*[Miktar])/100*[IndirimOrani]";

            CalculatedField calcTutar = new CalculatedField();

            this.CalculatedFields.Add(calcTutar);
            calcTutar.Name       = "Tutar";
            calcTutar.Expression = "([BirimFiyati]*[Miktar])-[IndirimTutar]";

            colIndirimTutar.DataBindings.Add("Text", null, "IndirimTutar", "{0:C2}");
            colTutar.DataBindings.Add("Text", null, "Tutar", "{0:C2}");

            XRSummary sumIndirimTutari = new XRSummary();

            sumIndirimTutari.Func         = SummaryFunc.Sum;
            sumIndirimTutari.Running      = SummaryRunning.Group;
            sumIndirimTutari.FormatString = "{0:C2}";

            XRSummary sumToplamTutar = new XRSummary();

            sumToplamTutar.Func         = SummaryFunc.Sum;
            sumToplamTutar.Running      = SummaryRunning.Group;
            sumToplamTutar.FormatString = "{0:C2}";


            lblIndirimTutar.DataBindings.Add("Text", null, "IndirimTutar");
            lblToplamTutar.DataBindings.Add("Text", null, "Tutar");

            lblIndirimTutar.Summary = sumIndirimTutari;
            lblToplamTutar.Summary  = sumToplamTutar;
        }
Beispiel #21
0
        public void BindData(DataTable da)
        {
            DataSource = da;

            Bands.Add(GroupHeader1);
            GroupField groupField = new GroupField("Đơn vị");

            GroupHeader1.GroupFields.Add(groupField);
            xrTableCell43.DataBindings.Add("Text", DataSource, "Đơn vị");

            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();
            XRSummary summarytotal3 = new XRSummary();
            XRSummary summarytotal4 = new XRSummary();
            XRSummary summarytotal5 = new XRSummary();
            XRSummary summarytotal6 = new XRSummary();
            XRSummary summarytotal7 = new XRSummary();
            XRSummary summarytotal8 = new XRSummary();


            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell32.DataBindings.Add("Text", DataSource, "Số quá hạn", "{0:n0}");
            xrTableCell32.Summary = summarytotal;

            /*summarytotal1.Running = SummaryRunning.Report;
             * summarytotal1.IgnoreNullValues = true;
             * summarytotal1.FormatString = "{0:n0}";
             * xrTableCell23.DataBindings.Add("Text", DataSource, "Có đầu kỳ", "{0:n0}");
             * xrTableCell23.Summary = summarytotal1;
             *
             * summarytotal3.Running = SummaryRunning.Report;
             * summarytotal3.IgnoreNullValues = true;
             * summarytotal3.FormatString = "{0:n0}";
             * xrTableCell24.DataBindings.Add("Text", DataSource, "Nợ phát sinh", "{0:n0}");
             * xrTableCell24.Summary = summarytotal3;
             *
             * summarytotal4.Running = SummaryRunning.Report;
             * summarytotal4.IgnoreNullValues = true;
             * summarytotal4.FormatString = "{0:n0}";
             * xrTableCell25.DataBindings.Add("Text", DataSource, "Có phát sinh", "{0:n0}");
             * xrTableCell25.Summary = summarytotal4;*/

            xrTableCell15.DataBindings.Add("Text", DataSource, "Phiếu");
            xrTableCell16.DataBindings.Add("Text", DataSource, "Hóa đơn");
            xrTableCell17.DataBindings.Add("Text", DataSource, "Hạn nợ");
            xrTableCell18.DataBindings.Add("Text", DataSource, "Số tiền nợ", "{0:0,0}");
            xrTableCell19.DataBindings.Add("Text", DataSource, "Ngày nợ", "{0:dd-MM-yyyy}");
            xrTableCell20.DataBindings.Add("Text", DataSource, "Phiếu trả");
            xrTableCell21.DataBindings.Add("Text", DataSource, "Số tiền trả", "{0:0,0}");
            xrTableCell22.DataBindings.Add("Text", DataSource, "Ngày trả", "{0:dd-MM-yyyy}");
            xrTableCell23.DataBindings.Add("Text", DataSource, "Số dư nợ", "{0:0,0}");
            xrTableCell31.DataBindings.Add("Text", DataSource, "Số quá hạn", "{0:0,0}");
            xrTableCell34.DataBindings.Add("Text", DataSource, "Số ngày", "{0:n0}");
        }
Beispiel #22
0
        private void bInvoiceNo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmSelect frm = new frmSelect(false);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                Server2Client sc = new Server2Client();
                string        dt = null;
                if (frm.RetVal == 0)
                {
                    Sales s = new Sales();
                    sc = s.getProfitLoss(frm.DateOn);
                    dt = "Date " + frm.DateOn.ToShortDateString();
                }
                else
                {
                    Sales s = new Sales();
                    sc = s.getProfitLoss(frm.DateFrom, frm.DateTo);
                    dt = "Between " + frm.DateFrom.ToShortDateString() + " and " + frm.DateTo.ToShortDateString();
                }

                rptPL rpt = new rptPL()
                {
                    DataSource = sc.dataTable
                };

                XRSummary gsv = new XRSummary();
                XRSummary gbv = new XRSummary();
                XRSummary gpf = new XRSummary();

                rpt.lbDT.Text = dt;
                rpt.lbSDT.DataBindings.Add("Text", null, "SaleDate", "{0:dd-MM-yyyy}");
                rpt.lbSVL.DataBindings.Add("Text", null, "TotalSellingValue", "{0:C2}");
                rpt.lbBVL.DataBindings.Add("Text", null, "TotalBuyingValue", "{0:C2}");
                rpt.lbPFT.DataBindings.Add("Text", null, "Profit", "{0:C2}");
                rpt.lbGSV.DataBindings.Add("Text", null, "TotalSellingValue", "{0:C2}");
                rpt.lbGBV.DataBindings.Add("Text", null, "TotalBuyingValue", "{0:C2}");
                rpt.lbGPF.DataBindings.Add("Text", null, "Profit", "{0:C2}");

                gsv.FormatString = "{0:C2}";
                gbv.FormatString = "{0:C2}";
                gpf.FormatString = "{0:C2}";


                gsv.Running = SummaryRunning.Report;
                gbv.Running = SummaryRunning.Report;
                gpf.Running = SummaryRunning.Report;

                rpt.lbGSV.Summary = gsv;
                rpt.lbGBV.Summary = gbv;
                rpt.lbGPF.Summary = gpf;

                dv.PrintingSystem = rpt.PrintingSystem;
                rpt.CreateDocument(true);
            }
        }
Beispiel #23
0
        public void BindData(DataTable da)
        {
            DataSource = da;

            XRSummary summarytotal   = new XRSummary();
            XRSummary summarytotal1  = new XRSummary();
            XRSummary summarytotal3  = new XRSummary();
            XRSummary summarytotal4  = new XRSummary();
            XRSummary summarytotal5  = new XRSummary();
            XRSummary summarytotal6  = new XRSummary();
            XRSummary summarytotal7  = new XRSummary();
            XRSummary summarytotal8  = new XRSummary();
            XRSummary summarytotal9  = new XRSummary();
            XRSummary summarytotal10 = new XRSummary();


            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell31.DataBindings.Add("Text", DataSource, "Thép", "{0:n0}");
            xrTableCell31.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n0}";
            xrTableCell32.DataBindings.Add("Text", DataSource, "Xi măng", "{0:n0}");
            xrTableCell32.Summary = summarytotal1;

            summarytotal3.Running          = SummaryRunning.Report;
            summarytotal3.IgnoreNullValues = true;
            summarytotal3.FormatString     = "{0:n0}";
            xrTableCell33.DataBindings.Add("Text", DataSource, "Cát", "{0:n0}");
            xrTableCell33.Summary = summarytotal3;

            summarytotal4.Running          = SummaryRunning.Report;
            summarytotal4.IgnoreNullValues = true;
            summarytotal4.FormatString     = "{0:n0}";
            xrTableCell34.DataBindings.Add("Text", DataSource, "Đá", "{0:n0}");
            xrTableCell34.Summary = summarytotal4;

            summarytotal5.Running          = SummaryRunning.Report;
            summarytotal5.IgnoreNullValues = true;
            summarytotal5.FormatString     = "{0:n0}";
            xrTableCell35.DataBindings.Add("Text", DataSource, "Gạch", "{0:n0}");
            xrTableCell35.Summary = summarytotal5;


            xrTableCell7.DataBindings.Add("Text", DataSource, "STT");
            xrTableCell8.DataBindings.Add("Text", DataSource, "Mã khách");
            xrTableCell13.DataBindings.Add("Text", DataSource, "Tên khách");
            xrTableCell14.DataBindings.Add("Text", DataSource, "Thép", "{0:n0}");
            xrTableCell15.DataBindings.Add("Text", DataSource, "Xi măng", "{0:n0}");
            xrTableCell16.DataBindings.Add("Text", DataSource, "Cát", "{0:n0}");
            xrTableCell17.DataBindings.Add("Text", DataSource, "Đá", "{0:n0}");
            xrTableCell18.DataBindings.Add("Text", DataSource, "Gạch", "{0:n0}");
        }
Beispiel #24
0
        private void bCreditPayment_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmSelectCustomer frm = new frmSelectCustomer();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                wrCustomers.Server2Client sc  = new wrCustomers.Server2Client();
                wrCustomers.wsCustomers   cus = new wrCustomers.wsCustomers();
                wrCustomers.Customer      c   = new wrCustomers.Customer();

                double bal = 0;
                c = cus.getCustomer(frm.CustomerID);
                rptCreditPayment rpt = new rptCreditPayment();

                XRSummary tdr = new XRSummary();
                XRSummary tcr = new XRSummary();

                rpt.lbCNM.Text = c.CustomerName;
                rpt.lbADR.Text = c.Address;
                rpt.lbPHN.Text = c.Phone;
                rpt.lbEML.Text = c.Email;

                if (!frm.DateSelected)
                {
                    sc             = cus.getCustomerBalanceByID(frm.CustomerID);
                    bal            = sc.Value;
                    sc             = cus.getTransactionDetails(frm.CustomerID);
                    rpt.DataSource = sc.dataTable;
                }
                else
                {
                    sc  = cus.getCustomerBalanceByDates(frm.CustomerID, frm.DateFrom, frm.DateTo);
                    bal = sc.Value;
                    //DataTable dt = cus.AccountStatement(frm.CustomerID, frm.DateFrom, frm.DateTo).dataTable;
                    sc             = cus.AccountStatement(frm.CustomerID, frm.DateFrom, frm.DateTo);
                    rpt.DataSource = sc.dataTable;
                }
                rpt.lbTDT.DataBindings.Add("Text", null, "TransDate", "{0:dd-MM-yyyy}");
                rpt.lbRMK.DataBindings.Add("Text", null, "Description");
                rpt.lbTDR.DataBindings.Add("Text", null, "Debit", "{0:c}");
                rpt.lbTCR.DataBindings.Add("Text", null, "Credit", "{0:c}");
                rpt.lbBAL.DataBindings.Add("Text", null, "Balance", "{0:c}");
                rpt.lblTDR.DataBindings.Add("Text", null, "Debit", "{0:C2}");
                rpt.lblTCR.DataBindings.Add("Text", null, "Credit", "{0:C2}");
                rpt.lblTBL.Text    = bal.ToString("c2");
                tdr.FormatString   = "{0:C2}";
                tcr.FormatString   = "{0:C2}";
                tdr.Running        = SummaryRunning.Report;
                tcr.Running        = SummaryRunning.Report;
                rpt.lblTCR.Summary = tdr;
                rpt.lblTDR.Summary = tcr;

                dv.PrintingSystem = rpt.PrintingSystem;
                rpt.CreateDocument(true);
            }
        }
Beispiel #25
0
        public void BindDatahoadon(DataTable da)
        {
            DataSource           = da;
            GroupHeader2.Visible = false;
            Bands.Add(GroupHeader1);
            GroupField groupField = new GroupField("Mã nhóm");

            GroupHeader1.GroupFields.Add(groupField);
            xrTableCell4.DataBindings.Add("Text", DataSource, "Mã nhóm");
            xrTableCell5.DataBindings.Add("Text", DataSource, "Tên nhóm");
            xrTableCell27.DataBindings.Add("Text", DataSource, "Ghi chú", "{0:dd/MM/yyyy}");

            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();
            XRSummary summarytotal2 = new XRSummary();
            XRSummary summarytotal3 = new XRSummary();
            XRSummary summarytotal4 = new XRSummary();
            XRSummary summarytotal5 = new XRSummary();


            summarytotal3.Running          = SummaryRunning.Group;
            summarytotal3.IgnoreNullValues = true;
            summarytotal3.FormatString     = "{0:n0}";
            xrTableCell13.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell13.Summary = summarytotal3;

            summarytotal5.Running          = SummaryRunning.Group;
            summarytotal5.IgnoreNullValues = true;
            summarytotal5.FormatString     = "{0:n0}";
            xrTableCell19.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
            xrTableCell19.Summary = summarytotal5;



            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell7.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell7.Summary = summarytotal;


            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n0}";
            xrTableCell11.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
            xrTableCell11.Summary = summarytotal1;


            xrTableCell1.DataBindings.Add("Text", DataSource, "Mã hàng");
            xrTableCell2.DataBindings.Add("Text", DataSource, "Tên hàng");
            xrTableCell9.DataBindings.Add("Text", DataSource, "Số lượng", "{0:n0}");
            xrTableCell12.DataBindings.Add("Text", DataSource, "Số lượng quy đổi", "{0:n2}");
            xrTableCell3.DataBindings.Add("Text", DataSource, "Số tiền", "{0:n0}");
        }
Beispiel #26
0
        public void gettieudetheokho(string ngaychungtu, string donvi)
        {
            xrLabel2.Text      = "SỔ QUỸ TIỀN MẶT";
            xrTableCell39.Text = "Trưởng đơn vị";
            xrLabel1.Text      = gen.GetString("select Top 1 CompanyName from Center");
            xrLabel5.Text      = "ĐƠN VỊ " + gen.GetString("select StockCode+' - '+StockName from Stock where StockID='" + donvi + "'");
            xrLabel7.Text      = "Ngày " + String.Format("{0:dd/MM/yyyy}", DateTime.Parse(ngaychungtu));
            xrLabel9.Text      = "In lúc: " + String.Format("{0:HH:mm:ss}", DateTime.Now) + " ngày: " + String.Format("{0:dd-MM-yyyy}", DateTime.Now);
            xrLabel8.Text      = "In lúc: " + String.Format("{0:HH:mm:ss}", DateTime.Now) + " ngày: " + String.Format("{0:dd-MM-yyyy}", DateTime.Now);

            DataTable da = gen.GetTable("select substring(RefNo,4,12) as 'Số phiếu',AccountingObjectName as 'Tên khách hàng',a.JournalMemo as 'Lý do',case when DebitAccount<>'1111' then DebitAccount end as 'TK nợ',case when CreditAccount<>'1111' then CreditAccount end as 'TK có', case when DebitAccount='1111' then Amount end as 'Số tiền nợ',case when CreditAccount='1111' then Amount end as 'Số tiền có'  from HACHTOAN a, AccountingObject b where a.AccountingObjectIDMain=b.AccountingObjectID and (CreditAccount='1111' or DebitAccount='1111') and CAST(RefDate as date)='" + DateTime.Parse(ngaychungtu).ToShortDateString() + "' and Goods ='" + donvi + "' order by DebitAccount,RefNo");

            DataSource = da;
            XRSummary summarytotal  = new XRSummary();
            XRSummary summarytotal1 = new XRSummary();


            summarytotal.Running          = SummaryRunning.Report;
            summarytotal.IgnoreNullValues = true;
            summarytotal.FormatString     = "{0:n0}";
            xrTableCell20.DataBindings.Add("Text", DataSource, "Số tiền nợ", "{0:n0}");
            xrTableCell20.Summary = summarytotal;

            summarytotal1.Running          = SummaryRunning.Report;
            summarytotal1.IgnoreNullValues = true;
            summarytotal1.FormatString     = "{0:n0}";
            xrTableCell21.DataBindings.Add("Text", DataSource, "Số tiền có", "{0:n0}");
            xrTableCell21.Summary = summarytotal1;


            xrTableCell6.DataBindings.Add("Text", DataSource, "Số phiếu");
            xrTableCell16.DataBindings.Add("Text", DataSource, "Tên khách hàng");
            xrTableCell10.DataBindings.Add("Text", DataSource, "Lý do");
            xrTableCell11.DataBindings.Add("Text", DataSource, "TK nợ");
            xrTableCell12.DataBindings.Add("Text", DataSource, "TK có");
            xrTableCell13.DataBindings.Add("Text", DataSource, "Số tiền nợ", "{0:n0}");
            xrTableCell14.DataBindings.Add("Text", DataSource, "Số tiền có", "{0:n0}");

            Double Tonquy = 0;

            try
            {
                Tonquy = Double.Parse(gen.GetString("select COALESCE(SUM(TKNo),0) - COALESCE(SUM(TKCo),0) from (select case when DebitAccount='1111' then Amount end as 'TKNo', case when CreditAccount='1111' then Amount end as 'TKCo' from HACHTOAN a, AccountingObject b where a.AccountingObjectID=b.AccountingObjectID and (CreditAccount='1111' or DebitAccount='1111') and RefDate<'" + DateTime.Parse(ngaychungtu).ToShortDateString() + "' and Goods ='" + donvi + "') a"));
            }
            catch { }
            xrTableCell8.Text = String.Format("{0:n0}", Tonquy);
            Tonquy            = 0;
            try
            {
                Tonquy = Double.Parse(gen.GetString("select COALESCE(SUM(TKNo),0) - COALESCE(SUM(TKCo),0) from (select case when DebitAccount='1111' then Amount end as 'TKNo', case when CreditAccount='1111' then Amount end as 'TKCo' from HACHTOAN a, AccountingObject b where a.AccountingObjectID=b.AccountingObjectID and (CreditAccount='1111' or DebitAccount='1111') and RefDate<'" + DateTime.Parse(ngaychungtu).AddDays(1).ToShortDateString() + "' and Goods ='" + donvi + "') a"));
            }
            catch { }
            xrTableCell9.Text = String.Format("{0:n0}", Tonquy);
        }
Beispiel #27
0
    {//STOK GİRİŞ VEYA ÇIKIŞ OLARAK FİŞ TUTARLARINI LİSTEYEN RAPOR
        public rptUrunBazliStokHareketleri()
        {
            InitializeComponent();
            BenimSalonumContext context = new BenimSalonumContext();

            StokHareketDAL stokHareketDal = new StokHareketDAL();

            ObjectDataSource stokDataSource = new ObjectDataSource {
                DataSource = stokHareketDal.GetALL(context)
            };

            this.DataSource = stokDataSource;

            colFisKodu.DataBindings.Add("Text", this.DataAdapter, "FisKodu");
            colHareket.DataBindings.Add("Text", this.DataAdapter, "Hareket");
            colBirimFiyat.DataBindings.Add("Text", this.DataAdapter, "BirimFiyati");
            colMiktar.DataBindings.Add("Text", this.DataAdapter, "Miktar", "{0:C2}");
            colKdv.DataBindings.Add("Text", this.DataAdapter, "Kdv", "{0:'%'0}");
            colIndirim.DataBindings.Add("Text", this.DataAdapter, "IndirimOrani", "{0:'%'0}");

            CalculatedField calcIndirimtutari = new CalculatedField();

            this.CalculatedFields.Add(calcIndirimtutari);
            calcIndirimtutari.Name       = "IndirimTutari";
            calcIndirimtutari.Expression = "(([BirimFiyati]*[Miktar])/100)*[IndirimOrani]";

            CalculatedField calcTutar = new CalculatedField();

            this.CalculatedFields.Add(calcTutar);
            calcTutar.Name       = "Tutar";
            calcTutar.Expression = "(([BirimFiyati]*[Miktar])-[IndirimTutari])";

            colIndirimTutari.DataBindings.Add("Text", null, "IndirimTutari", "{0:C2}");
            colToplamTutar.DataBindings.Add("Text", null, "Tutar", "{0:C2}");

            XRSummary sumIndirimTutari = new XRSummary();

            sumIndirimTutari.Func         = SummaryFunc.Sum;
            sumIndirimTutari.Running      = SummaryRunning.Group;
            sumIndirimTutari.FormatString = "{0:C2}";

            XRSummary sumToplamTutar = new XRSummary();

            sumToplamTutar.Func         = SummaryFunc.Sum;
            sumToplamTutar.Running      = SummaryRunning.Group;
            sumToplamTutar.FormatString = "{0:C2}";

            lblToplamIndirim.Summary = sumIndirimTutari;
            lblGenelToplam.Summary   = sumToplamTutar;

            lblToplamIndirim.DataBindings.Add("Text", null, "IndirimTutari");
            lblGenelToplam.DataBindings.Add("Text", null, "Tutar");
        }
Beispiel #28
0
        private void sumsaler_BeforePrint(object sender, PrintEventArgs e)
        {
            this.string_0           = string.Concat(new object[] { "SELECT DISTINCT ptr.user_id, tblUser.name, SUM(CASE ptr.trans_code WHEN '01' THEN ptr.amount ELSE 0 END) AS rtamount, COUNT(ptr.trans_num) AS ctrannum, SUM(CASE ptr.trans_code WHEN '00' THEN ptr.amount ELSE 0 END) AS amount, SUM(ptr.discount) AS discount, ptr.Status, tblStations.name AS station FROM tblTransaction AS ptr INNER JOIN tblUser ON ptr.user_id = tblUser.ID INNER JOIN  tblStations ON ptr.station = tblStations.id WHERE ptr.status = 1 AND ptr.trans_code IN('00','01') AND ( ptr.tran_date between  '", Class7.dateTimeFrom, "' and '", Class7.dateTimeTo, "') GROUP BY ptr.user_id, tblUser.name,ptr.status, tblStations.name " });
            this.oleDbDataAdapter_0 = new OleDbDataAdapter(this.string_0, this.oleDbConnection_0);
            using (DataSet set = new DataSet())
            {
                this.oleDbDataAdapter_0.Fill(set);
                this.oleDbConnection_0.Close();
                base.DataAdapter = this.oleDbDataAdapter_0;
                base.DataSource  = set.Tables[0];
            }
            this.xrtableCell_4.DataBindings.Add("Text", base.DataSource, "amount", "{0:n2}");
            this.xrtableCell_3.DataBindings.Add("Text", base.DataSource, "discount", "{0:n2}");
            this.xrtableCell_14.DataBindings.Add("Text", base.DataSource, "ctrannum", "{0:n0}");
            this.xrtableCell_17.DataBindings.Add("Text", base.DataSource, "station", "");
            this.xrtableCell_1.DataBindings.Add("Text", base.DataSource, "name", "");
            this.xrtableCell_0.DataBindings.Add("Text", base.DataSource, "user_id", "{0:n0}");
            this.xrtableCell_2.DataBindings.Add("Text", base.DataSource, "rtamount", "{0:n2}");
            XRSummary summary = new XRSummary();

            this.xrtableCell_8.DataBindings.Add("Text", base.DataSource, "amount", "{0:n2}");
            summary.Running            = SummaryRunning.Report;
            summary.FormatString       = "{0:n2}";
            this.xrtableCell_8.Summary = summary;
            XRSummary summary2 = new XRSummary();

            this.xrtableCell_7.DataBindings.Add("Text", base.DataSource, "discount", "{0:n2}");
            summary2.Running           = SummaryRunning.Report;
            summary2.FormatString      = "{0:n2}";
            this.xrtableCell_7.Summary = summary2;
            XRSummary summary3 = new XRSummary();

            this.xrtableCell_6.DataBindings.Add("Text", base.DataSource, "rtamount", "{0:n2}");
            summary3.Running           = SummaryRunning.Report;
            summary3.FormatString      = "{0:n2}";
            this.xrtableCell_6.Summary = summary3;
            XRSummary summary4 = new XRSummary();

            this.xrtableCell_16.DataBindings.Add("Text", base.DataSource, "ctrannum", "{0:n0}");
            summary4.Running            = SummaryRunning.Report;
            summary4.FormatString       = "{0:n0}";
            this.xrtableCell_16.Summary = summary4;
            this.xrlabel_6.Text         = Class13.smethod_1(Class7.smethod_14("m_name").ToString(), Class13.string_0);
            this.xrlabel_5.Text         = Class13.smethod_1(Class7.smethod_14("m_address").ToString(), Class13.string_0);
            this.xrlabel_2.Text         = Class13.smethod_1(Class7.smethod_14("m_phone").ToString(), Class13.string_0);
            this.xrlabel_0.Text         = Class13.smethod_1(Class7.smethod_14("m_vatnum").ToString(), Class13.string_0);
            this.xrlabel_8.Text         = Class6.string_10.ToUpper();
            string str  = string.Format("{0:dd/MM/yyyy}", Class7.dateTimeFrom);
            string str2 = string.Format("{0:dd/MM/yyyy}", Class7.dateTimeTo);

            this.xrlabel_7.Text = (Class7.dateTimeFrom == Class7.dateTimeTo) ? ("Trong ng\x00e0y " + str) : ("Từ ng\x00e0y :" + str + " đến ng\x00e0y :" + str2);
        }
Beispiel #29
0
        public rp_personel_ikram(DateTime tarih1, DateTime tarih2)
        {
            InitializeComponent();

            lbl_tarih.Text = tarih1.Day + "." + tarih1.Month + "." + tarih1.Year + "-" + tarih2.Day + "." + tarih2.Month + "." + tarih2.Year;
            DataTable dt = SQL.get("SELECT ad_soyad = k.ad + ' ' + k.soyad, u.urun_adi, miktar = SUM(ak.ikram_miktar), tutar = SUM(ak.ikram_miktar * u.fiyat), p.deger FROM kullanicilar k LEFT OUTER JOIN adisyon_kalem ak ON ak.silindi = 0 AND ak.kayit_tarihi BETWEEN '" + tarih1.ToString("yyyy-MM-dd HH:mm:00.000") + "' AND DATEADD(DAY, 0, '" + tarih2.ToString("yyyy-MM-dd HH:mm:00.000") + "') AND ak.ikram != 0 AND ak.kaydeden_kullanici_id = k.kullanici_id INNER JOIN urunler u ON u.urun_id = ak.urun_id LEFT OUTER JOIN parametreler p ON p.parametre_id = ak.ikram " +
                                   " WHERE k.silindi = 0 " +
                                   " GROUP by k.ad, k.soyad, u.urun_adi, p.deger");

            this.DataSource = dt;

            XRBinding binding0 = new XRBinding("Text", this.DataSource, "ad_soyad", "");

            lbl_personel.DataBindings.Add(binding0);
            XRBinding binding1 = new XRBinding("Text", this.DataSource, "deger", "");

            lbl_deger.DataBindings.Add(binding1);
            XRBinding binding2 = new XRBinding("Text", this.DataSource, "urun_adi", "");

            tc_urun.DataBindings.Add(binding2);
            XRBinding binding3 = new XRBinding("Text", this.DataSource, "miktar", "{0:n2}");

            tc_miktar.DataBindings.Add(binding3);
            XRBinding binding4 = new XRBinding("Text", this.DataSource, "tutar", "{0:c2}");

            tc_tutar.DataBindings.Add(binding4);

            XRBinding binding5 = new XRBinding("Text", this.DataSource, "miktar", "{0:c2}");

            tc_top_miktar.DataBindings.Add(binding5);
            XRSummary sum1 = new XRSummary(SummaryRunning.Group, SummaryFunc.Sum, "{0:c2}");

            tc_top_miktar.Summary = sum1;
            XRBinding binding6 = new XRBinding("Text", this.DataSource, "tutar", "{0:c2}");

            tc_top_tutar.DataBindings.Add(binding6);
            XRSummary sum2 = new XRSummary(SummaryRunning.Group, SummaryFunc.Sum, "{0:c2}");

            tc_top_tutar.Summary = sum2;

            GroupField sortField = new GroupField("tutar");

            sortField.SortOrder = XRColumnSortOrder.Descending;
            this.Detail.SortFields.Add(sortField);

            GroupField groupField = new GroupField("ad_soyad");

            GroupHeader2.GroupFields.Add(groupField);
            GroupField groupField1 = new GroupField("deger");

            GroupHeader1.GroupFields.Add(groupField1);
        }
Beispiel #30
0
 public voucher_1()
 {
     Class17.smethod_0();
     this.icontainer_0      = null;
     this.oleDbConnection_0 = new OleDbConnection(Class7.string_5);
     this.string_0          = null;
     this.ecgIrJiEyW        = new XRSummary();
     this.xrsummary_0       = new XRSummary();
     this.xrsummary_1       = new XRSummary();
     this.double_0          = 0.0;
     this.double_1          = 0.0;
     this.method_0();
 }
Beispiel #31
0
        private void InitializeComponent()
        {
            XRSummary xrSummary1 = new XRSummary();
            XRSummary xrSummary2 = new XRSummary();
            Detail = new DetailBand();
            xrLabel21 = new XRLabel();
            xrLabel20 = new XRLabel();
            xrLabel19 = new XRLabel();
            xrLabel18 = new XRLabel();
            xrLabel26 = new XRLabel();
            TopMargin = new TopMarginBand();
            labelcompany = new XRLabel();
            xrLabel1 = new XRLabel();
            BottomMargin = new BottomMarginBand();
            xrLabel2 = new XRLabel();
            xrLabel3 = new XRLabel();
            xrLabel4 = new XRLabel();
            xrLabel5 = new XRLabel();
            PageHeader = new PageHeaderBand();
            xrLine2 = new XRLine();
            xrLine1 = new XRLine();
            xrLabel32 = new XRLabel();
            lbldoctor = new XRLabel();
            xrLabel23 = new XRLabel();
            xrLabel22 = new XRLabel();
            xrLabel15 = new XRLabel();
            xrLabel29 = new XRLabel();
            xrLabel30 = new XRLabel();
            xrLabel31 = new XRLabel();
            xrLabel16 = new XRLabel();
            xrLabel17 = new XRLabel();
            xrLabel10 = new XRLabel();
            xrLabel9 = new XRLabel();
            xrLabel6 = new XRLabel();
            xrLabel8 = new XRLabel();
            xrLabel7 = new XRLabel();
            ReportFooter = new ReportFooterBand();
            xrLine3 = new XRLine();
            xrLabel34 = new XRLabel();
            xrLabel33 = new XRLabel();
            patdisc = new XRLabel();
            compdiscamt = new XRLabel();
            xrLabel25 = new XRLabel();
            lbldiscount = new XRLabel();
            xrLabel13 = new XRLabel();
            lblpatshare = new XRLabel();
            xrLabel11 = new XRLabel();
            xrLabel24 = new XRLabel();
            xrCrossBandBox1 = new XRCrossBandBox();
            ((ISupportInitialize)(this)).BeginInit();
            // 
            // Detail
            // 
            Detail.Controls.AddRange(new XRControl[] {
            xrLabel21,
            xrLabel20,
            xrLabel19,
            xrLabel18,
            xrLabel26});
            Detail.HeightF = 20F;
            Detail.KeepTogether = true;
            Detail.Name = "Detail";
            Detail.Padding = new PaddingInfo(0, 0, 0, 0, 100F);
            Detail.TextAlignment = TextAlignment.TopLeft;
            // 
            // xrLabel21
            // 
            xrLabel21.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.LINETOTAL", "{0:n2}")});
            xrLabel21.LocationFloat = new PointFloat(625.0834F, 0F);
            xrLabel21.Name = "xrLabel21";
            xrLabel21.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel21.SizeF = new SizeF(72.91669F, 20F);
            xrLabel21.StylePriority.UseTextAlignment = false;
            xrLabel21.Text = "xrLabel21";
            xrLabel21.TextAlignment = TextAlignment.MiddleRight;
            // 
            // xrLabel20
            // 
            xrLabel20.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.INVRATE", "{0:n2}")});
            xrLabel20.LocationFloat = new PointFloat(566.1246F, 0F);
            xrLabel20.Name = "xrLabel20";
            xrLabel20.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel20.SizeF = new SizeF(54.16656F, 20F);
            xrLabel20.StylePriority.UseTextAlignment = false;
            xrLabel20.Text = "xrLabel20";
            xrLabel20.TextAlignment = TextAlignment.MiddleRight;
            // 
            // xrLabel19
            // 
            xrLabel19.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.QTY", "{0:#,#}")});
            xrLabel19.LocationFloat = new PointFloat(515.2913F, 0F);
            xrLabel19.Name = "xrLabel19";
            xrLabel19.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel19.SizeF = new SizeF(46.62515F, 20F);
            xrLabel19.StylePriority.UseTextAlignment = false;
            xrLabel19.Text = "[SalesInvList.QTY]";
            xrLabel19.TextAlignment = TextAlignment.MiddleCenter;
            // 
            // xrLabel18
            // 
            xrLabel18.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.ITEMNAME")});
            xrLabel18.LocationFloat = new PointFloat(31.54163F, 0F);
            xrLabel18.Name = "xrLabel18";
            xrLabel18.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel18.SizeF = new SizeF(470.0833F, 20F);
            xrLabel18.StylePriority.UseTextAlignment = false;
            xrLabel18.Text = "xrLabel18";
            xrLabel18.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel26
            // 
            xrLabel26.LocationFloat = new PointFloat(2.083333F, 0F);
            xrLabel26.Name = "xrLabel26";
            xrLabel26.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel26.SizeF = new SizeF(26.33333F, 20F);
            xrLabel26.StylePriority.UseTextAlignment = false;
            xrSummary1.Func = SummaryFunc.RecordNumber;
            xrSummary1.Running = SummaryRunning.Report;
            xrLabel26.Summary = xrSummary1;
            xrLabel26.Text = "xrLabel26";
            xrLabel26.TextAlignment = TextAlignment.MiddleCenter;
            // 
            // TopMargin
            // 
            TopMargin.Controls.AddRange(new XRControl[] {
            labelcompany,
            xrLabel1});
            TopMargin.HeightF = 69F;
            TopMargin.Name = "TopMargin";
            TopMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100F);
            TopMargin.TextAlignment = TextAlignment.TopLeft;
            // 
            // labelcompany
            // 
            labelcompany.Font = new Font("Tahoma", 12F, FontStyle.Bold);
            labelcompany.LocationFloat = new PointFloat(85.41666F, 15.25F);
            labelcompany.Name = "labelcompany";
            labelcompany.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            labelcompany.SizeF = new SizeF(534.8745F, 25.5F);
            labelcompany.StylePriority.UseFont = false;
            labelcompany.StylePriority.UseTextAlignment = false;
            labelcompany.Text = "labelcompany";
            labelcompany.TextAlignment = TextAlignment.MiddleCenter;
            // 
            // xrLabel1
            // 
            xrLabel1.Borders = ((BorderSide.Left | BorderSide.Top) 
                                | BorderSide.Right) 
                               | BorderSide.Bottom;
            xrLabel1.Font = new Font("Tahoma", 9.75F, FontStyle.Bold, GraphicsUnit.Point, 0);
            xrLabel1.LocationFloat = new PointFloat(256.1667F, 43.75F);
            xrLabel1.Name = "xrLabel1";
            xrLabel1.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel1.SizeF = new SizeF(182.7082F, 23.75F);
            xrLabel1.StylePriority.UseBorders = false;
            xrLabel1.StylePriority.UseFont = false;
            xrLabel1.StylePriority.UseTextAlignment = false;
            xrLabel1.Text = "Sales Invoice";
            xrLabel1.TextAlignment = TextAlignment.MiddleCenter;
            // 
            // BottomMargin
            // 
            BottomMargin.HeightF = 25F;
            BottomMargin.Name = "BottomMargin";
            BottomMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100F);
            BottomMargin.TextAlignment = TextAlignment.TopLeft;
            // 
            // xrLabel2
            // 
            xrLabel2.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel2.LocationFloat = new PointFloat(455.6246F, 6F);
            xrLabel2.Name = "xrLabel2";
            xrLabel2.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel2.SizeF = new SizeF(87.5F, 18F);
            xrLabel2.StylePriority.UseFont = false;
            xrLabel2.StylePriority.UseTextAlignment = false;
            xrLabel2.Text = "Invoice No. :";
            xrLabel2.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel3
            // 
            xrLabel3.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel3.LocationFloat = new PointFloat(455.6246F, 30.00002F);
            xrLabel3.Name = "xrLabel3";
            xrLabel3.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel3.SizeF = new SizeF(87.5F, 18F);
            xrLabel3.StylePriority.UseFont = false;
            xrLabel3.StylePriority.UseTextAlignment = false;
            xrLabel3.Text = "Date :";
            xrLabel3.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel4
            // 
            xrLabel4.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel4.LocationFloat = new PointFloat(5.124998F, 6.00001F);
            xrLabel4.Name = "xrLabel4";
            xrLabel4.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel4.SizeF = new SizeF(129.4583F, 18F);
            xrLabel4.StylePriority.UseFont = false;
            xrLabel4.StylePriority.UseTextAlignment = false;
            xrLabel4.Text = "Customer name :";
            xrLabel4.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel5
            // 
            xrLabel5.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel5.LocationFloat = new PointFloat(5.000003F, 30.00002F);
            xrLabel5.Name = "xrLabel5";
            xrLabel5.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel5.SizeF = new SizeF(129.5833F, 18F);
            xrLabel5.StylePriority.UseFont = false;
            xrLabel5.StylePriority.UseTextAlignment = false;
            xrLabel5.Text = "Doctor :";
            xrLabel5.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // PageHeader
            // 
            PageHeader.Controls.AddRange(new XRControl[] {
            xrLine2,
            xrLine1,
            xrLabel32,
            lbldoctor,
            xrLabel23,
            xrLabel22,
            xrLabel4,
            xrLabel15,
            xrLabel5,
            xrLabel29,
            xrLabel30,
            xrLabel31,
            xrLabel3,
            xrLabel2,
            xrLabel16,
            xrLabel17,
            xrLabel10,
            xrLabel9,
            xrLabel6,
            xrLabel8,
            xrLabel7});
            PageHeader.HeightF = 112.4167F;
            PageHeader.Name = "PageHeader";
            // 
            // xrLine2
            // 
            xrLine2.LocationFloat = new PointFloat(3.208333F, 110.4167F);
            xrLine2.Name = "xrLine2";
            xrLine2.SizeF = new SizeF(700.6667F, 2F);
            // 
            // xrLine1
            // 
            xrLine1.LocationFloat = new PointFloat(3.333333F, 86.54166F);
            xrLine1.Name = "xrLine1";
            xrLine1.SizeF = new SizeF(699.3334F, 2F);
            // 
            // xrLabel32
            // 
            xrLabel32.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.CARDNO")});
            xrLabel32.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel32.LocationFloat = new PointFloat(543.1246F, 54.00003F);
            xrLabel32.Name = "xrLabel32";
            xrLabel32.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel32.SizeF = new SizeF(154.9586F, 18F);
            xrLabel32.StylePriority.UseFont = false;
            xrLabel32.StylePriority.UseTextAlignment = false;
            xrLabel32.Text = "xrLabel32";
            xrLabel32.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // lbldoctor
            // 
            lbldoctor.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            lbldoctor.LocationFloat = new PointFloat(134.5833F, 30F);
            lbldoctor.Name = "lbldoctor";
            lbldoctor.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            lbldoctor.SizeF = new SizeF(291.6667F, 18F);
            lbldoctor.StylePriority.UseFont = false;
            lbldoctor.StylePriority.UseTextAlignment = false;
            lbldoctor.Text = "lbldoctorname";
            lbldoctor.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel23
            // 
            xrLabel23.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.GRADE")});
            xrLabel23.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel23.LocationFloat = new PointFloat(327.3748F, 54.00003F);
            xrLabel23.Name = "xrLabel23";
            xrLabel23.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel23.SizeF = new SizeF(122.2498F, 18F);
            xrLabel23.StylePriority.UseFont = false;
            xrLabel23.StylePriority.UseTextAlignment = false;
            xrLabel23.Text = "xrLabel23";
            xrLabel23.TextAlignment = TextAlignment.MiddleLeft;
            xrLabel23.Visible = false;
            // 
            // xrLabel22
            // 
            xrLabel22.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.CARDID")});
            xrLabel22.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel22.LocationFloat = new PointFloat(134.5833F, 54.00001F);
            xrLabel22.Name = "xrLabel22";
            xrLabel22.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel22.SizeF = new SizeF(142.9167F, 18F);
            xrLabel22.StylePriority.UseFont = false;
            xrLabel22.StylePriority.UseTextAlignment = false;
            xrLabel22.Text = "xrLabel22";
            xrLabel22.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel15
            // 
            xrLabel15.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.CUSTNAME")});
            xrLabel15.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel15.LocationFloat = new PointFloat(134.5833F, 5.999994F);
            xrLabel15.Name = "xrLabel15";
            xrLabel15.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel15.SizeF = new SizeF(291.6667F, 18F);
            xrLabel15.StylePriority.UseFont = false;
            xrLabel15.StylePriority.UseTextAlignment = false;
            xrLabel15.Text = "xrLabel15";
            xrLabel15.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel29
            // 
            xrLabel29.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel29.LocationFloat = new PointFloat(455.6246F, 54.00003F);
            xrLabel29.Name = "xrLabel29";
            xrLabel29.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel29.SizeF = new SizeF(87.5F, 18F);
            xrLabel29.StylePriority.UseFont = false;
            xrLabel29.StylePriority.UseTextAlignment = false;
            xrLabel29.Text = "Policy No. :";
            xrLabel29.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel30
            // 
            xrLabel30.Font = new Font("Tahoma", 9.75F);
            xrLabel30.LocationFloat = new PointFloat(280.5832F, 54.00003F);
            xrLabel30.Name = "xrLabel30";
            xrLabel30.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel30.SizeF = new SizeF(46.79153F, 18F);
            xrLabel30.StylePriority.UseFont = false;
            xrLabel30.StylePriority.UseTextAlignment = false;
            xrLabel30.Text = "Class :";
            xrLabel30.TextAlignment = TextAlignment.MiddleLeft;
            xrLabel30.Visible = false;
            // 
            // xrLabel31
            // 
            xrLabel31.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel31.LocationFloat = new PointFloat(4.166667F, 54.00003F);
            xrLabel31.Name = "xrLabel31";
            xrLabel31.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel31.SizeF = new SizeF(130.4166F, 18F);
            xrLabel31.StylePriority.UseFont = false;
            xrLabel31.StylePriority.UseTextAlignment = false;
            xrLabel31.Text = "Member Id / File No. :";
            xrLabel31.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel16
            // 
            xrLabel16.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.SINVNO")});
            xrLabel16.Font = new Font("Tahoma", 9F, FontStyle.Bold, GraphicsUnit.Point, 0);
            xrLabel16.LocationFloat = new PointFloat(543.1246F, 6.00001F);
            xrLabel16.Name = "xrLabel16";
            xrLabel16.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel16.SizeF = new SizeF(154.8755F, 18F);
            xrLabel16.StylePriority.UseFont = false;
            xrLabel16.StylePriority.UseTextAlignment = false;
            xrLabel16.Text = "xrLabel16";
            xrLabel16.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel17
            // 
            xrLabel17.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.TRANDATE")});
            xrLabel17.Font = new Font("Tahoma", 9F, FontStyle.Regular, GraphicsUnit.Point, 0);
            xrLabel17.LocationFloat = new PointFloat(543.1246F, 30.00002F);
            xrLabel17.Name = "xrLabel17";
            xrLabel17.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel17.SizeF = new SizeF(153.8754F, 18F);
            xrLabel17.StylePriority.UseFont = false;
            xrLabel17.StylePriority.UseTextAlignment = false;
            xrLabel17.Text = "xrLabel17";
            xrLabel17.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel10
            // 
            xrLabel10.Font = new Font("Tahoma", 9F, FontStyle.Bold);
            xrLabel10.LocationFloat = new PointFloat(625.0833F, 88.54166F);
            xrLabel10.Name = "xrLabel10";
            xrLabel10.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel10.SizeF = new SizeF(72.91669F, 19.79166F);
            xrLabel10.StylePriority.UseFont = false;
            xrLabel10.StylePriority.UseTextAlignment = false;
            xrLabel10.Text = "Total";
            xrLabel10.TextAlignment = TextAlignment.MiddleCenter;
            // 
            // xrLabel9
            // 
            xrLabel9.Font = new Font("Tahoma", 9F, FontStyle.Bold);
            xrLabel9.LocationFloat = new PointFloat(568.1246F, 88.54166F);
            xrLabel9.Name = "xrLabel9";
            xrLabel9.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel9.SizeF = new SizeF(52.16663F, 19.79166F);
            xrLabel9.StylePriority.UseFont = false;
            xrLabel9.StylePriority.UseTextAlignment = false;
            xrLabel9.Text = "Price";
            xrLabel9.TextAlignment = TextAlignment.MiddleCenter;
            // 
            // xrLabel6
            // 
            xrLabel6.Font = new Font("Tahoma", 9F, FontStyle.Bold);
            xrLabel6.LocationFloat = new PointFloat(4.083333F, 88.62505F);
            xrLabel6.Name = "xrLabel6";
            xrLabel6.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel6.SizeF = new SizeF(26.33333F, 19.79166F);
            xrLabel6.StylePriority.UseFont = false;
            xrLabel6.StylePriority.UseTextAlignment = false;
            xrLabel6.Text = "S #";
            xrLabel6.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel8
            // 
            xrLabel8.Font = new Font("Tahoma", 9F, FontStyle.Bold);
            xrLabel8.LocationFloat = new PointFloat(518.1666F, 88.54166F);
            xrLabel8.Name = "xrLabel8";
            xrLabel8.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel8.SizeF = new SizeF(43.75009F, 19.79166F);
            xrLabel8.StylePriority.UseFont = false;
            xrLabel8.StylePriority.UseTextAlignment = false;
            xrLabel8.Text = "Qty";
            xrLabel8.TextAlignment = TextAlignment.MiddleCenter;
            // 
            // xrLabel7
            // 
            xrLabel7.Font = new Font("Tahoma", 9F, FontStyle.Bold);
            xrLabel7.LocationFloat = new PointFloat(31.54163F, 88.62505F);
            xrLabel7.Name = "xrLabel7";
            xrLabel7.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel7.SizeF = new SizeF(470.0833F, 19.79167F);
            xrLabel7.StylePriority.UseFont = false;
            xrLabel7.StylePriority.UseTextAlignment = false;
            xrLabel7.Text = "Item name";
            xrLabel7.TextAlignment = TextAlignment.MiddleCenter;
            // 
            // ReportFooter
            // 
            ReportFooter.Controls.AddRange(new XRControl[] {
            xrLine3,
            xrLabel34,
            xrLabel33,
            patdisc,
            compdiscamt,
            xrLabel25,
            lbldiscount,
            xrLabel13,
            lblpatshare,
            xrLabel11,
            xrLabel24});
            ReportFooter.Font = new Font("Tahoma", 9F);
            ReportFooter.HeightF = 81.25003F;
            ReportFooter.KeepTogether = true;
            ReportFooter.Name = "ReportFooter";
            ReportFooter.StylePriority.UseFont = false;
            // 
            // xrLine3
            // 
            xrLine3.LocationFloat = new PointFloat(3.25F, 0F);
            xrLine3.Name = "xrLine3";
            xrLine3.SizeF = new SizeF(699.5833F, 2.083333F);
            // 
            // xrLabel34
            // 
            xrLabel34.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.CUSTOMERFIXDISC", "{0:#.00}")});
            xrLabel34.Font = new Font("Tahoma", 9F, FontStyle.Bold, GraphicsUnit.Point, 0);
            xrLabel34.LocationFloat = new PointFloat(451.5833F, 20.83333F);
            xrLabel34.Name = "xrLabel34";
            xrLabel34.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel34.SizeF = new SizeF(60.25003F, 18F);
            xrLabel34.StylePriority.UseFont = false;
            xrLabel34.StylePriority.UseTextAlignment = false;
            xrLabel34.Text = "xrLabel34";
            xrLabel34.TextAlignment = TextAlignment.MiddleRight;
            // 
            // xrLabel33
            // 
            xrLabel33.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.CARDDISC", "{0:n2}")});
            xrLabel33.Font = new Font("Tahoma", 9F, FontStyle.Bold, GraphicsUnit.Point, 0);
            xrLabel33.LocationFloat = new PointFloat(420.9164F, 41.41665F);
            xrLabel33.Name = "xrLabel33";
            xrLabel33.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel33.SizeF = new SizeF(60.25003F, 18F);
            xrLabel33.StylePriority.UseFont = false;
            xrLabel33.StylePriority.UseTextAlignment = false;
            xrLabel33.Text = "xrLabel33";
            xrLabel33.TextAlignment = TextAlignment.MiddleRight;
            // 
            // patdisc
            // 
            patdisc.LocationFloat = new PointFloat(598.75F, 41.62499F);
            patdisc.Name = "patdisc";
            patdisc.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            patdisc.SizeF = new SizeF(95.37476F, 17.79165F);
            patdisc.StylePriority.UseTextAlignment = false;
            patdisc.TextAlignment = TextAlignment.MiddleRight;
            // 
            // compdiscamt
            // 
            compdiscamt.LocationFloat = new PointFloat(598.75F, 20.62499F);
            compdiscamt.Name = "compdiscamt";
            compdiscamt.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            compdiscamt.SizeF = new SizeF(96.24994F, 21F);
            compdiscamt.StylePriority.UseTextAlignment = false;
            compdiscamt.TextAlignment = TextAlignment.MiddleRight;
            // 
            // xrLabel25
            // 
            xrLabel25.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.NETAMT", "{0:n2}")});
            xrLabel25.LocationFloat = new PointFloat(598.7499F, 0F);
            xrLabel25.Name = "xrLabel25";
            xrLabel25.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel25.SizeF = new SizeF(98.24994F, 20F);
            xrLabel25.StylePriority.UseTextAlignment = false;
            xrLabel25.Text = "xrLabel25";
            xrLabel25.TextAlignment = TextAlignment.MiddleRight;
            // 
            // lbldiscount
            // 
            lbldiscount.Font = new Font("Tahoma", 9F, FontStyle.Bold);
            lbldiscount.LocationFloat = new PointFloat(511.8333F, 20.83333F);
            lbldiscount.Name = "lbldiscount";
            lbldiscount.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            lbldiscount.SizeF = new SizeF(86.91678F, 21F);
            lbldiscount.StylePriority.UseFont = false;
            lbldiscount.StylePriority.UseTextAlignment = false;
            lbldiscount.Text = "% Discount : ";
            lbldiscount.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel13
            // 
            xrLabel13.Font = new Font("Tahoma", 9F, FontStyle.Bold);
            xrLabel13.LocationFloat = new PointFloat(509.8332F, 60.41667F);
            xrLabel13.Name = "xrLabel13";
            xrLabel13.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel13.SizeF = new SizeF(87.91675F, 18.79166F);
            xrLabel13.StylePriority.UseFont = false;
            xrLabel13.StylePriority.UseTextAlignment = false;
            xrLabel13.Text = "Net Amount :";
            xrLabel13.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // lblpatshare
            // 
            lblpatshare.Font = new Font("Tahoma", 9F, FontStyle.Bold);
            lblpatshare.LocationFloat = new PointFloat(481.9999F, 40.625F);
            lblpatshare.Name = "lblpatshare";
            lblpatshare.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            lblpatshare.SizeF = new SizeF(116.7501F, 19.79167F);
            lblpatshare.StylePriority.UseFont = false;
            lblpatshare.StylePriority.UseTextAlignment = false;
            lblpatshare.Text = "% Patient Share :";
            lblpatshare.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel11
            // 
            xrLabel11.Font = new Font("Tahoma", 9F, FontStyle.Bold);
            xrLabel11.LocationFloat = new PointFloat(528.5831F, 0.2083461F);
            xrLabel11.Name = "xrLabel11";
            xrLabel11.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel11.SizeF = new SizeF(70.16687F, 19.79166F);
            xrLabel11.StylePriority.UseFont = false;
            xrLabel11.StylePriority.UseTextAlignment = false;
            xrLabel11.Text = "Sub total :";
            xrLabel11.TextAlignment = TextAlignment.MiddleLeft;
            // 
            // xrLabel24
            // 
            xrLabel24.DataBindings.AddRange(new[] {
            new XRBinding("Text", null, "SalesInvList.CREDITAMT", "{0:#.00}")});
            xrLabel24.Font = new Font("Tahoma", 9F, FontStyle.Bold, GraphicsUnit.Point, 0);
            xrLabel24.LocationFloat = new PointFloat(598.7499F, 59.54167F);
            xrLabel24.Name = "xrLabel24";
            xrLabel24.Padding = new PaddingInfo(2, 2, 0, 0, 100F);
            xrLabel24.SizeF = new SizeF(94.24994F, 19.625F);
            xrLabel24.StylePriority.UseFont = false;
            xrLabel24.StylePriority.UseTextAlignment = false;
            xrSummary2.FormatString = "{0:n2}";
            xrLabel24.Summary = xrSummary2;
            xrLabel24.Text = "xrLabel24";
            xrLabel24.TextAlignment = TextAlignment.MiddleRight;
            // 
            // xrCrossBandBox1
            // 
            xrCrossBandBox1.BorderWidth = 1F;
            xrCrossBandBox1.EndBand = PageHeader;
            xrCrossBandBox1.EndPointFloat = new PointFloat(2.083333F, 82.29166F);
            xrCrossBandBox1.LocationFloat = new PointFloat(2.083333F, 0F);
            xrCrossBandBox1.Name = "xrCrossBandBox1";
            xrCrossBandBox1.StartBand = PageHeader;
            xrCrossBandBox1.StartPointFloat = new PointFloat(2.083333F, 0F);
            xrCrossBandBox1.WidthF = 704.1667F;
            // 
            // RptSalesInsurance
            // 
            Bands.AddRange(new Band[] {
            Detail,
            TopMargin,
            BottomMargin,
            PageHeader,
            ReportFooter});
            CrossBandControls.AddRange(new XRCrossBandControl[] {
            xrCrossBandBox1});
            Margins = new Margins(54, 66, 69, 25);
            PageHeight = 1169;
            PageWidth = 827;
            PaperKind = PaperKind.A4;
            ShowPrintMarginsWarning = false;
            SnapToGrid = false;
            Version = "14.1";
            ((ISupportInitialize)(this)).EndInit();

        }
        public frmRpt_Payment_BookingRsUnPay(NewPaymentEN aNewPaymentEN)
        {
            InitializeComponent();
            this.aNewPaymentEN = aNewPaymentEN;

            try
            {
                //------------- Phong ------------------------

                lblNumberVote.Text = Convert.ToString(this.aNewPaymentEN.IDBookingR);
                lblIDBookingR.Text = Convert.ToString(this.aNewPaymentEN.IDBookingR);
                lblNameCustomer.Text = this.aNewPaymentEN.NameCustomer;
                lblGroup.Text = this.aNewPaymentEN.NameCustomerGroup;
                lblCompany.Text = this.aNewPaymentEN.NameCompany;
                lblTaxNumberCode.Text = this.aNewPaymentEN.TaxNumberCodeCompany;

                int day = DateTime.Now.Day;
                int month = DateTime.Now.Month;
                int year = DateTime.Now.Year;
                lblDayMonthYear.Text = "Hà Nội, ngày " + day.ToString() + " tháng " + month.ToString() + " năm " + year.ToString();

                aListServiceUsed = this.aNewPaymentEN.GetAllServiceUsedInRoom();
                //Lấy List< IDServiceGroup>
                List<int> aTemp = new List<int>();
                int IDServiceGroup;
                foreach (ServiceUsedEN item in aListServiceUsed)
                {
                    IDServiceGroup = new int();

                    IDServiceGroup = item.IDServiceGroup;
                    aTemp.Add(IDServiceGroup);
                }
                aListIDServicesGroup = aTemp.Distinct().ToList();

                ServiceGroupEN aServicesGroupEN;
                ServiceGroupsBO aServiceGroupsBO = new ServiceGroupsBO();

                foreach (int item in aListIDServicesGroup)
                {
                    aServicesGroupEN = new ServiceGroupEN();
                    aServicesGroupEN.IDServiceGroup = item;

                    aServicesGroupEN.TotalMoneyBeforeTax = this.GetTotalMoneyServiceGroupBeforeTax(item);
                    aServicesGroupEN.DisplayMoneyTax = aNewPaymentEN.GetMoneyTax(this.GetTotalMoneyServiceGroupBeforeTax(item), 10);
                    aServicesGroupEN.TotalMoneyAfterTax = this.GetTotalMoneyServiceGroupAfterTax(item);
                    aServicesGroupEN.ServiceGroupName = aServiceGroupsBO.Sel_ByID(item).Name;

                    aListServicesGroupEN.Add(aServicesGroupEN);
                }

                //danh sach phong
                this.DetailReport.DataSource = aNewPaymentEN.aListBookingRoomUsed;

                colSkuRoom.DataBindings.Add("Text", this.DetailReport.DataSource, "RoomSku");
                colCheckIn.DataBindings.Add("Text", this.DetailReport.DataSource, "CheckInActual", "{0:dd-MM-yyyy HH:mm}");
                if (aNewPaymentEN.Status_BookingR == 8 || aNewPaymentEN.Status_BookingR == 7)
                {
                    colCheckOut.DataBindings.Add("Text", this.DetailReport.DataSource, "CheckOutActual", "{0:dd-MM-yyyy HH:mm}");
                }
                else
                {
                    colCheckOut.DataBindings.Add("Text", this.DetailReport.DataSource, "CheckOutPlan", "{0:dd-MM-yyyy HH:mm}");

                }
                colBookingRoomCost.DataBindings.Add("Text", this.DetailReport.DataSource, "Cost", "{0:0,0.##}");
                colDateInUse.DataBindings.Add("Text", this.DetailReport.DataSource, "DateUsed", "{0:0,0.##}");
                colMoneyRoomBeforeTax.DataBindings.Add("Text", this.DetailReport.DataSource, "MoneyRoomBeforeTax", "{0:0,0}");
                colPercentTaxRoom.DataBindings.Add("Text", this.DetailReport.DataSource, "DisplayMoneyTaxRoom", "{0:0,0}");
                colPaymentMoneyaRoom.DataBindings.Add("Text", this.DetailReport.DataSource, "MoneyRoom", "{0:0,0}");

                ////tong tien phong truoc thue
                //lblSumMoneyRoomsBeforeTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetMoneyRoomsBeforeTax()));
                ////Tong tien thue
                //lblSumMoneyRoomTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetMoneyTax(this.aNewPaymentEN.GetMoneyRoomsBeforeTax(), 10)));
                ////tong tien phong sau thue
                //lblSumMoneyRoomsAfterTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetMoneyRooms()));

                XRSummary aXRSummaryMoneyRoomBeforeTax = new XRSummary();
                aXRSummaryMoneyRoomBeforeTax.Func = SummaryFunc.Sum;
                aXRSummaryMoneyRoomBeforeTax.Running = SummaryRunning.Group;
                aXRSummaryMoneyRoomBeforeTax.IgnoreNullValues = true;
                aXRSummaryMoneyRoomBeforeTax.FormatString = "{0:0,0}";
                XRBinding aXRBindingMoneyRoomBeforeTax = new XRBinding("Text", this.DetailReport.DataSource, "MoneyRoomBeforeTax", "{0:0,0}");
                XRBinding[] listXRBindingMoneyRoomBeforeTax = new XRBinding[] { aXRBindingMoneyRoomBeforeTax };
                lblSumMoneyRoomsBeforeTax.DataBindings.AddRange(listXRBindingMoneyRoomBeforeTax);
                lblSumMoneyRoomsBeforeTax.Summary = aXRSummaryMoneyRoomBeforeTax;

                XRSummary aXRSummaryDisplayMoneyTaxRoom = new XRSummary();
                aXRSummaryDisplayMoneyTaxRoom.Func = SummaryFunc.Sum;
                aXRSummaryDisplayMoneyTaxRoom.Running = SummaryRunning.Group;
                aXRSummaryDisplayMoneyTaxRoom.IgnoreNullValues = true;
                aXRSummaryDisplayMoneyTaxRoom.FormatString = "{0:0,0}";
                XRBinding aXRBindingDisplayMoneyTaxRoom = new XRBinding("Text", this.DetailReport.DataSource, "DisplayMoneyTaxRoom", "{0:0,0}");
                XRBinding[] listXRBindingDisplayMoneyTaxRoom = new XRBinding[] { aXRBindingDisplayMoneyTaxRoom };
                lblSumMoneyRoomTax.DataBindings.AddRange(listXRBindingDisplayMoneyTaxRoom);
                lblSumMoneyRoomTax.Summary = aXRSummaryDisplayMoneyTaxRoom;

                XRSummary aXRSummaryMoneyRoom = new XRSummary();
                aXRSummaryMoneyRoom.Func = SummaryFunc.Sum;
                aXRSummaryMoneyRoom.Running = SummaryRunning.Group;
                aXRSummaryMoneyRoom.IgnoreNullValues = true;
                aXRSummaryMoneyRoom.FormatString = "{0:0,0}";
                XRBinding aXRBindingMoneyRoom = new XRBinding("Text", this.DetailReport.DataSource, "MoneyRoom", "{0:0,0}");
                XRBinding[] listXRBindingMoneyRoom = new XRBinding[] { aXRBindingMoneyRoom };
                lblSumMoneyRoomsAfterTax.DataBindings.AddRange(listXRBindingMoneyRoom);
                lblSumMoneyRoomsAfterTax.Summary = aXRSummaryMoneyRoom;

                //danh sach dich vu
                this.DetailReport2.DataSource = aListServicesGroupEN;
                colNamService.DataBindings.Add("Text", this.DetailReport2.DataSource, "ServiceGroupName");
                colTotalMoneyBeforeTax.DataBindings.Add("Text", this.DetailReport2.DataSource, "TotalMoneyBeforeTax", "{0:0,0}");
                colPercentTaxService.DataBindings.Add("Text", this.DetailReport2.DataSource, "DisplayMoneyTax", "{0:0,0}");
                colTotalMoneyServiceAfterTax.DataBindings.Add("Text", this.DetailReport2.DataSource, "TotalMoneyAfterTax", "{0:0,0}");

                ////tong tien dich vu truoc thue
                //lblSumMoneyService_BookingRBeforeTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoneyServiceUsedInRoomsBeforeTax()));
                ////Tong so tien thue
                //lblSumMoneyServiceTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetMoneyTax(this.aNewPaymentEN.GetTotalMoneyServiceUsedInRoomsBeforeTax(), 10)));
                ////tong tien dich vu sau thue
                //lblSumMoneyService_BookingRAfterTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoneyServiceUsedInRooms()));

                XRSummary aXRSummaryTotalMoneyBeforeTax = new XRSummary();
                aXRSummaryTotalMoneyBeforeTax.Func = SummaryFunc.Sum;
                aXRSummaryTotalMoneyBeforeTax.Running = SummaryRunning.Group;
                aXRSummaryTotalMoneyBeforeTax.IgnoreNullValues = true;
                aXRSummaryTotalMoneyBeforeTax.FormatString = "{0:0,0}";
                lblSumMoneyService_BookingRBeforeTax.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", this.DetailReport2.DataSource, "TotalMoneyBeforeTax", "{0:0,0}") });
                lblSumMoneyService_BookingRBeforeTax.Summary = aXRSummaryTotalMoneyBeforeTax;

                XRSummary aXRSummaryDisplayMoneyTax = new XRSummary();
                aXRSummaryDisplayMoneyTax.Func = SummaryFunc.Sum;
                aXRSummaryDisplayMoneyTax.Running = SummaryRunning.Group;
                aXRSummaryDisplayMoneyTax.IgnoreNullValues = true;
                aXRSummaryDisplayMoneyTax.FormatString = "{0:0,0}";
                lblSumMoneyServiceTax.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", this.DetailReport2.DataSource, "DisplayMoneyTax", "{0:0,0}") });
                lblSumMoneyServiceTax.Summary = aXRSummaryDisplayMoneyTax;

                XRSummary aXRSummaryTotalMoneyAfterTax = new XRSummary();
                aXRSummaryTotalMoneyAfterTax.Func = SummaryFunc.Sum;
                aXRSummaryTotalMoneyAfterTax.Running = SummaryRunning.Group;
                aXRSummaryTotalMoneyAfterTax.IgnoreNullValues = true;
                aXRSummaryTotalMoneyAfterTax.FormatString = "{0:0,0}";
                lblSumMoneyService_BookingRAfterTax.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", this.DetailReport2.DataSource, "TotalMoneyAfterTax", "{0:0,0}") });
                lblSumMoneyService_BookingRAfterTax.Summary = aXRSummaryTotalMoneyAfterTax;

                //tong tien thanh toan truoc thue
                lblTotalMoneyBookingRBeforeTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoneyBeforeTax()));
                //tien thue
                lblTotalMoneyTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetMoneyTax(Convert.ToDecimal(this.aNewPaymentEN.GetMoneyRoomsBeforeTax()) + Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoneyServiceUsedInRoomsBeforeTax()), 10)));
                //tong tien thanh toan sau thue
                lblTotalMoneyBookingRAfterTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoney()));
                //So tien ung truoc
                lblBookingMoney_BookingR.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.BookingRMoney));
                //so tien con lai can thanh toan
                lblTotalMoney_BookingR.Text = String.Format("{0:0,0}", (Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoney()) - Convert.ToDecimal(this.aNewPaymentEN.BookingRMoney)));
                string TotalMoney_BookingRString = UppercaseFirst(StringUtility.ConvertDecimalToString((Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoney()) - Convert.ToDecimal(this.aNewPaymentEN.BookingRMoney))));

                lblTotalMoney_BookingRString.Text = "(" + TotalMoney_BookingRString + ")";

            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public frmRpt_GroupPayment_Rs(List<RptPaymentStyle1_ForPrint> aListData,string CompanyName, string Address, string NameCustomerGroup,string InvoiceNumber
            , DateTime FirstDate, DateTime LastDate, decimal? BookingHMoney, decimal? BookingRMoney, int IDBookingR, int Div)
        {
            InitializeComponent();

            this.aListData = aListData;

            if (string.IsNullOrEmpty(Div.ToString()) || Div == 1)
            {
                Div = 1;
                lblTitle.Text = "PHIẾU BÁO THANH TOÁN";
            }
            else
            {
                lblTitle.Text = "PHIẾU BÁO THANH TOÁN (CHIA " + Div + ")";
            }

            for (int i = 0; i < this.aListData.Count; i++)
            {
                this.aListData[i].DrinkMoney = this.aListData[i].DrinkMoney / Div;
                this.aListData[i].Hall_Fee = this.aListData[i].Hall_Fee / Div;
                this.aListData[i].MealMoney = this.aListData[i].MealMoney / Div;
                this.aListData[i].OtherMoney = this.aListData[i].OtherMoney / Div;
                this.aListData[i].Room_Fee = this.aListData[i].Room_Fee / Div;
                this.aListData[i].RoomServiceMoney = this.aListData[i].RoomServiceMoney / Div;

                this.aListData[i].ServiceGroup10_Fee = this.aListData[i].ServiceGroup10_Fee / Div;
                this.aListData[i].ServiceGroup11_Fee = this.aListData[i].ServiceGroup11_Fee / Div;
                this.aListData[i].ServiceGroup12_Fee = this.aListData[i].ServiceGroup12_Fee / Div;
                this.aListData[i].ServiceGroup13_Fee = this.aListData[i].ServiceGroup13_Fee / Div;
                this.aListData[i].ServiceGroup14_Fee = this.aListData[i].ServiceGroup14_Fee / Div;
                this.aListData[i].ServiceGroup15_Fee = this.aListData[i].ServiceGroup15_Fee / Div;
                this.aListData[i].ServiceGroup2_Fee = this.aListData[i].ServiceGroup2_Fee / Div;
                this.aListData[i].ServiceGroup3_Fee = this.aListData[i].ServiceGroup3_Fee / Div;

                this.aListData[i].ServiceGroup4_Fee = this.aListData[i].ServiceGroup4_Fee / Div;
                this.aListData[i].ServiceGroup5_Fee = this.aListData[i].ServiceGroup5_Fee / Div;
                this.aListData[i].ServiceGroup6_Fee = this.aListData[i].ServiceGroup6_Fee / Div;
                this.aListData[i].ServiceGroup7_Fee = this.aListData[i].ServiceGroup7_Fee / Div;
                this.aListData[i].ServiceGroup8_Fee = this.aListData[i].ServiceGroup8_Fee / Div;
                this.aListData[i].ServiceGroup9_Fee = this.aListData[i].ServiceGroup9_Fee / Div;
                this.aListData[i].TotalMoney = this.aListData[i].TotalMoney / Div;
                this.aListData[i].TotalServiceMoney = this.aListData[i].TotalServiceMoney / Div;

                //----------------------------------------------------------------------
                TotalServiceMoney = TotalServiceMoney + this.aListData[i].TotalServiceMoney;
                TotalMoneyBeforeTax = TotalMoneyBeforeTax + this.aListData[i].TotalMoney;
                this.aListData[i].Room_Fee = this.aListData[i].Room_Fee + this.aListData[i].Hall_Fee;
            }

            //Truyền dữ liệu cho Detail
            lblCompanyName.Text = CompanyName;
            lblAddress.Text = Address;
            lblCustomerGroupName.Text = NameCustomerGroup;

            lblCheckIn.Text = FirstDate.ToString("dd-MM-yyyy");
            lblCheckOut.Text = LastDate.ToString("dd-MM-yyyy");

            BookingRs aBookingRs = new BookingRs();
            aBookingRs = (new BookingRsBO()).Select_ByID(IDBookingR);

            lblIDBookingR.Text = IDBookingR.ToString();
            lblInvoiceNumber.Text = aBookingRs.InvoiceNumber;
            lblInvoiceDate.Text = aBookingRs.InvoiceDate.GetValueOrDefault().Date.ToShortDateString();
            lbAcceptDate.Text = aBookingRs.AcceptDate.GetValueOrDefault().Date.ToShortDateString();

            this.DetailReport.DataSource = this.aListData;
            colDate.DataBindings.Add("Text", this.DetailReport.DataSource, "Date", "{0:dd-MM}");
            colDescription.DataBindings.Add("Text", this.DetailReport.DataSource, "Note");
            colNumberCus.DataBindings.Add("Text", this.DetailReport.DataSource, "CountCustomerInGroup");
            colMoneyRoom.DataBindings.Add("Text", this.DetailReport.DataSource, "Room_Fee", "{0:0,0}");
            colTotalARoom.DataBindings.Add("Text", this.DetailReport.DataSource, "TotalMoney", "{0:0,0}");
               // colHallMoney.DataBindings.Add("Text", this.DetailReport.DataSource, "Hall_Fee", "{0:0,0}");
            colMealMoney.DataBindings.Add("Text", this.DetailReport.DataSource, "MealMoney", "{0:0,0}");
            colDrinkMoney.DataBindings.Add("Text", this.DetailReport.DataSource, "DrinkMoney", "{0:0,0}");
            colRoomServiceMoney.DataBindings.Add("Text", this.DetailReport.DataSource, "RoomServiceMoney", "{0:0,0}");
            colOtherMoney.DataBindings.Add("Text", this.DetailReport.DataSource, "OtherMoney", "{0:0,0}");

            colMoneyService.Text = TotalServiceMoney.ToString("0,0");
            colMoneyBeforeTax.Text = TotalMoneyBeforeTax.ToString("0,0");
            colMoneyTax.Text = (TotalMoneyBeforeTax * 10 / 100).ToString("0,0");
            colMoneyAfterTax.Text = (TotalMoneyBeforeTax * 110 / 100).ToString("0,0");
            colBookingMoney.Text = Convert.ToDecimal(BookingHMoney.GetValueOrDefault(0) + BookingRMoney.GetValueOrDefault(0)).ToString("0,0");
            colTotalMoneyPay.Text = ((TotalMoneyBeforeTax * 110 / 100) - Convert.ToDecimal(BookingHMoney.GetValueOrDefault(0) + BookingRMoney.GetValueOrDefault(0))).ToString("0,0");
            string TotalMoney_String = UppercaseFirst(StringUtility.ConvertDecimalToString((TotalMoneyBeforeTax * 110 / 100) - Convert.ToDecimal(BookingHMoney.GetValueOrDefault(0) + BookingRMoney.GetValueOrDefault(0))));
            lblConvertToString.Text = TotalMoney_String;

            int day = DateTime.Now.Day;
            int month = DateTime.Now.Month;
            int year = DateTime.Now.Year;
            lblDayMonthYear.Text = "Hà Nội, ngày " + day.ToString() + " tháng " + month.ToString() + " năm " + year.ToString();

            //--------------Tính tổng---------------------------------
            XRSummary aXRSummaryMoney = new XRSummary();
            aXRSummaryMoney.Func = SummaryFunc.Sum;
            aXRSummaryMoney.Running = SummaryRunning.Group;
            aXRSummaryMoney.IgnoreNullValues = true;
            aXRSummaryMoney.FormatString = "{0:0,0}";
            XRBinding aXRBindingMoney = new XRBinding("Text", this.DetailReport.DataSource, "TotalMoney", "{0:0,0}");
            XRBinding[] listXRBindingMoney = new XRBinding[] { aXRBindingMoney };
            colSumTotalMoney.DataBindings.AddRange(listXRBindingMoney);
            colSumTotalMoney.Summary = aXRSummaryMoney;

            XRSummary aXRSumDrinkMoney = new XRSummary();
            aXRSumDrinkMoney.Func = SummaryFunc.Sum;
            aXRSumDrinkMoney.Running = SummaryRunning.Group;
            aXRSumDrinkMoney.IgnoreNullValues = true;
            aXRSumDrinkMoney.FormatString = "{0:0,0}";
            XRBinding aXRBinding = new XRBinding("Text", this.DetailReport.DataSource, "DrinkMoney", "{0:0,0}");
            XRBinding[] aList_aXRBinding = new XRBinding[] { aXRBinding };
            colSumDrinkMoney.DataBindings.AddRange(aList_aXRBinding);
            colSumDrinkMoney.Summary = aXRSumDrinkMoney;

            //XRSummary aXRSumHallMoney = new XRSummary();
            //aXRSumHallMoney.Func = SummaryFunc.Sum;
            //aXRSumHallMoney.Running = SummaryRunning.Group;
            //aXRSumHallMoney.IgnoreNullValues = true;
            //aXRSumHallMoney.FormatString = "{0:0,0}";
            //XRBinding aXRBinding1 = new XRBinding("Text", this.DetailReport.DataSource, "Hall_Fee", "{0:0,0}");
            //XRBinding[] aList_aXRBinding1 = new XRBinding[] { aXRBinding1 };
            //colSumHallMoney.DataBindings.AddRange(aList_aXRBinding1);
            //colSumHallMoney.Summary = aXRSumHallMoney;

            XRSummary aXRSumMealMoney = new XRSummary();
            aXRSumMealMoney.Func = SummaryFunc.Sum;
            aXRSumMealMoney.Running = SummaryRunning.Group;
            aXRSumMealMoney.IgnoreNullValues = true;
            aXRSumMealMoney.FormatString = "{0:0,0}";
            XRBinding aXRBinding2 = new XRBinding("Text", this.DetailReport.DataSource, "MealMoney", "{0:0,0}");
            XRBinding[] aList_aXRBinding2 = new XRBinding[] { aXRBinding2 };
            colSumMealMoney.DataBindings.AddRange(aList_aXRBinding2);
            colSumMealMoney.Summary = aXRSumMealMoney;

            XRSummary aXRSumMoneyRoom = new XRSummary();
            aXRSumMoneyRoom.Func = SummaryFunc.Sum;
            aXRSumMoneyRoom.Running = SummaryRunning.Group;
            aXRSumMoneyRoom.IgnoreNullValues = true;
            aXRSumMoneyRoom.FormatString = "{0:0,0}";
            XRBinding aXRBinding3 = new XRBinding("Text", this.DetailReport.DataSource, "Room_Fee", "{0:0,0}");
            XRBinding[] aList_aXRBinding3 = new XRBinding[] { aXRBinding3 };
            colSumMoneyRoom.DataBindings.AddRange(aList_aXRBinding3);
            colSumMoneyRoom.Summary = aXRSumMoneyRoom;

            XRSummary aXRSumOtherMoney = new XRSummary();
            aXRSumOtherMoney.Func = SummaryFunc.Sum;
            aXRSumOtherMoney.Running = SummaryRunning.Group;
            aXRSumOtherMoney.IgnoreNullValues = true;
            aXRSumOtherMoney.FormatString = "{0:0,0}";
            XRBinding aXRBinding4 = new XRBinding("Text", this.DetailReport.DataSource, "OtherMoney", "{0:0,0}");
            XRBinding[] aList_aXRBinding4 = new XRBinding[] { aXRBinding4 };
            colSumOtherMoney.DataBindings.AddRange(aList_aXRBinding4);
            colSumOtherMoney.Summary = aXRSumOtherMoney;

            XRSummary aXRSumRoomServiceMoney = new XRSummary();
            aXRSumRoomServiceMoney.Func = SummaryFunc.Sum;
            aXRSumRoomServiceMoney.Running = SummaryRunning.Group;
            aXRSumRoomServiceMoney.IgnoreNullValues = true;
            aXRSumRoomServiceMoney.FormatString = "{0:0,0}";
            XRBinding aXRBinding5 = new XRBinding("Text", this.DetailReport.DataSource, "RoomServiceMoney", "{0:0,0}");
            XRBinding[] aList_aXRBinding5 = new XRBinding[] { aXRBinding5 };
            colSumRoomServiceMoney.DataBindings.AddRange(aList_aXRBinding5);
            colSumRoomServiceMoney.Summary = aXRSumRoomServiceMoney;
        }
        public frmRpt_SplitPayment_BookingHs(NewPaymentEN aNewPaymentEN, int IndexSub)
        {
            InitializeComponent();
            this.aNewPaymentEN = aNewPaymentEN;
            this.IndexSub = IndexSub;
            try
            {

                lblNumberVote.Text = Convert.ToString(this.aNewPaymentEN.IDBookingH);
                lblIDBookingH.Text = Convert.ToString(this.aNewPaymentEN.IDBookingH);
                lblNameCustomer.Text = this.aNewPaymentEN.NameCustomer;
                lblGroup.Text = this.aNewPaymentEN.NameCustomerGroup;
                lblCompany.Text = this.aNewPaymentEN.NameCompany;
                lblTaxNumberCode.Text = this.aNewPaymentEN.TaxNumberCodeCompany;

                int day = DateTime.Now.Day;
                int month = DateTime.Now.Month;
                int year = DateTime.Now.Year;
                lblDayMonthYear.Text = "Hà Nội, ngày " + day.ToString() + " tháng " + month.ToString() + " năm " + year.ToString();

               //Lấy dữ liệu

                List<BookingHallUsedEN> aListBookingHallUsedEN = new List<BookingHallUsedEN>();
                aListBookingHallUsedEN = this.aNewPaymentEN.aListBookingHallUsed.Where(r => r.IndexSubPayment == this.IndexSub).OrderBy(r => r.HallSku).ToList();
                aListBookingHallUsedEN.Count();

                aListServiceUsedHall = this.aNewPaymentEN.GetAllServiceUsedInHall().Where(r => r.IndexSubPayment == this.IndexSub).OrderBy(r => r.Sku).ToList();
                //Lấy List< IDServiceGroup>
                List<int> aTemp1 = new List<int>();
                int IDServiceGroupHall;
                foreach (ServiceUsedEN item in aListServiceUsedHall)
                {
                    IDServiceGroupHall = new int();
                    IDServiceGroupHall = item.IDServiceGroup;
                    aTemp1.Add(IDServiceGroupHall);
                }
                aListIDServicesGroupHall = aTemp1.Distinct().ToList();
                ServiceGroupEN aServicesGroupHallEN;
                foreach (int item in aListIDServicesGroupHall)
                {
                    aServicesGroupHallEN = new ServiceGroupEN();
                    aServicesGroupHallEN.IDServiceGroup = item;
                    aServicesGroupHallEN.TotalMoneyBeforeTax = this.GetTotalMoneyServiceGroupHallBeforeTax(item);
                    aServicesGroupHallEN.TotalMoneyAfterTax = this.GetTotalMoneyServiceGroupHallAfterTax(item);
                    aServicesGroupHallEN.DisplayMoneyTax = aNewPaymentEN.GetMoneyTax(this.GetTotalMoneyServiceGroupHallBeforeTax(item), 10);
                    aServicesGroupHallEN.ServiceGroupName = aServiceGroupsBO.Sel_ByID(item).Name;
                    aListServicesGroupHallEN.Add(aServicesGroupHallEN);
                }
                decimal? sumMoneyHallBeforeTax = aListBookingHallUsedEN.Sum(r => r.GetMoneyHallBeforeTax());
                decimal? SumMoneyTaxHall = aListBookingHallUsedEN.Sum(r => r.GetTotalMoneyHall());
                decimal? sumMoneyHallAfterTax = aListBookingHallUsedEN.Sum(r => r.GetTotalMoneyHall());

                decimal? sumMoneyServiceHallBeforeTax = aListServicesGroupHallEN.Sum(s => s.TotalMoneyBeforeTax);
                decimal? sumMoneyTaxServices = aListServicesGroupHallEN.Sum(s => s.DisplayMoneyTax);
                decimal? sumMoneyServiceHallAfterTax = aListServicesGroupHallEN.Sum(s => s.TotalMoneyAfterTax);

                //Tong tien hoa don can thanh toan
                decimal? beforTax = sumMoneyHallBeforeTax + sumMoneyServiceHallBeforeTax;
                decimal? afterTax = sumMoneyHallAfterTax + sumMoneyServiceHallAfterTax;
                decimal? bookingMoney = Convert.ToDecimal(this.aNewPaymentEN.BookingHMoney);

                                //danh sach hoi truong
                this.DetailReportHall.DataSource = aNewPaymentEN.aListBookingHallUsed;
                colSkuHall.DataBindings.Add("Text", this.DetailReportHall.DataSource, "HallSku");
                colCreateDate.DataBindings.Add("Text", this.DetailReportHall.DataSource, "Date", "{0:dd/MM/yyyy}");
                colBookingHallCost.DataBindings.Add("Text", this.DetailReportHall.DataSource, "Cost", "{0:0,0}");
                colPercentTax.DataBindings.Add("Text", this.DetailReportHall.DataSource, "DisplayMoneyTaxHall", "{0:0,0}");
                colPaymentMoneyHall.DataBindings.Add("Text", this.DetailReportHall.DataSource, "MoneyHall", "{0:0,0}");

                XRSummary aXRSummaryDisplayMoneyTaxHall = new XRSummary();
                aXRSummaryDisplayMoneyTaxHall.Func = SummaryFunc.Sum;
                aXRSummaryDisplayMoneyTaxHall.Running = SummaryRunning.Group;
                aXRSummaryDisplayMoneyTaxHall.IgnoreNullValues = true;
                aXRSummaryDisplayMoneyTaxHall.FormatString = "{0:0,0}";
                XRBinding aXRBindingDisplayMoneyTaxHall = new XRBinding("Text", this.DetailReportHall.DataSource, "DisplayMoneyTaxHall", "{0:0,0}");
                XRBinding[] listXRBindingDisplayMoneyTaxHall = new XRBinding[] { aXRBindingDisplayMoneyTaxHall };
                lblSumMoneyHallsTax.DataBindings.AddRange(listXRBindingDisplayMoneyTaxHall);
                lblSumMoneyHallsTax.Summary = aXRSummaryDisplayMoneyTaxHall;

                //danh sach dich vu su dung
                this.DetailReportService.DataSource = aListServicesGroupHallEN;
                colNamServiceHall.DataBindings.Add("Text", this.DetailReportService.DataSource, "ServiceGroupName");
                colTotalMoneyServiceHallBeforeTax.DataBindings.Add("Text", this.DetailReportService.DataSource, "TotalMoneyBeforeTax", "{0:0,0}");
                colPercentTaxServiceHall.DataBindings.Add("Text", this.DetailReportService.DataSource, "DisplayMoneyTax", "{0:0,0}");

                colTotalMoneyServiceHallAfterTax.DataBindings.Add("Text", this.DetailReportService.DataSource, "TotalMoneyAfterTax", "{0:0,0}");

                XRSummary aXRSummaryDisplayMoneyServiceHallTax = new XRSummary();
                aXRSummaryDisplayMoneyServiceHallTax.Func = SummaryFunc.Sum;
                aXRSummaryDisplayMoneyServiceHallTax.Running = SummaryRunning.Group;
                aXRSummaryDisplayMoneyServiceHallTax.IgnoreNullValues = true;
                aXRSummaryDisplayMoneyServiceHallTax.FormatString = "{0:0,0}";
                lblSumMoneyServiceHallsTax.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", this.DetailReportService.DataSource, "DisplayMoneyTax", "{0:0,0}") });
                lblSumMoneyServiceHallsTax.Summary = aXRSummaryDisplayMoneyServiceHallTax;

                //tong tien hoi truong truoc thue
                lblSumMoneyHallsBeforeTax.Text = String.Format("{0:0,0}",sumMoneyHallBeforeTax);
                //tong tien hoi truong sau thue
                lblSumMoneyHallsAfterTax.Text = String.Format("{0:0,0}", sumMoneyHallAfterTax);

                //tong tien dich vu hoi truong truoc thue
                lblSumMoneyServiceHallsBeforeTax.Text = String.Format("{0:0,0}", sumMoneyServiceHallBeforeTax);
                //tong tien dich vu hoi truong sau thue
                lblSumMoneyServiceHallsAfterTax.Text = String.Format("{0:0,0}", sumMoneyServiceHallAfterTax);

                //tong tien thanh toan truoc thue
                lblTotalMoneyBeforeTax.Text = String.Format("{0:0,0}", beforTax);
                //tien thue
                lblTotalMoneyTax.Text = String.Format("{0:0,0}", sumMoneyTaxServices+SumMoneyTaxHall);
                //tong tien thanh toan sau thue
                lblTotalMoneyAfterTax.Text = String.Format("{0:0,0}", afterTax);
                //So tien ung truoc
                lblBookingMoney.Text = String.Format("{0:0,0}", bookingMoney);
                //so tien con lai can thanh toan
                lblTotalMoney.Text = String.Format("{0:0,0}", afterTax - bookingMoney);
                string TotalMoney_BookingHString = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(Library.StringUtility.ConvertDecimalToString(Convert.ToDecimal(afterTax - bookingMoney)));

                lblTotalMoneyString.Text = "(" + TotalMoney_BookingHString + ")";
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public frmRpt_Payment_BookingRsAndBookingHs(NewPaymentEN aNewPaymentEN)
        {
            InitializeComponent();
            this.aNewPaymentEN = aNewPaymentEN;
            try
            {

                lblNumberVote.Text = Convert.ToString(this.aNewPaymentEN.IDBookingR);
                lblIIDBookingR.Text = Convert.ToString(this.aNewPaymentEN.IDBookingR);
                lblNameCustomer.Text = this.aNewPaymentEN.NameCustomer;
                lblGroup.Text = this.aNewPaymentEN.NameCustomerGroup;
                lblCompany.Text = this.aNewPaymentEN.NameCompany;
                lblTaxNumberCode.Text = this.aNewPaymentEN.TaxNumberCodeCompany;

                int day = DateTime.Now.Day;
                int month = DateTime.Now.Month;
                int year = DateTime.Now.Year;
                lblDayMonthYear.Text = "Hà nội , ngày " + day.ToString() + " tháng " + month.ToString() + " năm " + year.ToString();

                #region Phòng

                aListServiceUsedRoom = this.aNewPaymentEN.GetAllServiceUsedInRoom();
                //Lấy List< IDServiceGroup>
                List<int> aTemp = new List<int>();
                int IDServiceGroup;
                foreach (ServiceUsedEN item in aListServiceUsedRoom)
                {
                    IDServiceGroup = new int();
                    IDServiceGroup = item.IDServiceGroup;
                    aTemp.Add(IDServiceGroup);
                }
                aListIDServicesGroupRoom = aTemp.Distinct().ToList();

                ServiceGroupEN aServicesGroupEN;
                ServiceGroupsBO aServiceGroupsBO = new ServiceGroupsBO();

                foreach (int item in aListIDServicesGroupRoom)
                {
                    aServicesGroupEN = new ServiceGroupEN();
                    aServicesGroupEN.IDServiceGroup = item;
                    aServicesGroupEN.TotalMoneyBeforeTax = this.GetTotalMoneyServiceGroupRoomBeforeTax(item);
                    aServicesGroupEN.TotalMoneyAfterTax = this.GetTotalMoneyServiceGroupRoomAfterTax(item);
                    aServicesGroupEN.DisplayMoneyTax = aNewPaymentEN.GetMoneyTax(this.GetTotalMoneyServiceGroupRoomBeforeTax(item), 10);
                    aServicesGroupEN.ServiceGroupName = aServiceGroupsBO.Sel_ByID(item).Name;
                    aListServicesGroupRoomEN.Add(aServicesGroupEN);
                }

                //danh sach phong
                this.DetailReport.DataSource = aNewPaymentEN.aListBookingRoomUsed;

                colSkuRoom.DataBindings.Add("Text", this.DetailReport.DataSource, "RoomSku");
                colCheckIn.DataBindings.Add("Text", this.DetailReport.DataSource, "CheckInActual", "{0:dd-MM-yyyy HH:mm}");
                colCheckOut.DataBindings.Add("Text", this.DetailReport.DataSource, "CheckOutActual", "{0:dd-MM-yyyy HH:mm}");
                colBookingRoomCost.DataBindings.Add("Text", this.DetailReport.DataSource, "Cost", "{0:0,0}");
                colDateInUse.DataBindings.Add("Text", this.DetailReport.DataSource, "DateUsed", "{0:0,0}");
                colMoneyRoomBeforeTax.DataBindings.Add("Text", this.DetailReport.DataSource, "MoneyRoomBeforeTax", "{0:0,0}");
                colPercentTaxRoom.DataBindings.Add("Text", this.DetailReport.DataSource, "DisplayMoneyTaxRoom", "{0:0,0}");
                colPaymentMoneyRoom.DataBindings.Add("Text", this.DetailReport.DataSource, "MoneyRoom", "{0:0,0}");

                XRSummary aXRSummaryMoneyRoomBeforeTax = new XRSummary();
                aXRSummaryMoneyRoomBeforeTax.Func = SummaryFunc.Sum;
                aXRSummaryMoneyRoomBeforeTax.Running = SummaryRunning.Group;
                aXRSummaryMoneyRoomBeforeTax.IgnoreNullValues = true;
                aXRSummaryMoneyRoomBeforeTax.FormatString = "{0:0,0}";
                XRBinding aXRBindingMoneyRoomBeforeTax = new XRBinding("Text", this.DetailReport.DataSource, "MoneyRoomBeforeTax", "{0:0,0}");
                XRBinding[] listXRBindingMoneyRoomBeforeTax = new XRBinding[] { aXRBindingMoneyRoomBeforeTax };
                lblSumMoneyRoomsBeforeTax.DataBindings.AddRange(listXRBindingMoneyRoomBeforeTax);
                lblSumMoneyRoomsBeforeTax.Summary = aXRSummaryMoneyRoomBeforeTax;

                XRSummary aXRSummaryDisplayMoneyTaxRoom = new XRSummary();
                aXRSummaryDisplayMoneyTaxRoom.Func = SummaryFunc.Sum;
                aXRSummaryDisplayMoneyTaxRoom.Running = SummaryRunning.Group;
                aXRSummaryDisplayMoneyTaxRoom.IgnoreNullValues = true;
                aXRSummaryDisplayMoneyTaxRoom.FormatString = "{0:0,0}";
                XRBinding aXRBindingDisplayMoneyTaxRoom = new XRBinding("Text", this.DetailReport.DataSource, "DisplayMoneyTaxRoom", "{0:0,0})");
                XRBinding[] listXRBindingDisplayMoneyTaxRoom = new XRBinding[] { aXRBindingDisplayMoneyTaxRoom };
                lblSumMoneyRoomTax.DataBindings.AddRange(listXRBindingDisplayMoneyTaxRoom);
                lblSumMoneyRoomTax.Summary = aXRSummaryDisplayMoneyTaxRoom;

                XRSummary aXRSummaryMoneyRoom = new XRSummary();
                aXRSummaryMoneyRoom.Func = SummaryFunc.Sum;
                aXRSummaryMoneyRoom.Running = SummaryRunning.Group;
                aXRSummaryMoneyRoom.IgnoreNullValues = true;
                aXRSummaryMoneyRoom.FormatString = "{0:0,0}";
                XRBinding aXRBindingMoneyRoom = new XRBinding("Text", this.DetailReport.DataSource, "MoneyRoom", "{0:0,0}");
                XRBinding[] listXRBindingMoneyRoom = new XRBinding[] { aXRBindingMoneyRoom };
                lblSumMoneyRoomsAfterTax.DataBindings.AddRange(listXRBindingMoneyRoom);
                lblSumMoneyRoomsAfterTax.Summary = aXRSummaryMoneyRoom;

                //danh sach dich vu
                this.DetailReport2.DataSource = aListServicesGroupRoomEN;
                colNamServiceRoom.DataBindings.Add("Text", this.DetailReport2.DataSource, "ServiceGroupName");
                colTotalMoneyServiceRoomBeforeTax.DataBindings.Add("Text", this.DetailReport2.DataSource, "TotalMoneyBeforeTax", "{0:0,0}");
                colPercentTaxServiceRoom.DataBindings.Add("Text", this.DetailReport2.DataSource, "DisplayMoneyTax", "{0:0,0}");
                colTotalMoneyServiceRoomAfterTax.DataBindings.Add("Text", this.DetailReport2.DataSource, "TotalMoneyAfterTax", "{0:0,0}");

                XRSummary aXRSummaryTotalMoneyBeforeTax = new XRSummary();
                aXRSummaryTotalMoneyBeforeTax.Func = SummaryFunc.Sum;
                aXRSummaryTotalMoneyBeforeTax.Running = SummaryRunning.Group;
                aXRSummaryTotalMoneyBeforeTax.IgnoreNullValues = true;
                aXRSummaryTotalMoneyBeforeTax.FormatString = "{0:0,0}";
                lblSumMoneyServiceRoomsBeforeTax.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", this.DetailReport2.DataSource, "TotalMoneyBeforeTax", "{0:0,0}") });
                lblSumMoneyServiceRoomsBeforeTax.Summary = aXRSummaryTotalMoneyBeforeTax;

                XRSummary aXRSummaryDisplayMoneyTax = new XRSummary();
                aXRSummaryDisplayMoneyTax.Func = SummaryFunc.Sum;
                aXRSummaryDisplayMoneyTax.Running = SummaryRunning.Group;
                aXRSummaryDisplayMoneyTax.IgnoreNullValues = true;
                aXRSummaryDisplayMoneyTax.FormatString = "{0:0,0}";
                lblSumMoneyServiceRoomsTax.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", this.DetailReport2.DataSource, "DisplayMoneyTax", "{0:0,0}") });
                lblSumMoneyServiceRoomsTax.Summary = aXRSummaryDisplayMoneyTax;

                XRSummary aXRSummaryTotalMoneyAfterTax = new XRSummary();
                aXRSummaryTotalMoneyAfterTax.Func = SummaryFunc.Sum;
                aXRSummaryTotalMoneyAfterTax.Running = SummaryRunning.Group;
                aXRSummaryTotalMoneyAfterTax.IgnoreNullValues = true;
                aXRSummaryTotalMoneyAfterTax.FormatString = "{0:0,0}";
                lblSumMoneyServiceRoomsAfterTax.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", this.DetailReport2.DataSource, "TotalMoneyAfterTax", "{0:0,0}") });
                lblSumMoneyServiceRoomsAfterTax.Summary = aXRSummaryTotalMoneyAfterTax;

                #endregion
                #region Hội trường
                aListServiceUsedHall = this.aNewPaymentEN.GetAllServiceUsedInHall();
                //Lấy List< IDServiceGroup>
                List<int> aTemp1 = new List<int>();
                int IDServiceGroupHall;
                foreach (ServiceUsedEN item in aListServiceUsedHall)
                {
                    IDServiceGroupHall = new int();
                    IDServiceGroupHall = item.IDServiceGroup;
                    aTemp1.Add(IDServiceGroupHall);
                }
                aListIDServicesGroupHall = aTemp1.Distinct().ToList();

                ServiceGroupEN aServicesGroupHallEN;
                foreach (int item in aListIDServicesGroupHall)
                {
                    aServicesGroupHallEN = new ServiceGroupEN();
                    aServicesGroupHallEN.IDServiceGroup = item;
                    aServicesGroupHallEN.TotalMoneyBeforeTax = this.GetTotalMoneyServiceGroupHallBeforeTax(item);
                    aServicesGroupHallEN.TotalMoneyAfterTax = this.GetTotalMoneyServiceGroupHallAfterTax(item);
                    aServicesGroupHallEN.DisplayMoneyTax = aNewPaymentEN.GetMoneyTax(this.GetTotalMoneyServiceGroupHallBeforeTax(item), 10);
                    aServicesGroupHallEN.ServiceGroupName = aServiceGroupsBO.Sel_ByID(item).Name;
                    aListServicesGroupHallEN.Add(aServicesGroupHallEN);
                }

                //danh sach hoi truong
                this.DetailReportHall.DataSource = aNewPaymentEN.aListBookingHallUsed;
                colSkuHall.DataBindings.Add("Text", this.DetailReportHall.DataSource, "HallSku");
                colCreateDate.DataBindings.Add("Text", this.DetailReportHall.DataSource, "Date", "{0:dd/MM/yyyy}");
                colBookingHallCost.DataBindings.Add("Text", this.DetailReportHall.DataSource, "Cost", "{0:0,0}");
                colPercentTax.DataBindings.Add("Text", this.DetailReportHall.DataSource, "DisplayMoneyTaxHall", "{0:0,0}");
                colPaymentMoneyHall.DataBindings.Add("Text", this.DetailReportHall.DataSource, "MoneyHall", "{0:0,0}");

                XRSummary aXRSummaryDisplayMoneyTaxHall = new XRSummary();
                aXRSummaryDisplayMoneyTaxHall.Func = SummaryFunc.Sum;
                aXRSummaryDisplayMoneyTaxHall.Running = SummaryRunning.Group;
                aXRSummaryDisplayMoneyTaxHall.IgnoreNullValues = true;
                aXRSummaryDisplayMoneyTaxHall.FormatString = "{0:0,0}";
                XRBinding aXRBindingDisplayMoneyTaxHall = new XRBinding("Text", this.DetailReportHall.DataSource, "DisplayMoneyTaxHall", "{0:0,0}");
                XRBinding[] listXRBindingDisplayMoneyTaxHall = new XRBinding[] { aXRBindingDisplayMoneyTaxHall };
                lblSumMoneyHallsTax.DataBindings.AddRange(listXRBindingDisplayMoneyTaxHall);
                lblSumMoneyHallsTax.Summary = aXRSummaryDisplayMoneyTaxHall;

                //danh sach dich vu su dung
                this.DetailReportService.DataSource = aListServicesGroupHallEN;
                colNamServiceHall.DataBindings.Add("Text", this.DetailReportService.DataSource, "ServiceGroupName");
                colTotalMoneyServiceHallBeforeTax.DataBindings.Add("Text", this.DetailReportService.DataSource, "TotalMoneyBeforeTax", "{0:0,0}");
                colPercentTaxServiceHall.DataBindings.Add("Text", this.DetailReportService.DataSource, "DisplayMoneyTax", "{0:0,0}");

                colTotalMoneyServiceHallAfterTax.DataBindings.Add("Text", this.DetailReportService.DataSource, "TotalMoneyAfterTax", "{0:0,0}");

                XRSummary aXRSummaryDisplayMoneyServiceHallTax = new XRSummary();
                aXRSummaryDisplayMoneyServiceHallTax.Func = SummaryFunc.Sum;
                aXRSummaryDisplayMoneyServiceHallTax.Running = SummaryRunning.Group;
                aXRSummaryDisplayMoneyServiceHallTax.IgnoreNullValues = true;
                aXRSummaryDisplayMoneyServiceHallTax.FormatString = "{0:0,0}";
                lblSumMoneyServiceHallsTax.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", this.DetailReportService.DataSource, "DisplayMoneyTax", "{0:0,0}") });
                lblSumMoneyServiceHallsTax.Summary = aXRSummaryDisplayMoneyServiceHallTax;

                //tong tien hoi truong truoc thue
                lblSumMoneyHallsBeforeTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetOnlyMoneyHallsBeforeTax()));
                //tong tien hoi truong sau thue
                lblSumMoneyHallsAfterTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetOnlyMoneyHalls()));

                //tong tien dich vu hoi truong truoc thue
                lblSumMoneyServiceHallsBeforeTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoneyServiceUsedInHallsBeforeTax()));
                //tong tien dich vu hoi truong sau thue
                lblSumMoneyServiceHallsAfterTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoneyServiceUsedInHalls()));

                //Tong tien hoa don can thanh toan
                decimal? beforTax = Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoneyBeforeTax());
                decimal? afterTax = Convert.ToDecimal(this.aNewPaymentEN.GetTotalMoney());
                decimal? bookingMoney = Convert.ToDecimal(this.aNewPaymentEN.BookingHMoney) + Convert.ToDecimal(this.aNewPaymentEN.BookingRMoney);

                //tong tien thanh toan truoc thue
                lblTotalMoneyBeforeTax.Text = String.Format("{0:0,0}", beforTax);
                //tien thue
                lblTotalMoneyTax.Text = String.Format("{0:0,0}", Convert.ToDecimal(this.aNewPaymentEN.GetMoneyTax(beforTax, 10)));
                //tong tien thanh toan sau thue
                lblTotalMoneyAfterTax.Text = String.Format("{0:0,0}", afterTax);
                //So tien ung truoc
                lblBookingMoney.Text = String.Format("{0:0,0}", bookingMoney);
                //so tien con lai can thanh toan
                lblTotalMoney.Text = String.Format("{0:0,0}", afterTax - bookingMoney);
                string TotalMoney_BookingRString = UppercaseFirst(StringUtility.ConvertDecimalToString(Convert.ToDecimal(afterTax - bookingMoney)));

                lblTotalMoneyString.Text = "(" + TotalMoney_BookingRString + ")";
                #endregion
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public frmRpt_GroupPayment_Rs(List<RptPaymentStyle1_ForPrint> aListData,string CompanyName, string Address, string NameCustomerGroup,string InvoiceNumber
            , DateTime FirstDate, DateTime LastDate, decimal? BookingHMoney, decimal? BookingRMoney, int IDBookingR)
        {
            InitializeComponent();

            this.aListData = aListData;
            foreach (RptPaymentStyle1_ForPrint aItem in aListData)
            {
                TotalServiceMoney = TotalServiceMoney + aItem.TotalServiceMoney;
                TotalMoneyBeforeTax = TotalMoneyBeforeTax + aItem.TotalMoney;
                aItem.Room_Fee = aItem.Room_Fee + aItem.Hall_Fee;  // Gộp 2 cột
            }
            //Truyền dữ liệu cho Detail
            lblCompanyName.Text = CompanyName;
            lblAddress.Text = Address;
            lblCustomerGroupName.Text = NameCustomerGroup;

            lblCheckIn.Text = FirstDate.ToString("dd-MM-yyyy");
            lblCheckOut.Text = LastDate.ToString("dd-MM-yyyy");

            BookingRs aBookingRs = new BookingRs();
            aBookingRs = (new BookingRsBO()).Select_ByID(IDBookingR);

            lblIDBookingR.Text = IDBookingR.ToString();
            lblInvoiceNumber.Text = aBookingRs.InvoiceNumber;
            lblInvoiceDate.Text = aBookingRs.InvoiceDate.GetValueOrDefault().Date.ToShortDateString();
            lbAcceptDate.Text = aBookingRs.AcceptDate.GetValueOrDefault().Date.ToShortDateString();

            this.DetailReport.DataSource = this.aListData;
            colDate.DataBindings.Add("Text", this.DetailReport.DataSource, "Date", "{0:dd-MM}");
            colDescription.DataBindings.Add("Text", this.DetailReport.DataSource, "Note");
            colNumberCus.DataBindings.Add("Text", this.DetailReport.DataSource, "CountCustomerInGroup");
            colMoneyRoom.DataBindings.Add("Text", this.DetailReport.DataSource, "Room_Fee", "{0:0,0}");
            colTotalARoom.DataBindings.Add("Text", this.DetailReport.DataSource, "TotalMoney", "{0:0,0}");
               // colHallMoney.DataBindings.Add("Text", this.DetailReport.DataSource, "Hall_Fee", "{0:0,0}");
            colMealMoney.DataBindings.Add("Text", this.DetailReport.DataSource, "MealMoney", "{0:0,0}");
            colDrinkMoney.DataBindings.Add("Text", this.DetailReport.DataSource, "DrinkMoney", "{0:0,0}");
            colRoomServiceMoney.DataBindings.Add("Text", this.DetailReport.DataSource, "RoomServiceMoney", "{0:0,0}");
            colOtherMoney.DataBindings.Add("Text", this.DetailReport.DataSource, "OtherMoney", "{0:0,0}");

            colMoneyService.Text = TotalServiceMoney.ToString("0,0");
            colMoneyBeforeTax.Text = TotalMoneyBeforeTax.ToString("0,0");
            colMoneyTax.Text = (TotalMoneyBeforeTax * 10 / 100).ToString("0,0");
            colMoneyAfterTax.Text = (TotalMoneyBeforeTax * 110 / 100).ToString("0,0");
            colBookingMoney.Text = Convert.ToDecimal(BookingHMoney + BookingHMoney).ToString("0,0");
            colTotalMoneyPay.Text = ((TotalMoneyBeforeTax * 110 / 100) - Convert.ToDecimal(BookingHMoney + BookingHMoney)).ToString("0,0");
            string TotalMoney_String = UppercaseFirst(StringUtility.ConvertDecimalToString((TotalMoneyBeforeTax * 110 / 100) - Convert.ToDecimal(BookingHMoney + BookingHMoney)));
            lblConvertToString.Text = TotalMoney_String;

            int day = DateTime.Now.Day;
            int month = DateTime.Now.Month;
            int year = DateTime.Now.Year;
            lblDayMonthYear.Text = "Hà nội , ngày " + day.ToString() + " tháng " + month.ToString() + " năm " + year.ToString();

            //--------------Tính tổng---------------------------------
            XRSummary aXRSummaryMoney = new XRSummary();
            aXRSummaryMoney.Func = SummaryFunc.Sum;
            aXRSummaryMoney.Running = SummaryRunning.Group;
            aXRSummaryMoney.IgnoreNullValues = true;
            aXRSummaryMoney.FormatString = "{0:0,0}";
            XRBinding aXRBindingMoney = new XRBinding("Text", this.DetailReport.DataSource, "TotalMoney", "{0:0,0}");
            XRBinding[] listXRBindingMoney = new XRBinding[] { aXRBindingMoney };
            colSumTotalMoney.DataBindings.AddRange(listXRBindingMoney);
            colSumTotalMoney.Summary = aXRSummaryMoney;

            XRSummary aXRSumDrinkMoney = new XRSummary();
            aXRSumDrinkMoney.Func = SummaryFunc.Sum;
            aXRSumDrinkMoney.Running = SummaryRunning.Group;
            aXRSumDrinkMoney.IgnoreNullValues = true;
            aXRSumDrinkMoney.FormatString = "{0:0,0}";
            XRBinding aXRBinding = new XRBinding("Text", this.DetailReport.DataSource, "DrinkMoney", "{0:0,0}");
            XRBinding[] aList_aXRBinding = new XRBinding[] { aXRBinding };
            colSumDrinkMoney.DataBindings.AddRange(aList_aXRBinding);
            colSumDrinkMoney.Summary = aXRSumDrinkMoney;

            //XRSummary aXRSumHallMoney = new XRSummary();
            //aXRSumHallMoney.Func = SummaryFunc.Sum;
            //aXRSumHallMoney.Running = SummaryRunning.Group;
            //aXRSumHallMoney.IgnoreNullValues = true;
            //aXRSumHallMoney.FormatString = "{0:0,0}";
            //XRBinding aXRBinding1 = new XRBinding("Text", this.DetailReport.DataSource, "Hall_Fee", "{0:0,0}");
            //XRBinding[] aList_aXRBinding1 = new XRBinding[] { aXRBinding1 };
            //colSumHallMoney.DataBindings.AddRange(aList_aXRBinding1);
            //colSumHallMoney.Summary = aXRSumHallMoney;

            XRSummary aXRSumMealMoney = new XRSummary();
            aXRSumMealMoney.Func = SummaryFunc.Sum;
            aXRSumMealMoney.Running = SummaryRunning.Group;
            aXRSumMealMoney.IgnoreNullValues = true;
            aXRSumMealMoney.FormatString = "{0:0,0}";
            XRBinding aXRBinding2 = new XRBinding("Text", this.DetailReport.DataSource, "MealMoney", "{0:0,0}");
            XRBinding[] aList_aXRBinding2 = new XRBinding[] { aXRBinding2 };
            colSumMealMoney.DataBindings.AddRange(aList_aXRBinding2);
            colSumMealMoney.Summary = aXRSumMealMoney;

            XRSummary aXRSumMoneyRoom = new XRSummary();
            aXRSumMoneyRoom.Func = SummaryFunc.Sum;
            aXRSumMoneyRoom.Running = SummaryRunning.Group;
            aXRSumMoneyRoom.IgnoreNullValues = true;
            aXRSumMoneyRoom.FormatString = "{0:0,0}";
            XRBinding aXRBinding3 = new XRBinding("Text", this.DetailReport.DataSource, "Room_Fee", "{0:0,0}");
            XRBinding[] aList_aXRBinding3 = new XRBinding[] { aXRBinding3 };
            colSumMoneyRoom.DataBindings.AddRange(aList_aXRBinding3);
            colSumMoneyRoom.Summary = aXRSumMoneyRoom;

            XRSummary aXRSumOtherMoney = new XRSummary();
            aXRSumOtherMoney.Func = SummaryFunc.Sum;
            aXRSumOtherMoney.Running = SummaryRunning.Group;
            aXRSumOtherMoney.IgnoreNullValues = true;
            aXRSumOtherMoney.FormatString = "{0:0,0}";
            XRBinding aXRBinding4 = new XRBinding("Text", this.DetailReport.DataSource, "OtherMoney", "{0:0,0}");
            XRBinding[] aList_aXRBinding4 = new XRBinding[] { aXRBinding4 };
            colSumOtherMoney.DataBindings.AddRange(aList_aXRBinding4);
            colSumOtherMoney.Summary = aXRSumOtherMoney;

            XRSummary aXRSumRoomServiceMoney = new XRSummary();
            aXRSumRoomServiceMoney.Func = SummaryFunc.Sum;
            aXRSumRoomServiceMoney.Running = SummaryRunning.Group;
            aXRSumRoomServiceMoney.IgnoreNullValues = true;
            aXRSumRoomServiceMoney.FormatString = "{0:0,0}";
            XRBinding aXRBinding5 = new XRBinding("Text", this.DetailReport.DataSource, "RoomServiceMoney", "{0:0,0}");
            XRBinding[] aList_aXRBinding5 = new XRBinding[] { aXRBinding5 };
            colSumRoomServiceMoney.DataBindings.AddRange(aList_aXRBinding5);
            colSumRoomServiceMoney.Summary = aXRSumRoomServiceMoney;
        }