Beispiel #1
0
        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));
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 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));
     }
 }