public ActionResult DeleteConfirmed(int id) { FisCode fisCode = db.FisCodes.Find(id); db.FisCodes.Remove(fisCode); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,CodeName,FisCategoryId")] FisCode fisCode) { if (ModelState.IsValid) { db.Entry(fisCode).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FisCategoryId = new SelectList(db.FisCategories, "Id", "Name", fisCode.FisCategoryId); return(View(fisCode)); }
public ActionResult Create([Bind(Include = "Id,CodeName,FisCategoryId")] FisCode fisCode) { if (ModelState.IsValid) { db.FisCodes.Add(fisCode); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FisCategoryId = new SelectList(db.FisCategories, "Id", "Name", fisCode.FisCategoryId); return(View(fisCode)); }
// GET: FisCodes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FisCode fisCode = db.FisCodes.Find(id); if (fisCode == null) { return(HttpNotFound()); } return(View(fisCode)); }
// GET: FisCodes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FisCode fisCode = db.FisCodes.Find(id); if (fisCode == null) { return(HttpNotFound()); } ViewBag.FisCategoryId = new SelectList(db.FisCategories, "Id", "Name", fisCode.FisCategoryId); return(View(fisCode)); }