public ActionResult deleteProfile(int id) { patientsProfile patients = db.profile.Find(id); db.profile.Remove(patients); db.SaveChanges(); return(RedirectToAction("profileSettings")); }
public ActionResult editProfile([Bind(Include = "id,name,paitientNo,symptoms,phNo")] patientsProfile patients) { if (ModelState.IsValid) { db.Entry(patients).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(patients)); }
public ActionResult patientProfile([Bind(Include = "id,name,symptoms,phNo")] patientsProfile dataSet) { if (ModelState.IsValid) { db.profile.Add(dataSet); db.SaveChanges(); return(RedirectToAction("profileSettings")); } return(View(dataSet)); }
// GET: Patients/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } patientsProfile patients = db.profile.Find(id); if (patients == null) { return(HttpNotFound()); } return(View(patients)); }