public void GetPatientInfoNonExistingTest() { // Act var result = patientProfile.GetPatientInfo(); // Assert Assert.IsNull(result); }
public ActionResult EditProfile() { if (Session["userId"] == null) { return(Redirect("~")); } var PatientViewObj = new PatientProfileView((int)Session["userId"]); var Patient = PatientViewObj.GetPatientProfile(); var PatientInfo = PatientViewObj.GetPatientInfo(); PatientProfileEditViewModel model = new PatientProfileEditViewModel(); AutoMapper.Mapper.Map(Patient, model); AutoMapper.Mapper.Map(PatientInfo, model); return(View(model)); }
public ActionResult PatientProfile() { if (Session["userId"] == null) { return(Redirect("~")); } var PatientViewObj = new PatientProfileView((int)Session["userId"]); var viewModel = new PatientProfileViewModel { Patient = PatientViewObj.GetPatientProfile(), PatientInfo = PatientViewObj.GetPatientInfo() }; return(View(viewModel)); }
public ActionResult PatientUserProfile() { if (Session["userId"] == null) { return(Redirect("~")); } if (TempData["Id"] == null) { return(RedirectToAction("Patients")); } else { var PatientViewObj = new PatientProfileView((int)TempData["Id"]); var viewModel = new PatientProfileViewModel { Patient = PatientViewObj.GetPatientProfile(), PatientInfo = PatientViewObj.GetPatientInfo() }; return(View(viewModel)); } }