Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        public void GetDoctorProfileExistingDoctorTest()
        {
            // Act
            var result = doctorProfile.GetDoctorProfile();

            Assert.IsNull(result);
        }
Exemplo n.º 3
0
 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));
     }
 }
Exemplo n.º 4
0
        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));
        }