public ActionResult Edit(long id) { MoveQueuesPost movequeues = _movequeuesService.GetPost(id); if (movequeues == null) { return(NotFound()); } ViewBag.ixInboundOrderLine = new SelectList(_movequeuesService.selectInboundOrderLinesNullable().Select(x => new { ixInboundOrderLine = x.Key, sInboundOrderLine = x.Value }), "ixInboundOrderLine", "sInboundOrderLine", movequeues.ixInboundOrderLine); ViewBag.ixMoveQueueContext = new SelectList(_movequeuesService.selectMoveQueueContexts().Select(x => new { x.ixMoveQueueContext, x.sMoveQueueContext }), "ixMoveQueueContext", "sMoveQueueContext", movequeues.ixMoveQueueContext); ViewBag.ixMoveQueueType = new SelectList(_movequeuesService.selectMoveQueueTypes().Select(x => new { x.ixMoveQueueType, x.sMoveQueueType }), "ixMoveQueueType", "sMoveQueueType", movequeues.ixMoveQueueType); ViewBag.ixOutboundOrderLine = new SelectList(_movequeuesService.selectOutboundOrderLinesNullable().Select(x => new { ixOutboundOrderLine = x.Key, sOutboundOrderLine = x.Value }), "ixOutboundOrderLine", "sOutboundOrderLine", movequeues.ixOutboundOrderLine); ViewBag.ixPickBatch = new SelectList(_movequeuesService.selectPickBatchesNullable().Select(x => new { ixPickBatch = x.Key, sPickBatch = x.Value }), "ixPickBatch", "sPickBatch", movequeues.ixPickBatch); ViewBag.ixSourceHandlingUnit = new SelectList(_movequeuesService.selectHandlingUnitsNullable().Select(x => new { ixHandlingUnit = x.Key, sHandlingUnit = x.Value }), "ixHandlingUnit", "sHandlingUnit", movequeues.ixSourceHandlingUnit); ViewBag.ixSourceInventoryLocation = new SelectList(_movequeuesService.selectInventoryLocationsNullable().Select(x => new { ixInventoryLocation = x.Key, sInventoryLocation = x.Value }), "ixInventoryLocation", "sInventoryLocation", movequeues.ixSourceInventoryLocation); ViewBag.ixSourceInventoryUnit = new SelectList(_movequeuesService.selectInventoryUnitsNullable().Select(x => new { ixInventoryUnit = x.Key, sInventoryUnit = x.Value }), "ixInventoryUnit", "sInventoryUnit", movequeues.ixSourceInventoryUnit); ViewBag.ixStatus = new SelectList(_movequeuesService.selectStatuses().Select(x => new { x.ixStatus, x.sStatus }), "ixStatus", "sStatus", movequeues.ixStatus); ViewBag.ixTargetHandlingUnit = new SelectList(_movequeuesService.selectHandlingUnitsNullable().Select(x => new { ixHandlingUnit = x.Key, sHandlingUnit = x.Value }), "ixHandlingUnit", "sHandlingUnit", movequeues.ixTargetHandlingUnit); ViewBag.ixTargetInventoryLocation = new SelectList(_movequeuesService.selectInventoryLocationsNullable().Select(x => new { ixInventoryLocation = x.Key, sInventoryLocation = x.Value }), "ixInventoryLocation", "sInventoryLocation", movequeues.ixTargetInventoryLocation); ViewBag.ixTargetInventoryUnit = new SelectList(_movequeuesService.selectInventoryUnitsNullable().Select(x => new { ixInventoryUnit = x.Key, sInventoryUnit = x.Value }), "ixInventoryUnit", "sInventoryUnit", movequeues.ixTargetInventoryUnit); return(View(movequeues)); }