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