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