public ActionResult EditPatient([Bind(Include = "PatientID,PatientFName,PatientSName,PatientEmail,PatientLoginCode,PatientPass")] Patient patient) { if (ModelState.IsValid) { db.Entry(patient).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("PatientHome", "Home", new { @area = "Home" })); } return(View(patient)); }
public ActionResult Edit([Bind(Include = "ConditionID,PatientID,Condition1,ConditionNotes")] Condition condition) { if (ModelState.IsValid) { db.Entry(condition).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Dashboard", "Home", new { area = "" })); } ViewBag.PatientID = new SelectList(db.Patients, "PatientID", "PatientFName", condition.PatientID); return(View(condition)); }
public ActionResult Edit([Bind(Include = "QuestionID,SurveyID,Question1,QuestionType")] Question question) { if (ModelState.IsValid) { db.Entry(question).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.SurveyID = new SelectList(db.Surveys, "SurveyID", "SurveyTitle", question.SurveyID); return(View(question)); }
public ActionResult Edit([Bind(Include = "QuestionAnswerID,QuestionID,QuestionAnswer1")] QuestionAnswer questionAnswer) { if (ModelState.IsValid) { db.Entry(questionAnswer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.QuestionID = new SelectList(db.Questions, "QuestionID", "Question1", questionAnswer.QuestionID); return(View(questionAnswer)); }
public ActionResult Edit([Bind(Include = "SurveyID,DoctorID,PatientID,SurveyTitle,SurveyDesc,SurveyQuestionAmount")] Survey survey) { if (ModelState.IsValid) { db.Entry(survey).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DoctorID = new SelectList(db.Doctors, "DoctorID", "DoctorFName", survey.DoctorID); ViewBag.PatientID = new SelectList(db.Patients, "PatientID", "PatientFName", survey.PatientID); return(View(survey)); }