public ActionResult DeleteConfirmed(int id) { ConsumedRelease consumedRelease = db.ConsumedRelease.Find(id); db.ConsumedRelease.Remove(consumedRelease); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ConsumptionID,TotalConsumption,Year,Quarter,ProductionID,OrganizationID")] ConsumedRelease consumedRelease) { if (ModelState.IsValid) { db.Entry(consumedRelease).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.OrganizationID = new SelectList(db.Organization, "OrganizationID", "OrganizationName", consumedRelease.OrganizationID); ViewBag.ProductionID = new SelectList(db.TypesProduction, "ProductionID", "ProductionName", consumedRelease.ProductionID); return(View(consumedRelease)); }
// GET: ConsumedReleases/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ConsumedRelease consumedRelease = db.ConsumedRelease.Find(id); if (consumedRelease == null) { return(HttpNotFound()); } return(View(consumedRelease)); }
// GET: ConsumedReleases/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ConsumedRelease consumedRelease = db.ConsumedRelease.Find(id); if (consumedRelease == null) { return(HttpNotFound()); } ViewBag.OrganizationID = new SelectList(db.Organization, "OrganizationID", "OrganizationName", consumedRelease.OrganizationID); ViewBag.ProductionID = new SelectList(db.TypesProduction, "ProductionID", "ProductionName", consumedRelease.ProductionID); return(View(consumedRelease)); }