Пример #1
0
 public IActionResult OnGet(int companyId)
 {
     Company = companyData.GetById(companyId);
     if (Company == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
Пример #2
0
 public IActionResult OnGet(int companyId)
 {
     company = new CompanyDemo.Core.Company();
     company = companyData.GetById(companyId);
     if (company == null)
     {
         //Response.StatusCode = 404;
         //return null;
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
Пример #3
0
 public void OnGet(int companyId)
 {
     Company      = companyData.GetById(companyId);
     CompanyTypes = htmlHelper.GetEnumSelectList <CompanyType>();
 }