Пример #1
0
        public IActionResult OnGet(int rId)
        {
            string User = HttpContext.Session.GetString("username");

            UserRecord = repo.GetRecordsById(rId);
            if (string.IsNullOrEmpty(User) && UserRecord == null)
            {
                return(RedirectToPage("/Index"));
            }
            return(Page());
        }
Пример #2
0
        public IActionResult OnGet(int id)
        {
            if (id < 0)
            {
                return(RedirectToPage("Index"));
            }

            Records = _context.GetRecordsById(id, true);

            if (Records == null)
            {
                NotFound();
                return(RedirectToPage("Index"));
            }
            return(Page());
        }