Пример #1
0
        public ActionResult Index(LoginViewModel loginViewModel)
        {
            Authentrication a    = new Authentrication();
            bool            flag = a.Authenticate(loginViewModel);

            if (flag == true)
            {
                Session["login"] = 1;
                return(RedirectToAction("Index", "Student"));
            }
            else
            {
                return(View(loginViewModel));
            }
        }
Пример #2
0
 public IndexViewModel()
 {
     a     = new Authentrication();
     _user = a.User;
 }