Esempio n. 1
0
 public void OnGet()
 {
     try
     {
         if (!_service.EnvAllowed() || !_service.IsLogged())
         {
             GoToIndex();
         }
         else
         {
             Detail_Log = _service.Get((LogSource)Detail_Source, Detail_ID, Detail_Level).Result;
         }
     }
     catch (Exception e)
     {
         var item = new Log_Master()
         {
             Message          = e.Message,
             DateTime         = DateTime.Now,
             LevelID          = (int)LogLevel.Error,
             CallerMemberName = "DetailModel.OnGet",
             FullData         = e.ToString()
         };
         _service.LogError(item, e);
     }
 }
Esempio n. 2
0
 public IActionResult OnGet()
 {
     if (!_service.EnvAllowed())
     {
         DenyEnvironment = true;
         return(Page());
     }
     if (!_service.IsLogged())
     {
         return(Page());
     }
     return(RedirectToPage("./Recap"));
 }