public ActionResult DeleteConfirmed(Guid id) { SendingAllocated sendingAllocated = db.SendingAllocateds.Find(id); db.SendingAllocateds.Remove(sendingAllocated); db.SaveChanges(); return(RedirectToAction("Index")); }
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)); }
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)); }
// 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)); }
// 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)); }