public ActionResult _OrderOperationDropDownList(string controlName, string controlId, string selectedValue, bool? includeBlankOption, string blankOptionDescription, string blankOptionValue, bool? enable, bool? isChange, string orderNo) { ViewBag.ControlName = controlName; ViewBag.ControlId = controlId; ViewBag.OrderOperation = enable; ViewBag.OrderNo = orderNo; ViewBag.IsChange = isChange; IList<OrderOperation> AssembliesList = new List<OrderOperation>(); if (includeBlankOption.HasValue && includeBlankOption.Value) { var assemblies = new OrderOperation { DisplayOperation = blankOptionValue ?? string.Empty }; AssembliesList.Insert(0, assemblies); } return PartialView(new SelectList(AssembliesList, "Id", "DisplayOperation", selectedValue)); }
public void AntiBackflushProductOrder(OrderOperation orderOperation, OrderOperationReport orderOperationReport) { IList<OrderBomDetail> orderBomDetailList = this.genericMgr.FindEntityWithNativeSql<OrderBomDetail>(@"select * from ORD_OrderBomDet where OrderNo = ? and Op = ? and OrderQty <> 0", new object[] { orderOperation.OrderNo, orderOperation.Operation }); if (orderBomDetailList != null && orderBomDetailList.Count > 0) { FlowMaster prodLine = this.genericMgr.FindEntityWithNativeSql<FlowMaster>(@"select * from SCM_FlowMstr where Code in (select Flow from ORD_OrderMstr_4 where OrderNo = ?)", orderOperation.OrderNo).Single(); string fgItem = this.genericMgr.FindAllWithNativeSql<string>(@"select Item from ORD_OrderDet_4 where OrderNo = ?", orderOperation.OrderNo).Single(); IList<BackflushInput> backflushInputList = (from bom in orderBomDetailList where bom.OrderedQty != 0 select new BackflushInput { OrderNo = bom.OrderNo, OrderDetailId = bom.OrderDetailId, OrderDetailSequence = bom.OrderDetailSequence, OrderBomDetail = bom, OrderType = CodeMaster.OrderType.Production, OrderSubType = CodeMaster.OrderSubType.Normal, FGItem = fgItem, Item = bom.Item, ItemDescription = bom.ItemDescription, ReferenceItemCode = bom.ReferenceItemCode, Uom = bom.Uom, BaseUom = bom.BaseUom, UnitQty = bom.UnitQty, Operation = bom.Operation, OpReference = bom.OpReference, Location = bom.Location, ProductLine = prodLine.Code, Qty = bom.BomUnitQty * (orderOperationReport.ReportQty + orderOperationReport.ScrapQty), CurrentProductLine = prodLine, EffectiveDate = orderOperationReport.EffectiveDate, OrderOpReportId = orderOperationReport.Id, OrderOpId = orderOperation.Id, WorkCenter = orderOperation.WorkCenter, }).ToList(); IList<InventoryTransaction> inventoryTransactionList = this.locationDetailMgr.CancelBackflushProductMaterial(backflushInputList); } }