Ejemplo n.º 1
0
 public ActionResult Login(Employee user)
 {
     if (EmployeeUtils.AuthenticationEmployee(user.Name, user.Password))
     {
         Session["LoginedUser"] = user.Name;
         if (user.Name == "Admin")
         {
             return(RedirectToAction("Index", "Admin"));
         }
         return(RedirectToAction("Index", "Employee"));
     }
     return(RedirectToAction("LoginError"));
 }