Exemplo n.º 1
0
        // GET: MaterialInputs/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MaterialInputViewModel materialInput = Mapper.Map <MaterialInputViewModel>(materialInputService.Get(id.Value));

            if (materialInput == null)
            {
                return(HttpNotFound());
            }
            return(View(materialInput));
        }
Exemplo n.º 2
0
        // GET: MaterialInputs/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MaterialInputViewModel materialInput = Mapper.Map <MaterialInputViewModel>(materialInputService.Get(id.Value));

            if (materialInput == null)
            {
                return(HttpNotFound());
            }
            ViewBag.MaterialId      = new SelectList(materialService.GetAll(), "Id", "Name", materialInput.MaterialId);
            ViewBag.OrderId         = new SelectList(orderService.GetAll(), "Id", "Name", materialInput.OrderId);
            ViewBag.OrderTypeId     = new SelectList(orderTypeService.GetAll(), "Id", "Name", materialInput.OrderTypeId);
            ViewBag.StockLocationId = new SelectList(stockLocationService.GetAll(), "Id", "Name", materialInput.StockLocationId);
            ViewBag.SupplierId      = new SelectList(supplierService.GetAll(), "Id", "Name", materialInput.SupplierId);
            return(View(materialInput));
        }