Esempio n. 1
0
        // GET: InvTransferLogs/Edit/5
        public ActionResult Edit(int?id)
        {
            var invtransferlogs = db.InvTransferLogs.SingleOrDefault(c => c.InvTransferLogId == id);

            var invLocation = db.InvLocation.ToList();

            var viewModel = new InvTransferLogViewModel()
            {
                InvTransferLog = invtransferlogs,
                InvLocations   = invLocation,
            };

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            InvTransferLog invTransferLog = db.InvTransferLogs.Find(id);

            if (invTransferLog == null)
            {
                return(HttpNotFound());
            }
            return(View("Edit", viewModel));
            //return View(invTransferLog);
        }
Esempio n. 2
0
        // GET: InvTransferLogs/Create
        public ActionResult Create()
        {
            ViewBag.ReturnUrl = Request.UrlReferrer;
            var invLocation = db.InvLocation.ToList();

            var viewModel = new InvTransferLogViewModel()
            {
                InvLocations = invLocation,
            };

            return(View("Create", viewModel));
            //return View();
        }