public static Production_BOM_Lines ToErpObject(this BomRow bomRow, Production_BOM_Lines line, ItemCard item) { line.No = bomRow.ChildNumber; line.Position = bomRow.Position.ToString(); //line.Type = bomRow.Type == "Part" ? SOAP.BOMs.Type.Item : SOAP.BOMs.Type.Production_BOM; line.Type = SOAP.BOMs.Type.Item; line.TypeSpecified = true; line.Quantity_per = Convert.ToDecimal(bomRow.Quantity); line.Quantity_perSpecified = true; line.Unit_of_Measure_Code = item.Base_Unit_of_Measure; line.Description = item.Description; return(line); }
public static BomRow ToPowerGateObject(this Production_BOM_Lines line, string parentNumber) { return(new BomRow { ParentNumber = parentNumber, ChildNumber = line.No, Position = Convert.ToInt32(line.Position), Type = line.Type == SOAP.BOMs.Type.Item ? "Part" : "Assembly", Quantity = line.Quantity_per, UnitOfMeasure = line.Unit_of_Measure_Code, Description = line.Description, ModifiedDate = DateTime.MinValue }); }