public void GetPatientProfileNonExistingTest() { // Act var result = patientProfile.GetPatientProfile(); // 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)); } }