public ActionResult DoctorProfile() { if (Session["userId"] == null) { return(Redirect("~")); } var DoctorViewObj = new DoctorProfileView((int)Session["userId"]); var viewModel = new DoctorProfileViewModel { Doctor = DoctorViewObj.GetDoctorProfile().Doctor, DoctorFee = DoctorViewObj.GetDoctorProfile() }; return(View(viewModel)); }
public void GetDoctorProfileExistingDoctorTest() { // Act var result = doctorProfile.GetDoctorProfile(); Assert.IsNull(result); }
public ActionResult DoctorUserProfile() { if (Session["userId"] == null) { return(Redirect("~")); } if (TempData["Id"] == null) { return(RedirectToAction("Doctors")); } else { var DoctorViewObj = new DoctorProfileView((int)TempData["Id"]); var viewModel = new DoctorProfileViewModel { Doctor = DoctorViewObj.GetDoctorProfile().Doctor, DoctorFee = DoctorViewObj.GetDoctorProfile() }; return(View(viewModel)); } }
public ActionResult EditProfile() { if (Session["userId"] == null) { return(Redirect("~")); } var DoctorViewObj = new DoctorProfileView((int)Session["userId"]); var Doctor = DoctorViewObj.GetDoctorProfile().Doctor; var model = new DoctorProfileEditViewModel(); AutoMapper.Mapper.Map(Doctor, model); return(View(model)); }