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