Example #1
0
        /// <summary>
        /// 重写父类方法
        /// </summary>
        protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new SupplierMayChoose();
            }
            condition.Employee1 = this.newChooseEmp1.EditValue as Model.Employee;
            condition.Employee2 = this.newChooseEmp2.EditValue as Model.Employee;
            condition.Supplier1 = this.newChooseSupplier1.EditValue as Model.Supplier;
            condition.Supplier2 = this.newChooseSupplier2.EditValue as Model.Supplier;
            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;
            }

            //condition.YJDate = this.dateEditJZ.DateTime;
            //condition.Hasother = this.checkEdit1.Checked;
        }
Example #2
0
        public SupplierMayDetail(SupplierMayChoose conn)
            : this()
        {
            this.xrLabelReportName.Text = "‘ª¸¶Ù~¿îÃ÷¼šÙ~";
            DataSet ds = this.cCOBillManager.SelectMayShou(conn.Supplier1, conn.Supplier2, conn.Employee1, conn.Employee2, conn.StartDate, conn.EndDate);

            if (ds == null || ds.Tables[0].Rows.Count == 0)
            {
                throw new Helper.InvalidValueException("ӛ䛞é¿Õ");
            }
            this.DataSource            = ds.Tables[0];
            this.xrLabelDateRange.Text = conn.StartDate.ToString("yyyy-MM-dd") + "-" + conn.EndDate.ToString("yyyy-MM-dd");
            //this.xrTableEmp.DataBindings.Add("Text", this.DataSource, "CusomerName");
            this.xrTableEmp.DataBindings.Add("Text", this.DataSource, "Employee1Name");
            this.xrTableSourceInvoiceDate.DataBindings.Add("Text", this.DataSource, "InvoiceDate", "{0:yyyy-MM-dd}");
            this.xrTableInvoiceIds.DataBindings.Add("Text", this.DataSource, "InvoiceId");
            this.xrTableMoney.DataBindings.Add("Text", this.DataSource, "Total", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.XSZJXiao.Value));
            this.xrTableHasMoneys.DataBindings.Add("Text", this.DataSource, "HasMoney", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.XSZJXiao.Value));
            this.xrTableNoMoneys.DataBindings.Add("Text", this.DataSource, "NoHeXiao", global::Helper.DateTimeParse.GetFormatA(BL.V.SetDataFormat.XSZJXiao.Value));
            this.xrTableSourceNames.DataBindings.Add("Text", this.DataSource, "SourceName");
            this.xrTableSupplier.DataBindings.Add("Text", this.DataSource, "SupplierName");


            this.lbl_heji.Summary.FormatString     = global::Helper.DateTimeParse.GetFormat(BL.V.SetDataFormat.XSZJXiao.Value);
            this.lbl_heji.Summary.Func             = SummaryFunc.Sum;
            this.lbl_heji.Summary.IgnoreNullValues = true;
            this.lbl_heji.Summary.Running          = SummaryRunning.Report;
            this.lbl_heji.DataBindings.Add("Text", this.DataSource, "JinE");

            this.lbl_shuie.Summary.FormatString     = global::Helper.DateTimeParse.GetFormat(BL.V.SetDataFormat.XSZJXiao.Value);
            this.lbl_shuie.Summary.Func             = SummaryFunc.Sum;
            this.lbl_shuie.Summary.IgnoreNullValues = true;
            this.lbl_shuie.Summary.Running          = SummaryRunning.Report;
            this.lbl_shuie.DataBindings.Add("Text", this.DataSource, "ShuiE");

            this.lbl_zongji.Summary.FormatString     = global::Helper.DateTimeParse.GetFormat(BL.V.SetDataFormat.XSZJXiao.Value);
            this.lbl_zongji.Summary.Func             = SummaryFunc.Sum;
            this.lbl_zongji.Summary.IgnoreNullValues = true;
            this.lbl_zongji.Summary.Running          = SummaryRunning.Report;
            this.lbl_zongji.DataBindings.Add("Text", this.DataSource, "Total");
        }