Exemplo n.º 1
0
        public ActionResult Index(WepApp.WebPagesModels.loginModel model)
        {
            KokiAccessorizeAppDBEntities db = new KokiAccessorizeAppDBEntities();

            var u = db.Administrators.Where(x => x.LoginName == model.username && x.LoginPassword == model.password).FirstOrDefault();

            if (u != null)
            {
                _App.Current.User = u.UserInfo; return(RedirectToAction("index", "home"));
            }
            else
            {
                model.message = "Wrong user name or password!";
            }



            return(View(model));
        }
Exemplo n.º 2
0
 // GET: Login
 public ActionResult Index()
 {
     WepApp.WebPagesModels.loginModel lm = new WepApp.WebPagesModels.loginModel();
     return(View(lm));
 }