Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(Guid id)
        {
            SendingAllocated sendingAllocated = db.SendingAllocateds.Find(id);

            db.SendingAllocateds.Remove(sendingAllocated);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,AllocatedProductId,AmountSent")] SendingAllocated sendingAllocated)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sendingAllocated).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AllocatedProductId = new SelectList(db.AllocatedProducts, "Id", "Date", sendingAllocated.AllocatedProductId);
     return(View(sendingAllocated));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Id,AllocatedProductId,AmountSent")] SendingAllocated sendingAllocated)
        {
            if (ModelState.IsValid)
            {
                sendingAllocated.Id = Guid.NewGuid();
                db.SendingAllocateds.Add(sendingAllocated);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.AllocatedProductId = new SelectList(db.AllocatedProducts, "Id", "Date", sendingAllocated.AllocatedProductId);
            return(View(sendingAllocated));
        }
Exemplo n.º 4
0
        // GET: Storage/SendingAllocateds/Details/5
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SendingAllocated sendingAllocated = db.SendingAllocateds.Find(id);

            if (sendingAllocated == null)
            {
                return(HttpNotFound());
            }
            return(View(sendingAllocated));
        }
Exemplo n.º 5
0
        // GET: Storage/SendingAllocateds/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SendingAllocated sendingAllocated = db.SendingAllocateds.Find(id);

            if (sendingAllocated == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AllocatedProductId = new SelectList(db.AllocatedProducts, "Id", "Date", sendingAllocated.AllocatedProductId);
            return(View(sendingAllocated));
        }