public Model.DepotOut GetDetails(string depotOutId) { Model.DepotOut depotOut = accessor.Get(depotOutId); if (depotOut != null) { depotOut.Details = accessorDetail.GetDepotOutDetailByDepotOutId(depotOut.DepotOutId); } return(depotOut); }
public void Delete(Model.DepotOut depotOut) { sqlmapper.Delete("DepotOutDetail.deleteByHeader", depotOut.DepotOutId); }
public OutStockReport(string DepotOutId) { InitializeComponent(); this.DepotOut = this.DepotOutManager.Get(DepotOutId); if (this.DepotOut == null) { return; } this.DepotOut.Details = this.DepotOutDetailManager.GetDepotOutDetailByDepotOutId(this.DepotOut.DepotOutId); this.DataSource = this.DepotOut.Details; //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = Properties.Resources.DepotOut; this.xrLabelPrintDate.Text = "列表日期:" + DateTime.Now.ToShortDateString(); this.xrLabelDepotOutId.Text = this.DepotOut.DepotOutId; this.xrLabelDepotOutDate.Text = this.DepotOut.DepotOutDate.Value.ToString("yyyy-MM-dd"); if (this.DepotOut.Employee != null) { this.xrLabelEmployeeId.Text = this.DepotOut.Employee.EmployeeName; } if (this.DepotOut.InvioiceEmployee0 != null) { this.xrLabelInvoiceEmp0.Text = this.DepotOut.InvioiceEmployee0.EmployeeName; } if (DepotOut.Depot != null) { this.xrLabelProduceInDepotId.Text = DepotOut.Depot.DepotName; } if (this.DepotOut.SourceType == "領料單") { Model.ProduceMaterial ProduceMaterial = this.produceMaterialManager.Get(this.DepotOut.InvioiceId); if (ProduceMaterial != null) { //Model.PronoteHeader PronoteHeader = this.pronoteHeaderManager.Get(ProduceMaterial.InvoiceId); //if (PronoteHeader != null) //{ Model.InvoiceXO InvoiceXO = this.invoiceXOManager.Get(ProduceMaterial.InvoiceXOId); if (InvoiceXO != null) { this.xrLabelCustomXoId.Text = InvoiceXO.CustomerInvoiceXOId; this.lblPiHao.Text = InvoiceXO.CustomerLotNumber; this.lblXOCustomer.Text = InvoiceXO.xocustomer == null ? null : InvoiceXO.xocustomer.ToString(); } //if (ProduceMaterial.Employee0 != null) // this.xrLabelInvoiceEmp0.Text = ProduceMaterial.Employee0.ToString(); if (ProduceMaterial.WorkHouse != null) { this.xrLabelWorkHouse.Text = ProduceMaterial.WorkHouse.ToString(); } // } } } else if (this.DepotOut.SourceType == "委外領料單") { Model.ProduceOtherMaterial ProduceOtherMaterial = new BL.ProduceOtherMaterialManager().Get(this.DepotOut.InvioiceId); if (ProduceOtherMaterial != null) { Model.ProduceOtherCompact ProduceOtherCompact = this.produceOtherCompactManager.Get(ProduceOtherMaterial.ProduceOtherCompactId); if (ProduceOtherCompact != null) { if (!string.IsNullOrEmpty(ProduceOtherCompact.MRSHeaderId)) { Model.MRSHeader mRSHeader = this.mRSHeaderManager.Get(ProduceOtherCompact.MRSHeaderId); if (mRSHeader != null) { Model.MPSheader mPSheader = this.mPSheaderManager.Get(mRSHeader.MPSheaderId); if (mPSheader != null) { Model.InvoiceXO InvoiceXO = this.invoiceXOManager.Get(mPSheader.InvoiceXOId); if (InvoiceXO != null) { this.xrLabelCustomXoId.Text = InvoiceXO.CustomerInvoiceXOId; this.lblPiHao.Text = InvoiceXO.CustomerLotNumber; this.lblXOCustomer.Text = InvoiceXO.xocustomer == null ? null : InvoiceXO.xocustomer.ToString(); } } } } } if (ProduceOtherMaterial.WorkHouse != null) { this.xrLabelWorkHouse.Text = ProduceOtherMaterial.WorkHouse.ToString(); } } } this.txt_ParentProduct.Text = DepotOut.ParentProduct; this.xrLabelXqlu.Text = DepotOut.SourceType; this.xrLabeldescription.Text = DepotOut.description; this.xrLabelXgdj.Text = DepotOut.InvioiceId; this.xrTableCellProductId.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_Inumber); this.xrTableCellProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName); //this.xrTableCellXH.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductSpecification); this.xrTableCellCount.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_DepotOutDetailQuantity); this.xrTableCellUnit.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_ProductUnit); this.xrTableCurrentDepotStock.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_CurrentDepotQuantity); this.xrTableCell_CurrentStock.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_CurrentStockQuantity); this.xrTableCellDepotId.DataBindings.Add("Text", this.DataSource, "DepotPosition." + Model.DepotPosition.PROPERTY_ID); //this.xrTableCellSafeStockQuantity.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.Pro_SafeStockQuantity); this.TCPihao.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_Pihao); this.xrRichText1.DataBindings.Add("Rtf", this.DataSource, Model.DepotOutDetail.Pro_ProductDescription); //this.TCPihao.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_Pihao); this.TCProductCustomerName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_CustomerProductName); }
public void Delete(Model.DepotOut depotOut) { accessor.Delete(depotOut.DepotOutId); }
public Model.DepotOut GetPrev(Model.DepotOut e) { return(sqlmapper.QueryForObject <Model.DepotOut>("DepotOut.get_prev", e)); }
public Model.DepotOut GetNext(Model.DepotOut e) { return(sqlmapper.QueryForObject <Model.DepotOut>("DepotOut.get_next", e)); }
public bool HasRowsAfter(Model.DepotOut e) { return(sqlmapper.QueryForObject <bool>("DepotOut.has_rows_after", e)); }
public bool HasRowsBefore(Model.DepotOut e) { return(sqlmapper.QueryForObject <bool>("DepotOut.has_rows_before", e)); }
public void Update(Model.DepotOut e) { this.Update <Model.DepotOut>(e); }
public void Insert(Model.DepotOut e) { this.Insert <Model.DepotOut>(e); }
public Model.DepotOut GetNext(Model.DepotOut e) { return(accessor.GetNext(e)); }
public Model.DepotOut GetPrev(Model.DepotOut e) { return(accessor.GetPrev(e)); }
public bool HasRowsAfter(Model.DepotOut e) { return(accessor.HasRowsAfter(e)); }
public bool HasRowsBefore(Model.DepotOut e) { return(accessor.HasRowsBefore(e)); }
public OutStockReport(string DepotOutId) { InitializeComponent(); this.DepotOut = this.DepotOutManager.Get(DepotOutId); if (this.DepotOut == null) { return; } this.DepotOut.Details = this.DepotOutDetailManager.GetDepotOutDetailByDepotOutId(this.DepotOut.DepotOutId); this.DataSource = this.DepotOut.Details; //CompanyInfo this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = Properties.Resources.DepotOut; this.xrLabelPrintDate.Text = "列表日期:" + DateTime.Now.ToShortDateString(); this.xrLabelDepotOutId.Text = this.DepotOut.DepotOutId; this.xrLabelDepotOutDate.Text = this.DepotOut.DepotOutDate.Value.ToString("yyyy-MM-dd"); if (this.DepotOut.Employee != null) { this.xrLabelEmployeeId.Text = this.DepotOut.Employee.EmployeeName; } if (this.DepotOut.InvioiceEmployee0 != null) { this.xrLabelInvoiceEmp0.Text = this.DepotOut.InvioiceEmployee0.EmployeeName; } if (DepotOut.Depot != null) { this.xrLabelProduceInDepotId.Text = DepotOut.Depot.DepotName; } if (this.DepotOut.LingLiaoEmployee != null) { this.lbl_LingLiaoEmployee.Text = this.DepotOut.LingLiaoEmployee.ToString(); } Model.InvoiceXO InvoiceXO = null; if (this.DepotOut.SourceType == "領料單") { Model.ProduceMaterial ProduceMaterial = this.produceMaterialManager.Get(this.DepotOut.InvioiceId); if (ProduceMaterial != null) { InvoiceXO = this.invoiceXOManager.Get(ProduceMaterial.InvoiceXOId); if (InvoiceXO != null) { this.xrLabelCustomXoId.Text = InvoiceXO.CustomerInvoiceXOId; this.lblPiHao.Text = InvoiceXO.CustomerLotNumber; this.lblXOCustomer.Text = InvoiceXO.xocustomer == null ? null : InvoiceXO.xocustomer.ToString(); } //if (ProduceMaterial.WorkHouse != null) // this.xrLabelWorkHouse.Text = ProduceMaterial.WorkHouse.ToString(); //2021年8月29日15:54:11,领料单生产站:先带第一笔领料单的下个生产站,若为空,则带领料单表头生产站 if (this.DepotOut.Details != null && this.DepotOut.Details.Count > 0) { if (!string.IsNullOrEmpty(this.DepotOut.Details[0].ProduceMaterialdetailsID)) { var produceMaterialDetail = produceMaterialDetailManager.Get(this.DepotOut.Details[0].ProduceMaterialdetailsID); this.xrLabelWorkHouse.Text = produceMaterialDetail.NextWorkHouse == null ? "" : produceMaterialDetail.NextWorkHouse.ToString(); } } if (string.IsNullOrEmpty(this.xrLabelWorkHouse.Text)) { this.xrLabelWorkHouse.Text = ProduceMaterial.WorkHouse == null ? "" : ProduceMaterial.WorkHouse.ToString(); } } } else if (this.DepotOut.SourceType == "委外領料單") { Model.ProduceOtherMaterial ProduceOtherMaterial = new BL.ProduceOtherMaterialManager().Get(this.DepotOut.InvioiceId); if (ProduceOtherMaterial != null) { Model.ProduceOtherCompact ProduceOtherCompact = this.produceOtherCompactManager.Get(ProduceOtherMaterial.ProduceOtherCompactId); if (ProduceOtherCompact != null) { if (!string.IsNullOrEmpty(ProduceOtherCompact.MRSHeaderId)) { Model.MRSHeader mRSHeader = this.mRSHeaderManager.Get(ProduceOtherCompact.MRSHeaderId); if (mRSHeader != null) { Model.MPSheader mPSheader = this.mPSheaderManager.Get(mRSHeader.MPSheaderId); if (mPSheader != null) { InvoiceXO = this.invoiceXOManager.Get(mPSheader.InvoiceXOId); if (InvoiceXO != null) { this.xrLabelCustomXoId.Text = InvoiceXO.CustomerInvoiceXOId; this.lblPiHao.Text = InvoiceXO.CustomerLotNumber; this.lblXOCustomer.Text = InvoiceXO.xocustomer == null ? null : InvoiceXO.xocustomer.ToString(); } } } } } if (ProduceOtherMaterial.WorkHouse != null) { this.xrLabelWorkHouse.Text = ProduceOtherMaterial.WorkHouse.ToString(); } } } if (InvoiceXO != null && InvoiceXO.xocustomer != null && !string.IsNullOrEmpty(InvoiceXO.xocustomer.CheckedStandard)) { if (InvoiceXO.xocustomer.CheckedStandard.ToLower().Contains("jis") && InvoiceXO.xocustomer.CustomerFullName.ToUpper().Contains("MIDORI")) { //CreateTagLable("JIS"); this.lbl_JIS.Text = "JIS"; } else if (InvoiceXO.xocustomer.CheckedStandard.ToLower().Contains("as")) { //CreateTagLable("AS"); this.lbl_JIS.Text = "AS"; } } this.txt_ParentProduct.Text = DepotOut.ParentProduct; this.xrLabelXqlu.Text = DepotOut.SourceType; this.xrLabeldescription.Text = DepotOut.description; this.xrLabelXgdj.Text = DepotOut.InvioiceId; this.xrTableCellProductId.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_Inumber); this.xrTableCellProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName); //this.xrTableCellXH.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductSpecification); this.xrTableCellCount.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_DepotOutDetailQuantity); this.xrTableCellUnit.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_ProductUnit); this.xrTableCurrentDepotStock.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_CurrentDepotQuantity); this.xrTableCell_CurrentStock.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_CurrentStockQuantity); this.xrTableCellDepotId.DataBindings.Add("Text", this.DataSource, "DepotPosition." + Model.DepotPosition.PROPERTY_ID); //this.xrTableCellSafeStockQuantity.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.Pro_SafeStockQuantity); this.TCPihao.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_Pihao); this.xrRichText1.DataBindings.Add("Rtf", this.DataSource, Model.DepotOutDetail.Pro_ProductDescription); //this.TCPihao.DataBindings.Add("Text", this.DataSource, Model.DepotOutDetail.PRO_Pihao); this.TCProductCustomerName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_CustomerProductName); }