Exemplo n.º 1
0
 protected override void OnOK()
 {
     if (this.ConditionAcInvoiceXObill == null)
     {
         this.ConditionAcInvoiceXObill = new ConditionAcInvoiceXOBill();
     }
     if (global::Helper.DateTimeParse.DateTimeEquls(this.dateEditStartDate.DateTime, new DateTime()))
     {
         this.ConditionAcInvoiceXObill.StartDate = global::Helper.DateTimeParse.NullDate;
     }
     else
     {
         this.ConditionAcInvoiceXObill.StartDate = this.dateEditStartDate.DateTime;
     }
     if (global::Helper.DateTimeParse.DateTimeEquls(this.dateEditEndDate.DateTime, new DateTime()))
     {
         this.ConditionAcInvoiceXObill.EndDate = global::Helper.DateTimeParse.EndDate;
     }
     else
     {
         this.ConditionAcInvoiceXObill.EndDate = this.dateEditEndDate.DateTime;
     }
     this.ConditionAcInvoiceXObill.StartXOid      = txtXOidStart.Text;
     this.ConditionAcInvoiceXObill.EndXOid        = txtXOidEnd.Text;
     this.ConditionAcInvoiceXObill.mStartCustomer = this.nccCustomerStart.EditValue as Model.Customer;
     this.ConditionAcInvoiceXObill.mEndCustomer   = this.nccCustomerEnd.EditValue as Model.Customer;
 }
Exemplo n.º 2
0
        public ROInvoiceXOBillDetail(ConditionAcInvoiceXOBill condition)
            : this()
        {
            IList <Model.AcInvoiceXOBillDetail> mdetail = new BL.AcInvoiceXOBillDetailManager().selectByConditionInvoiceXODetail(condition.StartDate, condition.EndDate, condition.StartXOid, condition.EndXOid, condition.mStartCustomer, condition.mEndCustomer);

            if (mdetail == null || mdetail.Count == 0)
            {
                throw new global::Helper.InvalidValueException("Ÿo”µ“þ");
            }

            this.DataSource = mdetail;

            //Info
            this.lblCompanyName.Text = BL.Settings.CompanyChineseName;
            this.lblReportName.Text  = Properties.Resources.ROAcInvoiceXOBillDetail;
            this.lblReportDate.Text += DateTime.Now.ToString("yyyy-MM-dd");

            //Bind
            this.TCdanjia.DataBindings.Add("Text", this.DataSource, Model.AcInvoiceXOBillDetail.PRO_InvoiceXODetailPrice, global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.XSDJXiao.Value));
            this.TCdanwei.DataBindings.Add("Text", this.DataSource, Model.AcInvoiceXOBillDetail.PRO_InvoiceProductUnit);
            this.TCfapiaobianhao.DataBindings.Add("Text", this.DataSource, "AcInvoiceXOBill." + Model.AcInvoiceXOBill.PRO_Id);
            this.TCkehu.DataBindings.Add("Text", this.DataSource, "AcInvoiceXOBill.Customer." + Model.Customer.PRO_CustomerFullName);
            this.TCriqi.DataBindings.Add("Text", this.DataSource, "AcInvoiceXOBill." + Model.AcInvoiceXOBill.PRO_AcInvoiceXOBillDate, "{0:yyyy-MM-dd}");
            this.TCshuliang.DataBindings.Add("Text", this.DataSource, Model.AcInvoiceXOBillDetail.PRO_InvoiceXODetaiInQuantity);
            this.TCxiaoji.DataBindings.Add("Text", this.DataSource, Model.AcInvoiceXOBillDetail.PRO_InvoiceXODetailMoney, global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.XSZJXiao.Value));

            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, "ReportShuiE");

            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, "AcInvoiceXOBill." + Model.AcInvoiceXOBill.PRO_ZongMoney);
            this.xrlblTotalJinE.DataBindings.Add("Text", this.DataSource, Model.AcInvoiceXOBillDetail.PRO_InvoiceXODetailMoney);
        }