protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new ConditionProInDepotChoose();
            }

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

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


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

            else
            {
                this.condition.EndDate = this.dateEdit2.DateTime;
            }
            this.condition.Product            = this.buttonEditPro.EditValue as Model.Product;
            this.condition.StartPronoteHeader = this.buttonEditPronote1.Text;
            this.condition.EndPronoteHeader   = this.buttonEditPronote2.Text;
            this.condition.WorkHouse          = this.newChooseWorkHouse.EditValue as Model.WorkHouse;
            this.condition.MDepot             = this.newChooseContorlDepot.EditValue as Model.Depot;
            this.condition.MDepotPosition     = this.newChooseContorlDepotPosition.EditValue as Model.DepotPosition;
            this.condition.Id1          = this.buttonEditId1.EditValue == null ? null : this.buttonEditId1.Text;
            this.condition.Id2          = this.buttonEditid2.EditValue == null ? null : this.buttonEditid2.Text;
            this.condition.Cusxoid      = this.textEditCusXOId.EditValue == null ? null : this.textEditCusXOId.Text;;
            this.condition.Customer1    = this.newChooseCustomer1.EditValue as Model.Customer;
            this.condition.Customer2    = this.newChooseCustomer2.EditValue as Model.Customer;
            this.condition.ProductState = this.comBoxProductState.SelectedIndex;

            if (!string.IsNullOrEmpty(this.ccb_BGHandBookIds.Text))
            {
                string   bgHandBookId  = "";
                string[] bgHandBookIds = this.ccb_BGHandBookIds.Text.Split(',');
                foreach (var item in bgHandBookIds)
                {
                    bgHandBookId += "'" + item.Trim() + "',";
                }
                bgHandBookId = bgHandBookId.TrimEnd(',');
                this.condition.HandBookId = bgHandBookId;
            }
        }
Exemple #2
0
        public Q52(ConditionProInDepotChoose condition)
        {
            InitializeComponent();

            IList <Model.ProduceInDepotDetail> list = detailManager.Select(condition.StartPronoteHeader, condition.EndPronoteHeader, condition.StartDate, condition.EndDate, condition.Product, condition.WorkHouse, condition.MDepot, condition.MDepotPosition, condition.Id1, condition.Id2, condition.Cusxoid, condition.Customer1, condition.Customer2, condition.ProductState, condition.HandBookId);

            if (list == null || list.Count <= 0)
            {
                throw new global::Helper.MessageValueException("無數據!");
            }

            if (!global::Helper.DateTimeParse.DateTimeEquls(condition.EndDate, global::Helper.DateTimeParse.NullDate))
            {
                this.xrLabelDateRange.Text += " " + condition.StartDate.ToString("yyyy-MM-dd");
            }
            this.xrLabelDateRange.Text += " 至:" + condition.EndDate.ToString("yyyy-MM-dd");
            this.xrLabelDates.Text     += DateTime.Now.ToString("yyyy-MM-dd");
            this.ReportName.Text        = BL.Settings.CompanyChineseName;
            this.ReportTitle.Text       = Properties.Resources.ProduceInDepotDetail;
            this.DataSource             = list;


            this.xrTablInDepotId.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProduceInDepotId);
            this.xrTableDate.DataBindings.Add("Text", this.DataSource, "HeaderDate", "{0:yyyy-MM-dd}");
            //this.xrTableProID.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_Id);
            //this.xrTableProName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName);
            this.xrTableQuanTity.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProduceQuantity);
            this.xrTableUnit.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProductUnit);
            //this.xrTableDepot.DataBindings.Add("Text", this.DataSource, "ProduceInDepot.Depot." + Model.Depot.PRO_DepotName);
            //this.TCInvoiceCusXOId.DataBindings.Add("Text", this.DataSource, "DepotPosition." + Model.DepotPosition.PROPERTY_ID);

            //2017年10月27日21:19:57
            this.TCPNTId.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_PronoteHeaderId);
            this.xrTableProName.DataBindings.Add("Text", this.DataSource, "ProductName");
            this.TCDepartment.DataBindings.Add("Text", this.DataSource, "Workhousename");
            this.TCProduceQuantity.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProceduresSum);
            this.TCTransferQuantity.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProduceTransferQuantity);
            this.xrTableDepot.DataBindings.Add("Text", this.DataSource, "DepotName");
            this.TCInvoiceCusXOId.DataBindings.Add("Text", this.DataSource, "CusXOId");


            //this.xrTableZongJi.Summary.FormatString = "{0:0}";
            //this.xrTableZongJi.Summary.Func = SummaryFunc.Sum;
            //this.xrTableZongJi.Summary.Running = SummaryRunning.Report;
            //this.xrTableZongJi.Summary.IgnoreNullValues = true;

            //this.xrTableZongJi.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProduceMoney, "{0:c0}");
        }
Exemple #3
0
        public Q52(ConditionProInDepotChoose condition)
        {
            InitializeComponent();

            IList <Model.ProduceInDepotDetail> list = detailManager.Select(condition.StartPronoteHeader, condition.EndPronoteHeader, condition.StartDate, condition.EndDate, condition.Product, condition.WorkHouse, condition.MDepot, condition.MDepotPosition, condition.Id1, condition.Id2, condition.Cusxoid, condition.Customer1, condition.Customer2, condition.ProductState);

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

            if (!global::Helper.DateTimeParse.DateTimeEquls(condition.EndDate, global::Helper.DateTimeParse.NullDate))
            {
                this.xrLabelDateRange.Text += "From :" + condition.StartDate.ToShortDateString();
            }
            this.xrLabelDateRange.Text += "   To:" + condition.EndDate.ToShortDateString();
            this.xrLabelDates.Text     += DateTime.Now.ToShortDateString();
            this.ReportName.Text        = BL.Settings.CompanyChineseName;
            this.ReportTitle.Text       = Properties.Resources.ProduceInDepotDetail;
            this.DataSource             = list;

            this.xrTableProID.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_Id);
            this.xrTableDate.DataBindings.Add("Text", this.DataSource, "ProduceInDepot." + Model.ProduceInDepot.PRO_ProduceInDepotDate, "{0:yyyy-MM-dd}");
            this.xrTableProName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName);
            this.xrTableQuanTity.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProduceQuantity);
            //this.xrTableGuiGe.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductSpecification);

            this.xrTablInDepotId.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProduceInDepotId);
            this.xrTableUnit.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProductUnit);
            //this.xrTablePrice.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProducePrice, "{0:0}");
            //this.xrTableTotal.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProduceMoney, "{0:0}");
            this.xrTableDepot.DataBindings.Add("Text", this.DataSource, "ProduceInDepot.Depot." + Model.Depot.PRO_DepotName);
            this.xrTableDepotPosition.DataBindings.Add("Text", this.DataSource, "DepotPosition." + Model.DepotPosition.PROPERTY_ID);


            //this.xrTableZongJi.Summary.FormatString = "{0:0}";
            //this.xrTableZongJi.Summary.Func = SummaryFunc.Sum;
            //this.xrTableZongJi.Summary.Running = SummaryRunning.Report;
            //this.xrTableZongJi.Summary.IgnoreNullValues = true;

            //this.xrTableZongJi.DataBindings.Add("Text", this.DataSource, Model.ProduceInDepotDetail.PRO_ProduceMoney, "{0:c0}");
        }
Exemple #4
0
        protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new ConditionProInDepotChoose();
            }

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

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


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

            else
            {
                this.condition.EndDate = this.dateEdit2.DateTime;
            }
            //this.condition.Product = this.buttonEditPro.EditValue as Model.Product;
            this.condition.Product_Id         = this.buttonEditPro.EditValue == null ? null : this.buttonEditPro.EditValue.ToString();
            this.condition.StartPronoteHeader = this.buttonEditPronote1.Text;
            this.condition.EndPronoteHeader   = this.buttonEditPronote2.Text;
            this.condition.WorkHouse          = this.newChooseWorkHouse.EditValue as Model.WorkHouse;
            this.condition.MDepot             = this.newChooseContorlDepot.EditValue as Model.Depot;
            this.condition.MDepotPosition     = this.newChooseContorlDepotPosition.EditValue as Model.DepotPosition;
            this.condition.Id1          = this.buttonEditId1.EditValue == null ? null : this.buttonEditId1.Text;
            this.condition.Id2          = this.buttonEditid2.EditValue == null ? null : this.buttonEditid2.Text;
            this.condition.Cusxoid      = this.textEditCusXOId.EditValue == null ? null : this.textEditCusXOId.Text;;
            this.condition.Customer1    = this.newChooseCustomer1.EditValue as Model.Customer;
            this.condition.Customer2    = this.newChooseCustomer2.EditValue as Model.Customer;
            this.condition.ProductState = this.comBoxProductState.SelectedIndex;
        }