Exemple #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            if (!await _service.CheckLoginAdminAsync(Login))
            {
                return(RedirectToPage("Login"));
            }
            HttpContext.Session.SetString("AccountAdmin", Login.Account);

            return(RedirectToPage("Customer"));
        }