コード例 #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());
        }