Ejemplo n.º 1
0
        public ActionResult Edit(long id)
        {
            InventoryUnitsPost inventoryunits = _inventoryunitsService.GetPost(id);

            if (inventoryunits == null)
            {
                return(NotFound());
            }
            ViewBag.ixCompany           = new SelectList(_inventoryunitsService.selectCompanies().Select(x => new { x.ixCompany, x.sCompany }), "ixCompany", "sCompany", inventoryunits.ixCompany);
            ViewBag.ixFacility          = new SelectList(_inventoryunitsService.selectFacilities().Select(x => new { x.ixFacility, x.sFacility }), "ixFacility", "sFacility", inventoryunits.ixFacility);
            ViewBag.ixHandlingUnit      = new SelectList(_inventoryunitsService.selectHandlingUnitsNullable().Select(x => new { ixHandlingUnit = x.Key, sHandlingUnit = x.Value }), "ixHandlingUnit", "sHandlingUnit", inventoryunits.ixHandlingUnit);
            ViewBag.ixInventoryLocation = new SelectList(_inventoryunitsService.selectInventoryLocations().Select(x => new { x.ixInventoryLocation, x.sInventoryLocation }), "ixInventoryLocation", "sInventoryLocation", inventoryunits.ixInventoryLocation);
            ViewBag.ixInventoryState    = new SelectList(_inventoryunitsService.selectInventoryStates().Select(x => new { x.ixInventoryState, x.sInventoryState }), "ixInventoryState", "sInventoryState", inventoryunits.ixInventoryState);
            ViewBag.ixMaterial          = new SelectList(_inventoryunitsService.selectMaterials().Select(x => new { x.ixMaterial, x.sMaterial }), "ixMaterial", "sMaterial", inventoryunits.ixMaterial);
            ViewBag.ixStatus            = new SelectList(_inventoryunitsService.selectStatuses().Select(x => new { x.ixStatus, x.sStatus }), "ixStatus", "sStatus", inventoryunits.ixStatus);

            return(View(inventoryunits));
        }