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