示例#1
0
        public ActionResult SpecialistProfile(string specialistId, string accId)
        {
            AppointmentViewModel      result       = new AppointmentViewModel();
            PractitionerBaseViewModel practitioner = new PractitionerBaseViewModel();

            if (String.IsNullOrEmpty(specialistId) && String.IsNullOrEmpty(accId))
            {
                return(new HttpNotFoundResult("Oops..There is no account selected. Please try again."));
            }
            else
            {
                Guid patientAccId = Guid.Parse(accId);
                result.PatientId = patientAccId;

                Guid specialistAccId = Guid.Parse(specialistId);
                if (specialistAccId.Equals(Guid.Empty))
                {
                    return(new HttpNotFoundResult("Oops..There is some errors occur. Please try again."));
                }
                else
                {
                    PractitionerBaseViewModel vm = new PractitionerBaseViewModel();
                    vm.AccId = specialistAccId;
                    PractitionerProcess process = new PractitionerProcess();
                    practitioner = process.GetProfile(vm);

                    result.Practitioner = practitioner;
                }
            }

            return(View(result));
        }
示例#2
0
 public ActionResult Profile(PractitionerBaseViewModel vm)
 {
     if (vm.AccId.Equals(Guid.Empty))
     {
         return(RedirectToAction("PractitionerLogin", "HomePage", null));
     }
     else
     {
         PractitionerBaseViewModel result  = new PractitionerBaseViewModel();
         PractitionerProcess       process = new PractitionerProcess();
         result = process.GetProfile(vm);
         return(View(result));
     }
 }