Ejemplo n.º 1
0
 public IActionResult OnGet(int jobId)
 {
     Job = jobData.GetById(jobId);
     if (Job == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
Ejemplo n.º 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());
        }