예제 #1
0
 public IActionResult OnGet(int jobId)
 {
     Job = jobData.GetById(jobId);
     if (Job == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
예제 #2
0
        public IActionResult OnGet(int?jobId)
        {
            Departments = htmlHelper.GetEnumSelectList <DepartmentType>();

            if (jobId.HasValue)
            {
                Job = jobData.GetById(jobId.Value);
            }
            else
            {
                Job = new Job();
            }

            if (Job == null)
            {
                return(RedirectToPage("./NotFound"));
            }
            return(Page());
        }