예제 #1
0
 public void OnGet(string userName, string passWord)
 {
     check = _userService.checkLoginVm(userName, passWord);
     if (check)
     {
         Response.Redirect("http://localhost:5000");
         HttpContext.Session.SetString("IDUser", userName);
         session = HttpContext.Session.GetString("IDUser");
     }
 }
예제 #2
0
 public void OnGet(string userName, string passWord)
 {
     checkRole = _userService.checkRole(userName, passWord);
     check     = _userService.checkLoginVm(userName, passWord);
     HttpContext.Session.SetString("Role", checkRole);
     if (check)
     {
         Response.Redirect("http://localhost:5000");
         HttpContext.Session.SetString("IDUser", userName);
         session = HttpContext.Session.GetString("IDUser");
         if (!HttpContext.Session.GetString("Role").Contains("admin"))
         {
             Response.Redirect("http://localhost:5000/Order");
         }
     }
 }