public ActionResult Login(Authorization auth)
 {
     Client.Authorize(Parser.ParseAuth(auth));
     if (Client.Authorize(Parser.ParseAuth(auth)) != Guid.Empty)
     {
         return(RedirectToAction("Index"));
     }
     else
     {
         ModelState.AddModelError("", "Неправильно введен логин и/или пароль");
     }
     return(View());
 }
Ejemplo n.º 2
0
        public ActionResult Login(Authorization auth)
        {
            Guid id = Client.Authorize(Parser.ParseAuth(auth));

            if (id != Guid.Empty)
            {
                //Driver driver = Parser.GetDriver(Client.FindDriverByAuth(id));
                return(RedirectToAction("AllOrders", "Order", new { driverId = id }));
            }
            else
            {
                ModelState.AddModelError("", "Неправильно введен логин и/или пароль");
            }
            return(View());
        }