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