Exemplo n.º 1
0
        public ROInvoiceXSlistBiao(ConditionX condition)
            : this()
        {
            this.xrLabelReportName.Text = "Schedule of accounts receivable";
            this.lblCustomerName.Text   = condition.Customer1 == null ? "" : condition.Customer1.ToString();
            this.lblDateRange.Text      = " Date range:" + condition.StartDate.ToString("yyyy-MM-dd") + " ~ " + condition.EndDate.ToString("yyyy-MM-dd");
            //bind
            //this.DataSource = this.detailManager.SelectbyConditionX(condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Customer1, condition.Customer2, condition.XOId1, condition.XOId2, condition.Product, condition.Product2, condition.CusXOId, condition.OrderColumn, condition.OrderType);
            if ((bool)condition.Special)
            {
                this.DataSource = this.detailManager.SelectbyConditionXBiao(condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Customer1, condition.Customer2, condition.XOId1, condition.XOId2, condition.Product, condition.Product2, condition.CusXOId, condition.OrderColumn, condition.OrderType, false);
                dt = this.detailManager.SelectbyConditionXBiao(condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Customer1, condition.Customer2, condition.XOId1, condition.XOId2, condition.Product, condition.Product2, condition.CusXOId, condition.OrderColumn, condition.OrderType, condition.Special);
            }
            else
            {
                this.DataSource = this.detailManager.SelectbyConditionXBiao(condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Customer1, condition.Customer2, condition.XOId1, condition.XOId2, condition.Product, condition.Product2, condition.CusXOId, condition.OrderColumn, condition.OrderType, null);
            }

            //if (this.DataSource == null || (this.DataSource as IList<Model.InvoiceXSDetail>).Count == 0)
            if ((this.DataSource == null || (this.DataSource as System.Data.DataTable).Rows.Count == 0) && dt.Rows.Count == 0)
            {
                throw new global::Helper.InvalidValueException("No data");
            }

            this.tcCHDH.DataBindings.Add("Text", this.DataSource, "CHDH");
            this.tcCHRQ.DataBindings.Add("Text", this.DataSource, "CHRQ", "{0:yyyy-MM-dd}");
            this.tcProductName.DataBindings.Add("Text", this.DataSource, "ProductName");
            this.tcKHDDBH.DataBindings.Add("Text", this.DataSource, "KHDDBH");
            //this.tcDDSL.DataBindings.Add("Text", this.DataSource, "");
            this.tcBCCHSL.DataBindings.Add("Text", this.DataSource, "BCCHSL", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.XSSLXiao.Value));
            this.tcDW.DataBindings.Add("Text", this.DataSource, "DanWei");
            this.tcDJ.DataBindings.Add("Text", this.DataSource, "DanJia", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.CGDJXiao.Value));
            this.tcZheRang.DataBindings.Add("Text", this.DataSource, "ZheRang", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.CGJEXiao.Value));
            this.tcJinE.DataBindings.Add("Text", this.DataSource, "JinE");
            this.tcShuiE.DataBindings.Add("Text", this.DataSource, "ShuiE", "{0:0}");
            this.tcYingShou.DataBindings.Add("Text", this.DataSource, "YingShou");

            if (dt.Rows.Count > 0)
            {
                this.xrSubreport1.ReportSource = new ROInvoiceXSlistBiaoSub(dt);
            }

            this.TCZHeJi.Summary.FormatString     = "{0:0}";
            this.TCZHeJi.Summary.Func             = SummaryFunc.Sum;
            this.TCZHeJi.Summary.IgnoreNullValues = true;
            this.TCZHeJi.Summary.Running          = SummaryRunning.Report;
            this.TCZHeJi.DataBindings.Add("Text", this.DataSource, "JinE");

            this.TCZShuiE.Summary.FormatString     = "{0:0}";
            this.TCZShuiE.Summary.Func             = SummaryFunc.Sum;
            this.TCZShuiE.Summary.IgnoreNullValues = true;
            this.TCZShuiE.Summary.Running          = SummaryRunning.Report;
            this.TCZShuiE.DataBindings.Add("Text", this.DataSource, "ShuiE");

            this.TCZZongJi.Summary.FormatString     = "{0:0}";
            this.TCZZongJi.Summary.Func             = SummaryFunc.Sum;
            this.TCZZongJi.Summary.IgnoreNullValues = true;
            this.TCZZongJi.Summary.Running          = SummaryRunning.Report;
            this.TCZZongJi.DataBindings.Add("Text", this.DataSource, "YingShou");
        }
Exemplo n.º 2
0
        public ROInvoiceXOlist_BackUp(ConditionX condition)
            : this()
        {
            DateTime start = condition.StartDate;
            DateTime end   = condition.EndDate;

            this.xrLabelReportName.Text = Properties.Resources.InvoiceXODetail;

            this.xrLabelDateRange.Text = string.Format(Properties.Resources.DateRange, start.ToString("yyyy-MM-dd"), end.ToString("yyyy/MM/dd"));

            IList <Model.InvoiceXODetail> Details = invoicexoDetailManager.Select(condition.Customer1, condition.Customer2, condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Employee1, condition.Employee2, condition.XOId1, condition.XOId2, condition.CusXOId, condition.Product, condition.Product2, condition.IsClose, false, condition.OrderColumn, condition.OrderType, condition.DetailFlag, condition.DepotId, condition.HandBookId);

            if (Details == null || Details.Count == 0)
            {
                throw new Helper.InvalidValueException("ŸoÓ›ä›");
            }

            this.DataSource = Details;

            //this.TCchkh.DataBindings.Add("Text", this.DataSource, "Invoice.xocustomer." + Model.Customer.PRO_CustomerShortName);
            //this.TCcpxh.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName);
            //this.TCdanjia.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailPrice, "{0:000}");
            //this.TCdingdanbianhao.DataBindings.Add("Text", this.DataSource, "Invoice." + Model.InvoiceXO.PROPERTY_INVOICEID);
            //this.TCjinge.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailMoney, "{0:0}");
            //this.TCkh.DataBindings.Add("Text", this.DataSource, "Invoice.Customer." + Model.Customer.PRO_CustomerShortName);
            //this.TCkhddbh.DataBindings.Add("Text", this.DataSource, "Invoice." + Model.InvoiceXO.PRO_CustomerInvoiceXOId);
            //this.TCkhxh.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_CustomerProductName);
            //this.TCriqi.DataBindings.Add("Text", this.DataSource, "Invoice." + Model.InvoiceXO.PROPERTY_INVOICEDATE, "{0:yyyy/MM/dd}");
            //this.TCshuliang.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity);
            //this.TCyjrq.DataBindings.Add("Text", this.DataSource, "Invoice." + Model.InvoiceXO.PRO_InvoiceYjrq, "{0:yyyy/MM/dd}");
            //this.TCInvoiceXODetailBeenQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailBeenQuantity);
            //this.TCInvoiceXTDetailQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXTDetailQuantity);

            this.TCDepot.DataBindings.Add("Text", this.DataSource, "DepotName");
            this.TCkhddbh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_CustomerInvoiceXOId);
            this.TCdanjia.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailPrice, "{0:000}");
            this.TCjinge.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailMoney, "{0:0}");
            this.TCkh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_CustomerName);
            this.TCchkh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_XOCustomerName);
            this.TCcpxh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_ProductName);
            this.TCkhxh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_CustomerProductName);
            this.TCriqi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceDate, "{0:yyyy/MM/dd}");
            this.TCyjrq.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceYjrq, "{0:yyyy/MM/dd}");
            this.TCshuliang.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity);
            this.TCInvoiceXODetailBeenQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailBeenQuantity);
            this.TCInvoiceXTDetailQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXTDetailQuantity);


            this.xrlblTotalShuliang.Summary.FormatString     = "{0:0}";
            this.xrlblTotalShuliang.Summary.Func             = SummaryFunc.Sum;
            this.xrlblTotalShuliang.Summary.IgnoreNullValues = true;
            this.xrlblTotalShuliang.Summary.Running          = SummaryRunning.Report;
            this.xrlblTotalShuliang.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity);

            this.xrlblTotalJinE.Summary.FormatString     = "{0:0}";
            this.xrlblTotalJinE.Summary.Func             = SummaryFunc.Sum;
            this.xrlblTotalJinE.Summary.IgnoreNullValues = true;
            this.xrlblTotalJinE.Summary.Running          = SummaryRunning.Report;
            this.xrlblTotalJinE.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailMoney);
        }
Exemplo n.º 3
0
        public ROInvoiceXOlist(ConditionX condition, string reportName)
            : this()
        {
            DateTime start = condition.StartDate;
            DateTime end   = condition.EndDate;


            this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName;
            this.lbl_ReportDate.Text         = string.Format(Properties.Resources.Book_UI_Query_BaseReport_InvoiceDate, DateTime.Now.ToString("yyyy-MM-dd"));
            this.lbl_ReportName.Text         = reportName;
            this.xrLabelDateRange.Text       = string.Format(Properties.Resources.DateRange, start.ToString("yyyy-MM-dd"), end.ToString("yyyy/MM/dd"));

            IList <Model.InvoiceXODetail> Details = invoicexoDetailManager.Select(condition.Customer1, condition.Customer2, condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Employee1, condition.Employee2, condition.XOId1, condition.XOId2, condition.CusXOId, condition.Product, condition.Product2, condition.IsClose, false, condition.OrderColumn, condition.OrderType, condition.DetailFlag, condition.DepotId, condition.HandBookId);

            if (Details == null || Details.Count == 0)
            {
                throw new Helper.InvalidValueException("無記錄");
            }

            this.DataSource = Details;


            this.TCDepot.DataBindings.Add("Text", this.DataSource, "DepotName");
            this.TCkhddbh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_CustomerInvoiceXOId);
            this.TCdanjia.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailPrice, "{0:000}");
            this.TCjinge.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailMoney, "{0:0}");
            this.TCkh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_CustomerName);
            this.TCchkh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_XOCustomerName);
            this.TCProId.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_PId);
            this.TCcpxh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_ProductName);
            this.TCkhxh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_CustomerProductName);
            this.TCriqi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceDate, "{0:yyyy/MM/dd}");
            //this.TCyjrq.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceYjrq, "{0:yyyy/MM/dd}");
            this.TCyjrq.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXSDate, "{0:yyyy/MM/dd}");
            this.TCshuliang.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity);
            this.TCInvoiceXODetailBeenQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailBeenQuantity);
            this.TCInvoiceXTDetailQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXTDetailQuantity);
            this.TC_ShouceHao.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_HandbookId);
            this.TC_Xianghao.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_HandbookProductId);


            this.xrlblTotalShuliang.Summary.FormatString     = "{0:0}";
            this.xrlblTotalShuliang.Summary.Func             = SummaryFunc.Sum;
            this.xrlblTotalShuliang.Summary.IgnoreNullValues = true;
            this.xrlblTotalShuliang.Summary.Running          = SummaryRunning.Report;
            this.xrlblTotalShuliang.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity);

            this.xrlblTotalJinE.Summary.FormatString     = "{0:0}";
            this.xrlblTotalJinE.Summary.Func             = SummaryFunc.Sum;
            this.xrlblTotalJinE.Summary.IgnoreNullValues = true;
            this.xrlblTotalJinE.Summary.Running          = SummaryRunning.Report;
            this.xrlblTotalJinE.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailMoney);
        }
Exemplo n.º 4
0
        public ROInvoiceXO(ConditionX condition)
            : this()
        {
            DateTime start = condition.StartDate;
            DateTime end   = condition.EndDate;

            this.xrLabelReportName.Text = Properties.Resources.InvoiceXODetail;

            this.xrLabelDateRange.Text = string.Format(Properties.Resources.DateRange, start.ToString("yyyy-MM-dd"), end.ToString("yyyy/MM/dd"));

            IList <Model.InvoiceXO> Details = this.invoiceManager.SelectByYJRQCustomEmpCusXOId(condition.Customer1, condition.Customer2, condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Employee1, condition.Employee2, condition.XOId1, condition.XOId2, condition.CusXOId, condition.Product, condition.Product2, condition.IsClose, false, false);

            if (Details == null || Details.Count <= 0)
            {
                throw new global::Helper.InvalidValueException();
            }

            this.bindingSource1.DataSource = Details;

            this.lblInvoiceId.DataBindings.Add("Text", this.DataSource, Model.Invoice.PROPERTY_INVOICEID);
            this.lblInvoiceDate.DataBindings.Add("Text", this.DataSource, Model.Invoice.PROPERTY_INVOICEDATE, "{0:yyyy-MM-dd}");
            this.lblCustomer.DataBindings.Add("Text", this.DataSource, "Customer." + Model.Customer.PRO_CustomerFullName);
            this.lblLotNumber.DataBindings.Add("Text", this.DataSource, Model.InvoiceXO.PRO_CustomerLotNumber);
            // this.xrLabelEmp0.DataBindings.Add("Text", this.DataSource, "Employee0." + Model.Employee.PROPERTY_EMPLOYEENAME);
            this.xrLabelEmpCheck.DataBindings.Add("Text", this.DataSource, "Employee0." + Model.Employee.PROPERTY_EMPLOYEENAME);
            this.lblYJRQ.DataBindings.Add("Text", this.DataSource, Model.InvoiceXO.PRO_InvoiceYjrq, "{0:yyyy-MM-dd}");
            this.lblChuHuoCustomer.DataBindings.Add("Text", this.DataSource, "xocustomer." + Model.Customer.PRO_CustomerShortName);
            this.lblInvoiceHeji.DataBindings.Add("Text", this.DataSource, Model.InvoiceXO.PRO_InvoiceHeji, "{0:0}");
            this.lblInvoiceTax.DataBindings.Add("Text", this.DataSource, Model.InvoiceXO.PRO_InvoiceTax, "{0:0}");
            this.lblInvoiceTotal.DataBindings.Add("Text", this.DataSource, Model.InvoiceXO.PRO_InvoiceTotal, "{0:0}");
            this.lblCustomerInvoiceXOID.DataBindings.Add("Text", this.DataSource, Model.InvoiceXO.PRO_CustomerInvoiceXOId);

            this.xrLabelTotalHeJi.Summary.FormatString     = "{0:0}";
            this.xrLabelTotalHeJi.Summary.Func             = SummaryFunc.Sum;
            this.xrLabelTotalHeJi.Summary.IgnoreNullValues = true;
            this.xrLabelTotalHeJi.Summary.Running          = SummaryRunning.Report;
            this.xrLabelTotalHeJi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXS.PRO_InvoiceHeji, "{0:0}");

            this.xrLabelTotalTax.Summary.FormatString     = "{0:0}";
            this.xrLabelTotalTax.Summary.Func             = SummaryFunc.Sum;
            this.xrLabelTotalTax.Summary.IgnoreNullValues = true;
            this.xrLabelTotalTax.Summary.Running          = SummaryRunning.Report;
            this.xrLabelTotalTax.DataBindings.Add("Text", this.DataSource, Model.InvoiceXS.PRO_InvoiceTax, "{0:0}");

            this.xrLabelTotalZongJi.Summary.FormatString     = "{0:0}";
            this.xrLabelTotalZongJi.Summary.Func             = SummaryFunc.Sum;
            this.xrLabelTotalZongJi.Summary.IgnoreNullValues = true;
            this.xrLabelTotalZongJi.Summary.Running          = SummaryRunning.Report;
            this.xrLabelTotalZongJi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXS.PRO_InvoiceTotal, "{0:0}");

            this.xrSubreport1.ReportSource = new ROInvoiceXO_1(condition);
        }
Exemplo n.º 5
0
        public ROInvoiceXOlist(ConditionX condition)
            : this()
        {
            DateTime start = condition.StartDate;
            DateTime end   = condition.EndDate;

            this.lblCompanyName.Text = BL.Settings.CompanyChineseName;
            this.lbl_ReportName.Text = "客戶訂單明細表";

            this.lbl_ReportDate.Text += string.Format("{0} ~ {1}", start.ToString("yyyy-MM-dd"), end.ToString("yyyy/MM/dd"));

            IList <Model.InvoiceXODetail> Details = invoicexoDetailManager.Select(condition.Customer1, condition.Customer2, condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Employee1, condition.Employee2, condition.XOId1, condition.XOId2, condition.CusXOId, condition.Product, condition.Product2, condition.IsClose, false, condition.OrderColumn, condition.OrderType, condition.DetailFlag, condition.Product_Id, condition.ProductCategoryId);

            if (Details == null || Details.Count == 0)
            {
                throw new Helper.InvalidValueException("無記錄");
            }

            this.DataSource = Details;

            this.TCdingdanbianhao.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceId);
            this.TCkhddbh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_CustomerInvoiceXOId);
            this.TCkh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_CustomerName);
            this.TCcpxh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_ProductName);
            this.TCkhxh.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_CustomerProductName);
            this.TCriqi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceDate, "{0:yy/MM/dd}");
            this.TCshuliang.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity);
            this.TCjinge.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailMoney, "{0:0.##}");
            this.TC_TaibiMoney.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_TaibiMoney, "{0:0.##}");

            this.TotalQty.Summary.FormatString     = "{0:0.#}";
            this.TotalQty.Summary.Func             = SummaryFunc.Sum;
            this.TotalQty.Summary.IgnoreNullValues = true;
            this.TotalQty.Summary.Running          = SummaryRunning.Report;
            this.TotalQty.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity);

            this.lbl_TotalMoney.Summary.FormatString     = "{0:0.#}";
            this.lbl_TotalMoney.Summary.Func             = SummaryFunc.Sum;
            this.lbl_TotalMoney.Summary.IgnoreNullValues = true;
            this.lbl_TotalMoney.Summary.Running          = SummaryRunning.Report;
            this.lbl_TotalMoney.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailMoney);

            this.lbl_TotalTaibiMoney.Summary.FormatString     = "{0:0.#}";
            this.lbl_TotalTaibiMoney.Summary.Func             = SummaryFunc.Sum;
            this.lbl_TotalTaibiMoney.Summary.IgnoreNullValues = true;
            this.lbl_TotalTaibiMoney.Summary.Running          = SummaryRunning.Report;
            this.lbl_TotalTaibiMoney.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_TaibiMoney);
        }
Exemplo n.º 6
0
        public Q20(ConditionX condition)
            : this()
        {
            DateTime start = condition.StartDate;
            DateTime end   = condition.EndDate;

            this.xrLabelReportName.Text    = Properties.Resources.CHDetail;
            this.xrLabelDateRange.Text     = string.Format(Properties.Resources.DateRange, start.ToString("yyyy-MM-dd"), end.ToString("yyyy/MM/dd"));
            this.bindingSource1.DataSource = this.invoiceManager.SelectDateRangAndWhere(condition.Customer1, condition.StartDate, condition.EndDate, condition.CusXOId, condition.Product, null, null, null);

            if (this.bindingSource1.DataSource == null)
            {
                throw new global::Helper.InvalidValueException("無數據");
            }
            this.xrLabelInvoiceId.DataBindings.Add("Text", this.DataSource, Model.Invoice.PROPERTY_INVOICEID);
            this.xrLabelInvoiceDate.DataBindings.Add("Text", this.DataSource, Model.Invoice.PROPERTY_INVOICEDATE, "{0:yyyy-MM-dd}");
            this.xrLabelSupplier.DataBindings.Add("Text", this.DataSource, "Customer." + Model.Customer.PRO_CustomerFullName);
            this.xrLabelDepot.DataBindings.Add("Text", this.DataSource, "Depot." + Model.Depot.PRO_DepotName);
            this.xrLabelEmp0.DataBindings.Add("Text", this.DataSource, "Employee0." + Model.Employee.PROPERTY_EMPLOYEENAME);
            this.xrLabelEmpCheck.DataBindings.Add("Text", this.DataSource, "Employee1." + Model.Employee.PROPERTY_EMPLOYEENAME);
            this.xrLabelCGDate.DataBindings.Add("Text", this.DataSource, Model.Invoice.PROPERTY_INVOICEDATE, "{0:yyyy-MM-dd}");
            this.xrLabelChuHuoCustomer.DataBindings.Add("Text", this.DataSource, "XSCustomer." + Model.Customer.PRO_CustomerFullName);
            this.xrLabelTotalHeJi.Summary.FormatString     = "{0:0}";
            this.xrLabelTotalHeJi.Summary.Func             = SummaryFunc.Sum;
            this.xrLabelTotalHeJi.Summary.IgnoreNullValues = true;
            this.xrLabelTotalHeJi.Summary.Running          = SummaryRunning.Report;
            this.xrLabelTotalHeJi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXS.PRO_InvoiceHeji, "{0:0}");

            this.xrLabelTotalTax.Summary.FormatString     = "{0:0}";
            this.xrLabelTotalTax.Summary.Func             = SummaryFunc.Sum;
            this.xrLabelTotalTax.Summary.IgnoreNullValues = true;
            this.xrLabelTotalTax.Summary.Running          = SummaryRunning.Report;
            this.xrLabelTotalTax.DataBindings.Add("Text", this.DataSource, Model.InvoiceXS.PRO_InvoiceTax, "{0:0}");

            this.xrLabelTotalZongJi.Summary.FormatString     = "{0:0}";
            this.xrLabelTotalZongJi.Summary.Func             = SummaryFunc.Sum;
            this.xrLabelTotalZongJi.Summary.IgnoreNullValues = true;
            this.xrLabelTotalZongJi.Summary.Running          = SummaryRunning.Report;
            this.xrLabelTotalZongJi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXS.PRO_InvoiceTotal, "{0:0}");

            this.xrSubreport1.ReportSource = new Q20_1(condition);
        }
Exemplo n.º 7
0
 public ROInvoiceXO_1(ConditionX cond)
 {
     InitializeComponent();
     this.condition = cond;
     this.xrTableCellProductId.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_Inumber);
     this.xrTableCellProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName);
     this.xrTableCusPro.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_CustomerProductName);
     this.xrTablePrice.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailPrice, "{0:0.###}");
     this.xrTableHeJi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailMoney, "{0:0.###}");
     this.xrTableOrderQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity, "{0:0.###}");
     this.xrTableNoXGQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity0, "{0:0.###}");
     this.xrTableZR.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceAllowance, "{0:0.###}");
     this.xrTableUnit.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceProductUnit);
     this.xrCheckBoxZS.DataBindings.Add("Checked", this.DataSource, Model.InvoiceXODetail.PRO_Islargess);
     //this.xrTableZS.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_Islargess);
     //this.xrTableTransferQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceCGDetail.PRO_ProduceTransferQuantity, "{0:0.###}");
     //this.xrTableTax.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailTax, "{0:0.###}");
     //this.xrTableTaxTotal.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXOSDetailTaxMoney, "{0:0.###}");
     //this.xrTableTaxPrice.DataBindings.Add("Text", this.DataSource, Model.InvoiceXODetail.PRO_InvoiceXODetailTaxPrice, "{0:0.###}");
     // this.xrTableCellProductQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailQuantity);
 }
Exemplo n.º 8
0
        public ROInvoiceXSlistBiaoNew(ConditionX condition)
        {
            InitializeComponent();

            this.lbl_CompanyName.Text = BL.Settings.CompanyChineseName;
            this.lbl_ReportName.Text  = "應收賬款明細表";
            this.lbl_ReportDate.Text += DateTime.Now.ToString("yyyy-MM-dd");
            this.lbl_DataRange.Text  += condition.StartDate.ToString("yyyy-MM-dd") + " ~ " + condition.EndDate.ToString("yyyy-MM-dd");

            dt = this.detailManager.SelectbyConditionXBiao(condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Customer1, condition.Customer2, condition.Employee1, condition.Employee2, condition.XOId1, condition.XOId2, condition.Product, condition.Product2, condition.CusXOId, condition.OrderColumn, condition.OrderType, null, condition.Product_Id, condition.ProductCategoryId, condition.Currency);

            if (dt == null || dt.Rows.Count == 0)
            {
                throw new global::Helper.InvalidValueException("無記錄");
            }

            var group = dt.AsEnumerable().GroupBy(r => r.Field <string>("CustomerFullName")).Select(S => S.Key).ToList <string>();

            this.DataSource = group;

            this.xrSubreport1.ReportSource = new ROInvoiceXSlistBiaoNewSub();
        }
Exemplo n.º 9
0
        //public Q20_1(IList<Model.CustomerProducts> customerProduct)
        //    : this()
        //{
        //    this.customerProduct = customerProduct;
        // tag = 1;

        //xsdetail = this.detailManager.Select(invoice);
        //if (xsdetail != null)
        //{
        //    foreach (Model.InvoiceXSDetail detail in xsdetail)
        //    {
        //        foreach (Model.CustomerProducts product in this.customerProduct)
        //        {
        //            if (detail.PrimaryKeyId == product.PrimaryKeyId)
        //            {
        //                xsdetails.Add(detail);
        //            }
        //        }

        //    }

        //}

        //}

        public Q20_1(ConditionX cond)
        {
            InitializeComponent();
            this.condition = cond;
            this.xrTableCellProductId.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_Inumber);
            this.xrTableCellProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName);
            this.xrTableCellProductGuige.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductSpecification);
            this.xrTableCellProductQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailQuantity);

            this.xrTablePrice.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailPrice, "{0:0.###}");
            this.xrTableTaxPrice.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailTaxPrice, "{0:0.###}");
            this.xrTableHeJi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailMoney, "{0:0.###}");
            this.xrTableTax.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailTax, "{0:0.###}");
            this.xrTableTaxTotal.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailTaxMoney, "{0:0.###}");
            this.xrTableOrderQuantity.DataBindings.Add("Text", this.DataSource, "InvoiceXODetail." + Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity, "{0:0.###}");
            this.xrTableNoXGQuantity.DataBindings.Add("Text", this.DataSource, "InvoiceXODetail." + Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity0, "{0:0.###}");
            this.xrTableZS.DataBindings.Add("Text", this.DataSource, Model.InvoiceCGDetail.PRO_InvoiceCGDetaiInQuantity, "{0:0.###}");
            //this.xrTableTransferQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceCGDetail.PRO_ProduceTransferQuantity, "{0:0.###}");
            this.xrTableZR.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceAllowance, "{0:0.###}");
            this.xrTableUnit.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceProductUnit);
            this.xrCheckBoxZS.DataBindings.Add("Checked", this.DataSource, Model.InvoiceXSDetail.PRO_Donatetowards);
            this.xrTableCellXOId.DataBindings.Add("Text", this.DataSource, "InvoiceXO" + Model.InvoiceXO.PRO_CustomerInvoiceXOId);
            this.xrTableInvoiceXSDetailFPQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailFPQuantity);
        }
Exemplo n.º 10
0
        protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new ConditionX();
            }

            if (global::Helper.DateTimeParse.DateTimeEquls(this.dateEditStartDate.DateTime, new DateTime()))
            {
                this.condition.StartDate = global::Helper.DateTimeParse.NullDate;
            }

            else
            {
                this.condition.StartDate = this.dateEditStartDate.DateTime;
            }


            if (global::Helper.DateTimeParse.DateTimeEquls(this.dateEditEndDate.DateTime, new DateTime()))
            {
                this.condition.EndDate = global::Helper.DateTimeParse.EndDate;
            }

            else
            {
                this.condition.EndDate = this.dateEditEndDate.DateTime;
            }


            if (global::Helper.DateTimeParse.DateTimeEquls(this.dateEditJHDate1.DateTime, new DateTime()))
            {
                this.condition.Yjri1 = global::Helper.DateTimeParse.NullDate;
            }
            else
            {
                this.condition.Yjri1 = this.dateEditJHDate1.DateTime;
            }

            if (global::Helper.DateTimeParse.DateTimeEquls(this.dateEditJHDate2.DateTime, new DateTime()))
            {
                this.condition.Yjri2 = global::Helper.DateTimeParse.EndDate;
            }
            else
            {
                this.condition.Yjri2 = this.dateEditJHDate2.DateTime;
            }
            this.condition.Product     = this.buttonEditPro.EditValue as Model.Product;
            this.condition.Product2    = this.buttonEditPro2.EditValue as Model.Product;
            this.condition.CusXOId     = this.textEditCusXOId.Text == "" ? null : this.textEditCusXOId.Text;
            this.condition.Customer1   = this.newChooseCustomer.EditValue as Model.Customer;
            this.condition.Customer2   = this.newChooseCustomer2.EditValue as Model.Customer;
            this.condition.Employee1   = this.newChooseEmp1.EditValue as Model.Employee;
            this.condition.Employee2   = this.newChooseEmp2.EditValue as Model.Employee;
            this.condition.IsClose     = this.ceisclose.Checked;
            this.condition.XOId1       = this.textEditCOID1.Text;
            this.condition.XOId2       = this.textEditCOID2.Text;
            this.condition.OrderColumn = this.ComboxOrderColumn.SelectedIndex == -1 ? 0 : this.ComboxOrderColumn.SelectedIndex;
            this.condition.OrderType   = this.ComboxOrderType.SelectedIndex == -1 ? 0 : this.ComboxOrderType.SelectedIndex;
            this.condition.DetailFlag  = this.checkEditDetailFlag.Checked;

            this.condition.FreightedCompanyId = this.lookUpEdit1.EditValue == null ? null : this.lookUpEdit1.Text;
            this.condition.ConveyanceMethodId = this.lookUpEdit2.EditValue == null ? null : this.lookUpEdit2.EditValue.ToString();

            this.condition.Special = this.checkEditSpecial.Checked;

            this.condition.XOCustomerId1 = this.ncc_XOCustomer1.EditValue as Model.Customer;
            this.condition.XOCustomerId2 = this.ncc_XOCustomer2.EditValue as Model.Customer;

            if (btn_Category.EditValue != null)
            {
                this.condition.ProductCategoryId = (btn_Category.EditValue as Model.ProductCategory).ProductCategoryId;
            }
            if (nccSupplier.EditValue != null)
            {
                this.condition.SupplierId = (nccSupplier.EditValue as Model.Supplier).SupplierId;
            }
        }
Exemplo n.º 11
0
        public ROInvoiceXSlist2(ConditionX condition)
            : this()
        {
            DateTime start = condition.StartDate;
            DateTime end   = condition.EndDate;

            this.lblCompanyName.Text = BL.Settings.CompanyChineseName;
            this.lblReportName.Text  = Properties.Resources.CHDetail;
            this.lblReportdate.Text += DateTime.Now.ToShortDateString();
            //PrintCondition
            this.lblReprotCondition.Text += "\t單據日期區間:" + condition.StartDate.ToString("yyyy-MM-dd") + "~" + condition.EndDate.AddDays(1).ToString("yyyy-MM-dd");
            if (condition.Yjri1 != Helper.DateTimeParse.NullDate && condition.Yjri2 != Helper.DateTimeParse.EndDate)
            {
                this.lblReprotCondition.Text += "\t預交日期:" + condition.Yjri1.ToString("yyyy-MM-dd") + "~" + condition.Yjri2.AddDays(1).ToString("yyyy-MM-dd");
            }
            if (condition.Customer1 != null && condition.Customer2 != null)
            {
                if (condition.Customer1.CustomerId == condition.Customer2.CustomerId)
                {
                    this.lblReprotCondition.Text += "\t客戶區間:" + condition.Customer1.ToString();
                }
                else
                {
                    this.lblReprotCondition.Text += "\t客戶區間:" + condition.Customer1.ToString() + "~" + condition.Customer2.ToString();
                }
            }
            if (!string.IsNullOrEmpty(condition.XOId1) && !string.IsNullOrEmpty(condition.XOId2))
            {
                this.lblReprotCondition.Text += "\t出貨單編號:" + condition.XOId1 + "~" + condition.XOId1;
            }
            if (!string.IsNullOrEmpty(condition.CusXOId))
            {
                this.lblReprotCondition.Text += "\t客戶訂單編號:" + condition.CusXOId;
            }
            if (condition.Product != null && condition.Product != null)
            {
                if (condition.Product.ProductId == condition.Product2.ProductId)
                {
                    this.lblReprotCondition.Text += "\t商品:" + condition.Product.ToString();
                }
                else
                {
                    this.lblReprotCondition.Text += "\t商品:" + condition.Product.ToString() + "~" + condition.Product2.ToString();
                }
            }

            //bind
            this.DataSource = this.detailManager.SelectbyConditionX(condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Customer1, condition.Customer2, condition.XOId1, condition.XOId2, condition.Product, condition.Product2, condition.CusXOId, condition.OrderColumn, condition.OrderType);

            if (this.DataSource == null)
            {
                throw new global::Helper.InvalidValueException("無記錄");
            }

            this.xrTableXSid.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceId);
            this.xrTableXSDate.DataBindings.Add("Text", this.DataSource, "Invoice." + Model.InvoiceXS.PROPERTY_INVOICEDATE, "{0:yyyy/MM/dd}");
            this.TCXOCustomer.DataBindings.Add("Text", this.DataSource, "Invoice.XSCustomer." + Model.Customer.PRO_CustomerFullName);
            this.TCYJDate.DataBindings.Add("Text", this.DataSource, "InvoiceXO." + Model.InvoiceXO.PRO_InvoiceYjrq, "{0:yyyy/MM/dd}");
            this.xrTableCellProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName);
            //this.xrTableCellProductGuige.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductSpecification);
            this.TCCustomerProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_CustomerProductName);
            this.xrTableCellProductQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailQuantity);
            this.xrTablePrice.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailPrice, "{0:0.###}");
            //this.xrTableTaxPrice.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailTaxPrice, "{0:0.###}");
            this.xrTableHeJi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailMoney, "{0:0.###}");
            //this.xrTableTax.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailTax, "{0:0.###}");
            //this.xrTableTaxTotal.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailTaxMoney, "{0:0.###}");
            //this.xrTableOrderQuantity.DataBindings.Add("Text", this.DataSource, "InvoiceXODetail." + Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity, "{0:0.###}");
            this.xrTableNoXGQuantity.DataBindings.Add("Text", this.DataSource, "InvoiceXODetail." + Model.InvoiceXODetail.PRO_InvoiceXODetailQuantity0, "{0:0.###}");
            //this.xrTableZS.DataBindings.Add("Text", this.DataSource, Model.InvoiceCGDetail.PRO_InvoiceCGDetaiInQuantity, "{0:0.###}");
            //this.xrTableTransferQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceCGDetail.PRO_ProduceTransferQuantity, "{0:0.###}");
            //this.xrTableZR.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceAllowance, "{0:0.###}");
            this.xrTableUnit.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceProductUnit);
            //this.xrCheckBoxZS.DataBindings.Add("Checked", this.DataSource, Model.InvoiceXSDetail.PRO_Donatetowards);
            this.xrTableCellXOId.DataBindings.Add("Text", this.DataSource, "InvoiceXO." + Model.InvoiceXO.PRO_CustomerInvoiceXOId);
            //this.xrTableInvoiceXSDetailFPQuantity.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailFPQuantity);

            this.xrlblTotalShuliang.Summary.FormatString     = "{0:0}";
            this.xrlblTotalShuliang.Summary.Func             = SummaryFunc.Sum;
            this.xrlblTotalShuliang.Summary.IgnoreNullValues = true;
            this.xrlblTotalShuliang.Summary.Running          = SummaryRunning.Report;
            this.xrlblTotalShuliang.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailQuantity);

            this.xrlblTotalShuiE.Summary.FormatString     = "{0:0}";
            this.xrlblTotalShuiE.Summary.Func             = SummaryFunc.Sum;
            this.xrlblTotalShuiE.Summary.IgnoreNullValues = true;
            this.xrlblTotalShuiE.Summary.Running          = SummaryRunning.Report;
            this.xrlblTotalShuiE.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailTax, "{0:0}");

            this.xrlblTotalJinE.Summary.FormatString     = "{0:0}";
            this.xrlblTotalJinE.Summary.Func             = SummaryFunc.Sum;
            this.xrlblTotalJinE.Summary.IgnoreNullValues = true;
            this.xrlblTotalJinE.Summary.Running          = SummaryRunning.Report;
            this.xrlblTotalJinE.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailMoney, "{0:0}");


            this.xrlblTotalHeJi.Summary.FormatString     = "{0:0}";
            this.xrlblTotalHeJi.Summary.Func             = SummaryFunc.Sum;
            this.xrlblTotalHeJi.Summary.IgnoreNullValues = true;
            this.xrlblTotalHeJi.Summary.Running          = SummaryRunning.Report;
            this.xrlblTotalHeJi.DataBindings.Add("Text", this.DataSource, Model.InvoiceXSDetail.PRO_InvoiceXSDetailTaxMoney, "{0:0}");
        }
Exemplo n.º 12
0
        protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new ConditionX();
            }

            if (global::Helper.DateTimeParse.DateTimeEquls(this.dateEditStartDate.DateTime, new DateTime()))
            {
                this.condition.StartDate = global::Helper.DateTimeParse.NullDate;
            }

            else
            {
                this.condition.StartDate = this.dateEditStartDate.DateTime;
            }


            if (global::Helper.DateTimeParse.DateTimeEquls(this.dateEditEndDate.DateTime, new DateTime()))
            {
                this.condition.EndDate = global::Helper.DateTimeParse.EndDate;
            }

            else
            {
                this.condition.EndDate = this.dateEditEndDate.DateTime;
            }


            if (global::Helper.DateTimeParse.DateTimeEquls(this.dateEditJHDate1.DateTime, new DateTime()))
            {
                this.condition.Yjri1 = global::Helper.DateTimeParse.NullDate;
            }
            else
            {
                this.condition.Yjri1 = this.dateEditJHDate1.DateTime;
            }

            if (global::Helper.DateTimeParse.DateTimeEquls(this.dateEditJHDate2.DateTime, new DateTime()))
            {
                this.condition.Yjri2 = global::Helper.DateTimeParse.EndDate;
            }
            else
            {
                this.condition.Yjri2 = this.dateEditJHDate2.DateTime;
            }
            this.condition.Product     = this.buttonEditPro.EditValue as Model.Product;
            this.condition.Product2    = this.buttonEditPro2.EditValue as Model.Product;
            this.condition.CusXOId     = this.textEditCusXOId.Text == "" ? null : this.textEditCusXOId.Text;
            this.condition.Customer1   = this.newChooseCustomer.EditValue as Model.Customer;
            this.condition.Customer2   = this.newChooseCustomer2.EditValue as Model.Customer;
            this.condition.Employee1   = this.newChooseEmp1.EditValue as Model.Employee;
            this.condition.Employee2   = this.newChooseEmp2.EditValue as Model.Employee;
            this.condition.IsClose     = this.ceisclose.Checked;
            this.condition.XOId1       = this.textEditCOID1.Text;
            this.condition.XOId2       = this.textEditCOID2.Text;
            this.condition.OrderColumn = this.ComboxOrderColumn.SelectedIndex == -1 ? 0 : this.ComboxOrderColumn.SelectedIndex;
            this.condition.OrderType   = this.ComboxOrderType.SelectedIndex == -1 ? 0 : this.ComboxOrderType.SelectedIndex;
            this.condition.DetailFlag  = this.checkEditDetailFlag.Checked;

            this.condition.DepotId = this.lue_Depot.EditValue == null ? null : this.lue_Depot.EditValue.ToString();
            //this.condition.HandBookId = this.cob_HandBookId.Text;

            if (!string.IsNullOrEmpty(this.cob_HandBookId.Text))
            {
                string   bgHandBookId  = "";
                string[] bgHandBookIds = this.cob_HandBookId.Text.Split(',');
                foreach (var item in bgHandBookIds)
                {
                    bgHandBookId += "'" + item.Trim() + "',";
                }
                bgHandBookId = bgHandBookId.TrimEnd(',');
                this.condition.HandBookId = bgHandBookId;
            }
        }
Exemplo n.º 13
0
        public ROInvoiceXSlistBiao(ConditionX condition)
            : this()
        {
            this.xrLabelReportName.Text = "‘ªÊÕÙ~¿îÃ÷¼š±í";
            this.lblCustomerName.Text   = condition.Customer1 == null ? "" : condition.Customer1.ToString();
            this.lblDateRange.Text      = "  •rég…^ég:" + condition.StartDate.ToString("yyyy-MM-dd") + " ~ " + condition.EndDate.ToString("yyyy-MM-dd");
            //bind
            //this.DataSource = this.detailManager.SelectbyConditionX(condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Customer1, condition.Customer2, condition.XOId1, condition.XOId2, condition.Product, condition.Product2, condition.CusXOId, condition.OrderColumn, condition.OrderType);
            //if ((bool)condition.Special)
            //{
            //    this.DataSource = this.detailManager.SelectbyConditionXBiao(condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Customer1, condition.Customer2, condition.XOId1, condition.XOId2, condition.Product, condition.Product2, condition.CusXOId, condition.OrderColumn, condition.OrderType, false, condition.Product_Id,condition.ProductCategoryId);
            //    dt = this.detailManager.SelectbyConditionXBiao(condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Customer1, condition.Customer2, condition.XOId1, condition.XOId2, condition.Product, condition.Product2, condition.CusXOId, condition.OrderColumn, condition.OrderType, condition.Special, condition.Product_Id, condition.ProductCategoryId);
            //}
            //else
            this.DataSource = this.detailManager.SelectbyConditionXBiao(condition.StartDate, condition.EndDate, condition.Yjri1, condition.Yjri2, condition.Customer1, condition.Customer2, condition.Employee1, condition.Employee2, condition.XOId1, condition.XOId2, condition.Product, condition.Product2, condition.CusXOId, condition.OrderColumn, condition.OrderType, null, condition.Product_Id, condition.ProductCategoryId, condition.Currency);

            //if (this.DataSource == null || (this.DataSource as IList<Model.InvoiceXSDetail>).Count == 0)
            if ((this.DataSource == null || (this.DataSource as System.Data.DataTable).Rows.Count == 0))
            {
                throw new global::Helper.InvalidValueException("ŸoÓ›ä›");
            }

            this.tcCHDH.DataBindings.Add("Text", this.DataSource, "CHDH");
            this.tcCHRQ.DataBindings.Add("Text", this.DataSource, "CHRQ", "{0:yyyy-MM-dd}");
            this.tcProductName.DataBindings.Add("Text", this.DataSource, "ProductName");
            this.tcKHDDBH.DataBindings.Add("Text", this.DataSource, "KHDDBH");
            //this.tcDDSL.DataBindings.Add("Text", this.DataSource, "");
            this.tcBCCHSL.DataBindings.Add("Text", this.DataSource, "BCCHSL", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.XSSLXiao.Value));
            this.tcDW.DataBindings.Add("Text", this.DataSource, "DanWei");
            this.tcDJ.DataBindings.Add("Text", this.DataSource, "DanJia", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.CGDJXiao.Value));
            this.tcZheRang.DataBindings.Add("Text", this.DataSource, "ZheRang", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.CGJEXiao.Value));
            this.tcJinE.DataBindings.Add("Text", this.DataSource, "JinE");
            this.tcShuiE.DataBindings.Add("Text", this.DataSource, "ShuiE", "{0:0}");
            this.tcYingShou.DataBindings.Add("Text", this.DataSource, "YingShou", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.CGDJXiao.Value));

            this.TCCurrency.DataBindings.Add("Text", this.DataSource, "Currency");
            this.TCCurrencyTotal.DataBindings.Add("Text", this.DataSource, "TaibiTotal", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.CGDJXiao.Value));


            this.TCZHeJi.Summary.FormatString     = "{0:0}";
            this.TCZHeJi.Summary.Func             = SummaryFunc.Sum;
            this.TCZHeJi.Summary.IgnoreNullValues = true;
            this.TCZHeJi.Summary.Running          = SummaryRunning.Report;
            this.TCZHeJi.DataBindings.Add("Text", this.DataSource, "JinE");

            this.TCZShuiE.Summary.FormatString     = "{0:0}";
            this.TCZShuiE.Summary.Func             = SummaryFunc.Sum;
            this.TCZShuiE.Summary.IgnoreNullValues = true;
            this.TCZShuiE.Summary.Running          = SummaryRunning.Report;
            this.TCZShuiE.DataBindings.Add("Text", this.DataSource, "ShuiE");

            this.TCZZongJi.Summary.FormatString     = "{0:0}";
            this.TCZZongJi.Summary.Func             = SummaryFunc.Sum;
            this.TCZZongJi.Summary.IgnoreNullValues = true;
            this.TCZZongJi.Summary.Running          = SummaryRunning.Report;
            this.TCZZongJi.DataBindings.Add("Text", this.DataSource, "YingShou");


            this.lbTaibiTotal.Summary.FormatString     = "{0:0}";
            this.lbTaibiTotal.Summary.Func             = SummaryFunc.Sum;
            this.lbTaibiTotal.Summary.IgnoreNullValues = true;
            this.lbTaibiTotal.Summary.Running          = SummaryRunning.Report;
            this.lbTaibiTotal.DataBindings.Add("Text", this.DataSource, "TaibiTotal");
        }