예제 #1
0
 public UsuarioMembership(Usuario us)
 {
     var clave = ConfigurationManager.AppSettings["ClaveCifrado"];
       idUsuario = us.idUsuario;
       Rol = us.Rol.nombre;
       login = us.login;
 }
예제 #2
0
        public ActionResult Index(Usuario model)
        {
            if (Membership.ValidateUser(model.login, model.password))
            {
                //HttpContext.Application["horaLogin"] = DateTime.Now;
                //TempData["horaLogin"] = DateTime.Now;
                Session["horaLogin"] = DateTime.Now;

                FormsAuthentication.RedirectFromLoginPage(model.login,false);
                return null;

            }

            return View(model);
        }