示例#1
0
 public IActionResult OnGet(int doctorId)
 {
     Doctor = doctorData.GetById(doctorId);
     if (Doctor == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
示例#2
0
        public IActionResult OnGet(int?doctorId)
        {
            Types = htmlHelper.GetEnumSelectList <DoctorType>();
            if (doctorId.HasValue)
            {
                Doctor = doctorData.GetById(doctorId.Value);
                if (Doctor == null)
                {
                    return(RedirectToPage("./NotFound"));
                }
            }
            else
            {
                Doctor = new Doctor();
            }

            return(Page());
        }