コード例 #1
0
        protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new ConditionOtherCompact();
            }

            this.condition.StartDate              = this.dateEditStartDate.EditValue == null ? global::Helper.DateTimeParse.NullDate : this.dateEditStartDate.DateTime;
            this.condition.EndDate                = this.dateEditEndDate.EditValue == null ? global::Helper.DateTimeParse.EndDate : this.dateEditEndDate.DateTime;
            this.condition.SupplierId1            = this.newChooseSupplier1.EditValue == null ? null : (this.newChooseSupplier1.EditValue as Model.Supplier).Id;
            this.condition.SupplierId2            = this.newChooseSupplier2.EditValue == null ? null : (this.newChooseSupplier2.EditValue as Model.Supplier).Id;
            this.condition.ProduceOtherCompactId1 = this.buttonEditProduceOtherCompactId1.EditValue == null ? null : this.buttonEditProduceOtherCompactId1.EditValue.ToString();
            this.condition.ProduceOtherCompactId2 = this.buttonEditProduceOtherCompactId2.EditValue == null ? null : this.buttonEditProduceOtherCompactId2.EditValue.ToString();
            this.condition.ProductId1             = (this.buttonEditProduct1.EditValue as Model.Product) == null ? null : (this.buttonEditProduct1.EditValue as Model.Product).Id;
            this.condition.ProductId2             = (this.buttonEditProduct2.EditValue as Model.Product) == null ? null : (this.buttonEditProduct2.EditValue as Model.Product).Id;

            if (this.date_JQStart.EditValue == null)
            {
                this.condition.StartJQ = null;
            }
            else
            {
                this.condition.StartJQ = this.date_JQStart.DateTime;
            }
            if (this.date_JQEnd.EditValue == null)
            {
                this.condition.EndJQ = null;
            }
            else
            {
                this.condition.EndJQ = this.date_JQEnd.DateTime;
            }
            this.condition.IsCloesd = this.rodIsClosed.SelectedIndex;
        }
コード例 #2
0
        public OtherCompact(ConditionOtherCompact condition)
            : this()
        {
            IList <Model.ProduceOtherCompactDetail> list = this.manager.SelectByDateAndCondition(condition.ProduceOtherCompactId1, condition.ProduceOtherCompactId2, condition.StartDate, condition.EndDate, condition.SupplierId1, condition.SupplierId2, condition.ProductId1, condition.ProductId2, condition.StartJQ, condition.EndJQ, condition.IsCloesd);

            if (list == null || list.Count <= 0)
            {
                throw new global::Helper.InvalidValueException("ŸoÓ›ä›");
            }

            this.DataSource = list;
            //CompanyInfo
            this.ReportName.Text     = BL.Settings.CompanyChineseName;
            this.ReportTitle.Text    = Properties.Resources.ProduceOtherCompactDetail;
            this.lblPrintDate.Text  += DateTime.Now.ToString("yyyy-MM-dd");
            this.lblInvoiceDate.Text = condition.StartDate.ToString("yyyy-MM-dd") + " ~ " + condition.EndDate.ToString("yyyy-MM-dd");

            this.TCSupplier.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_SupplierFullName);
            this.TCProduceOtherCompactId.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_ProduceOtherCompactId);
            this.TCProductName.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_RPProductName);
            this.TCCustomerProduct.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_RPCustomerProductName);
            this.TCProductDesc.DataBindings.Add("Rtf", this.DataSource, Model.ProduceOtherCompactDetail.PRO_ProductDescription);
            this.TCQuantity.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_OtherCompactCount);
            this.TCInDepotCount.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_InDepotCount);
            this.TCCancelQuantity.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_CancelQuantity);
            this.TCUnit.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_ProductUnit);
            this.TCNote.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_Description);
            this.TCCloesd.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_IsClosedHelp);
            this.TCJQ.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompactDetail.PRO_JiaoQi, "{0:yyyy-MM-dd}");
        }
コード例 #3
0
ファイル: Q53.cs プロジェクト: daobataotie/Jianli
        public Q53(ConditionOtherCompact condition)
        {
            InitializeComponent();
            this.conditionCom = condition;
            IList <Model.ProduceOtherCompact> list = this.produceOtherCompactManager.Select(condition.ProduceOtherCompactId1, condition.ProduceOtherCompactId2, condition.StartDate, condition.EndDate, condition.SupplierId1, condition.SupplierId2, condition.ProductId1, condition.ProductId2);

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

            //foreach (Model.ProduceOtherCompact item in list)
            //{
            //    if (!string.IsNullOrEmpty(item.MRSHeaderId))
            //    {
            //        Model.MRSHeader mRSHeader = this.mRSHeaderManager.Get(item.MRSHeaderId);
            //        if (mRSHeader != null)
            //        {
            //            Model.MPSheader mPSheader = this.mPSheaderManager.Get(mRSHeader.MPSheaderId);
            //            if (mPSheader != null)
            //            {
            //                item.InvoiceXOId = this.invoiceXOManager.Get(mPSheader.InvoiceXOId) == null ? "" : this.invoiceXOManager.Get(mPSheader.InvoiceXOId).CustomerInvoiceXOId;
            //            }
            //        }
            //    }

            //}

            this.DataSource = list;
            //CompanyInfo
            this.ReportName.Text  = BL.Settings.CompanyChineseName;
            this.ReportTitle.Text = Properties.Resources.ProduceOtherCompactDetail;
            if (!global::Helper.DateTimeParse.DateTimeEquls(condition.StartDate, 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     += System.DateTime.Now.Date.ToString("yyyy-MM-dd");
            //外发合同
            this.xrLabelProduceOtherCompactId.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompact.PRO_ProduceOtherCompactId);
            this.xrLabelWorkHouse.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompact.PRO_NextWorkHouseName);
            this.xrLabelProduceOtherCompactDate.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompact.PRO_ProduceOtherCompactDate, "{0:yyyy-MM-dd}");
            this.xrLabelEmployee0.DataBindings.Add("Text", "Employee0." + this.DataSource, Model.ProduceOtherCompact.PRO_EmployeeName0);
            this.xrLabelSupplierId.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompact.PRO_SupplierName);
            this.xrLabelProduceOtherCompactDesc.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompact.PRO_ProduceOtherCompactDesc);
            this.xrLabelJhDate.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompact.PRO_JiaoHuoDate, "{0:yyyy-MM-dd}");
            this.xrLabelCustomerXoId.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherCompact.PRO_RPCustomerInvoiceXOId);

            this.xrSubreport1.ReportSource = new Q53_1();
        }
コード例 #4
0
        protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new ConditionOtherCompact();
            }

            this.condition.StartDate     = this.dateEditStartDate.EditValue == null ? global::Helper.DateTimeParse.NullDate : this.dateEditStartDate.DateTime;
            this.condition.EndDate       = this.dateEditEndDate.EditValue == null ? global::Helper.DateTimeParse.EndDate : this.dateEditEndDate.DateTime;
            this.condition.SupplierId1   = this.newChooseSupplier1.EditValue == null ? null : (this.newChooseSupplier1.EditValue as Model.Supplier).Id;
            this.condition.SupplierId2   = this.newChooseSupplier2.EditValue == null ? null : (this.newChooseSupplier2.EditValue as Model.Supplier).Id;
            this.condition.SupplierName1 = this.newChooseSupplier1.EditValue == null ? null : (this.newChooseSupplier1.EditValue as Model.Supplier).SupplierFullName;
            this.condition.SupplierName2 = this.newChooseSupplier2.EditValue == null ? null : (this.newChooseSupplier2.EditValue as Model.Supplier).SupplierFullName;

            this.condition.ProduceOtherCompactId1 = this.buttonEditProduceOtherCompactId1.EditValue == null ? null : this.buttonEditProduceOtherCompactId1.EditValue.ToString();
            this.condition.ProduceOtherCompactId2 = this.buttonEditProduceOtherCompactId2.EditValue == null ? null : this.buttonEditProduceOtherCompactId2.EditValue.ToString();
            this.condition.ProductId1             = (this.buttonEditProduct1.EditValue as Model.Product) == null ? null : (this.buttonEditProduct1.EditValue as Model.Product).Id;
            this.condition.ProductId2             = (this.buttonEditProduct2.EditValue as Model.Product) == null ? null : (this.buttonEditProduct2.EditValue as Model.Product).Id;
            this.condition.InvoiceCusId           = this.txt_InvoiceCusId.Text;
        }
コード例 #5
0
        public Q53_2(ConditionOtherCompact condition)
        {
            InitializeComponent();
            this.conditionCom = condition;
            DataTable dt = this.detailManager.SelectDetail(condition.ProduceOtherCompactId1, condition.ProduceOtherCompactId2, condition.StartDate, condition.EndDate, condition.SupplierId1, condition.SupplierId2, condition.ProductId1, condition.ProductId2, condition.InvoiceCusId);

            if (dt == null || dt.Rows.Count <= 0)
            {
                throw new global::Helper.InvalidValueException("無記錄");
            }

            this.DataSource = dt;
            //CompanyInfo
            this.ReportName.Text  = BL.Settings.CompanyChineseName;
            this.ReportTitle.Text = Properties.Resources.ProduceOtherCompactDetail;
            if (!global::Helper.DateTimeParse.DateTimeEquls(condition.StartDate, 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     += System.DateTime.Now.Date.ToString("yyyy-MM-dd");
            this.xrLabelSupplierId.Text = condition.SupplierName1;

            //Detail
            this.TC_Id.DataBindings.Add("Text", this.DataSource, "ProduceOtherCompactId");
            this.TC_Date.DataBindings.Add("Text", this.DataSource, "ProduceOtherCompactDate");
            this.TC_YJDate.DataBindings.Add("Text", this.DataSource, "JiaoQi");
            this.TC_InvoiceYJDate.DataBindings.Add("Text", this.DataSource, "InvoiceYjrq");
            this.TC_InvoiceCusId.DataBindings.Add("Text", this.DataSource, "CustomerInvoiceXOId");
            this.TC_Product.DataBindings.Add("Text", this.DataSource, "ProductName");
            this.TC_Quantity.DataBindings.Add("Text", this.DataSource, "OtherCompactCount");
            this.TC_InQuantity.DataBindings.Add("Text", this.DataSource, "InDepotCount");
            this.TC_CancelQuantity.DataBindings.Add("Text", this.DataSource, "CancelQuantity");
            this.TC_Unit.DataBindings.Add("Text", this.DataSource, "ProductUnit");
            this.tcOutQuantity.DataBindings.Add("Text", this.DataSource, "ProduceInDepotQuantity");
        }