예제 #1
0
        protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new OutDepot();
            }
            if (global::Helper.DateTimeParse.DateTimeEquls(this.date_Start.DateTime, new DateTime()))
            {
                this.condition.StartDate = global::Helper.DateTimeParse.NullDate;
            }

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


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

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

            this.condition.OutDepotIdStart = this.txt_DepotOutIdStart.Text;
            this.condition.OutDepotIdEnd   = this.txt_DepotOutIdEnd.Text;
            this.condition.DepotEnd        = this.lookUpEditDepotEnd.EditValue == null ? null : this.lookUpEditDepotEnd.EditValue.ToString();
            this.condition.DepotStart      = this.lookUpEditDepotStar.EditValue == null ? null : this.lookUpEditDepotStar.EditValue.ToString();
        }
예제 #2
0
        public OutDepotDetail(OutDepot condition)
            : this()
        {
            this.lblCompanyName.Text = BL.Settings.CompanyChineseName;
            this.lblReportName.Text  = Properties.Resources.OutDepotDetail;
            this.lblDateRange.Text   = "Date range£º" + condition.StartDate.ToString("yyyy-MM-dd") + "-" + condition.EndDate.ToString("yyyy-MM-dd");
            this.lblPrintDate.Text   = "Print date£º" + DateTime.Now.ToString("yyyy-MM-dd");

            IList <Model.DepotOutDetail> details = this.manager.SelectByCondition(condition.StartDate, condition.EndDate, condition.OutDepotIdStart, condition.OutDepotIdEnd, condition.DepotStart, condition.DepotEnd);

            if (details == null || details.Count == 0)
            {
                throw new Helper.InvalidValueException("No data");
            }
            this.DataSource = details;

            this.xrTableCellDate.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_Date, "{0:yyyy-MM-dd}");
            this.xrTableCellOutDepotId.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_DepotOutId);
            this.xrTableCellDepot.DataBindings.Add("Text", this.DataSource, "DepotPosition." + "Depot." + Model.Depot.PRO_DepotName);
            this.xrTableCellProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName);
            this.xrTableCellUnit.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_ProductUnit);
            this.xrTableCellHuoWei.DataBindings.Add("Text", this.DataSource, "DepotPosition." + Model.DepotPosition.PROPERTY_ID);
            this.xrTableCellOutNum.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_DepotOutDetailQuantity);
            this.xrTableCellHuoWeiNum.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_CurrentDepotQuantity);
            this.xrTableCellDepotNum.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_CurrentStockQuantity);

            this.lblTotalNum.Summary.FormatString     = "{0:0}";
            this.lblTotalNum.Summary.Func             = SummaryFunc.Sum;
            this.lblTotalNum.Summary.IgnoreNullValues = true;
            this.lblTotalNum.Summary.Running          = SummaryRunning.Report;
            this.lblTotalNum.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_DepotOutDetailQuantity);
        }
예제 #3
0
        protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new OutDepot();
            }
            if (global::Helper.DateTimeParse.DateTimeEquls(this.date_Start.DateTime, new DateTime()))
            {
                this.condition.StartDate = global::Helper.DateTimeParse.NullDate;
            }

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


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

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

            this.condition.OutDepotIdStart = this.txt_DepotOutIdStart.Text;
            this.condition.OutDepotIdEnd   = this.txt_DepotOutIdEnd.Text;
            this.condition.DepotEnd        = this.lookUpEditDepotEnd.EditValue == null ? null : this.lookUpEditDepotEnd.EditValue.ToString();
            this.condition.DepotStart      = this.lookUpEditDepotStar.EditValue == null ? null : this.lookUpEditDepotStar.EditValue.ToString();
            if ((this.buttonEditProduct.EditValue as Model.Product) != null)
            {
                this.condition.ProductId = (this.buttonEditProduct.EditValue as Model.Product).ProductId;
            }
            else
            {
                this.condition.ProductId = null;
            }
            this.condition.InvoiceCusId = this.txt_InvoiceCusId.Text;
        }