public ActionResult DeleteConfirmed(int id) { ComplienceSubType complienceSubType = db.ComplienceSubTypes.Find(id); db.ComplienceSubTypes.Remove(complienceSubType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(ComplienceSubType complienceSubType) { if (ModelState.IsValid) { db.Entry(complienceSubType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(complienceSubType)); }
public ActionResult Create(ComplienceSubType complienceSubType) { if (ModelState.IsValid) { db.ComplienceSubTypes.Add(complienceSubType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(complienceSubType)); }
// GET: ComplienceSubTypes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ComplienceSubType complienceSubType = db.ComplienceSubTypes.Find(id); if (complienceSubType == null) { return(HttpNotFound()); } return(View(complienceSubType)); }