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