public ActionResult DeleteConfirmed(int id) { FFLType ffltype = db.FFLTypes.Find(id); db.FFLTypes.Remove(ffltype); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /FFLType/Delete/5 public ActionResult Delete(int id = 0) { FFLType ffltype = db.FFLTypes.Find(id); if (ffltype == null) { return(HttpNotFound()); } return(View(ffltype)); }
public ActionResult Edit(FFLType ffltype) { if (ModelState.IsValid) { db.Entry(ffltype).State = EntityState.Modified; int userid = int.Parse(Session.Contents["UserID"].ToString()); ffltype.ModifiedBy = userid; ffltype.ModifiedDate = DateTime.Now; return(RedirectToAction("Index")); } return(View(ffltype)); }
public ActionResult Create([Bind(Exclude = "FFLType_Id")] FFLType ffltype) { if (ModelState.IsValid) { db.FFLTypes.Add(ffltype); int userid = int.Parse(Session.Contents["UserID"].ToString()); ffltype.ModifiedBy = userid; ffltype.ModifiedDate = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ffltype)); }