public ActionResult DeleteConfirmed(int id) { UncertaintyBudget uncertaintyBudget = db.UncertaintyBudgets.Find(id); db.UncertaintyBudgets.Remove(uncertaintyBudget); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdNumber,Name")] UncertaintyBudget uncertaintyBudget) { if (ModelState.IsValid) { db.Entry(uncertaintyBudget).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(uncertaintyBudget)); }
public ActionResult Create([Bind(Include = "IdNumber,Name")] UncertaintyBudget uncertaintyBudget) { if (ModelState.IsValid) { db.UncertaintyBudgets.Add(uncertaintyBudget); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(uncertaintyBudget)); }
// GET: UncertaintyBudgets/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } UncertaintyBudget uncertaintyBudget = db.UncertaintyBudgets.Find(id); if (uncertaintyBudget == null) { return(HttpNotFound()); } return(View(uncertaintyBudget)); }