Esempio n. 1
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}");
        }
Esempio n. 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);

            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}");
        }