示例#1
0
        public void GetPatientProfileNonExistingTest()
        {
            // Act
            var result = patientProfile.GetPatientProfile();

            // Assert
            Assert.IsNull(result);
        }
示例#2
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));
        }
示例#3
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));
        }
示例#4
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));
     }
 }