public ActionResult LogIn(LogInViewModel pro)
        {
            LogInClient CC    = new LogInClient();
            LogIn       logIn = CC.Create(pro.logIn);

            if (logIn == null)
            {
                Session["USERID"] = null;
                return(RedirectToAction("HomePage", "Home"));
            }
            else
            {
                Session["USERID"] = logIn.LogInId;
                return(RedirectToAction("Index", "Student"));
            }
        }
예제 #2
0
        public ActionResult LogIn(LogInViewModel pro)
        {
            LogInClient CC    = new LogInClient();
            LogIn       logIn = CC.Create(pro.logIn);

            if (logIn == null)
            {
                TempData["Error"] = "Invalid UserName and Password.";
                Session["USERID"] = null;
                return(RedirectToAction("LogIn", "LogIn"));
            }
            else
            {
                Session["USERID"] = logIn.LogInId;
                return(RedirectToAction("Index", "Vendor"));
            }
        }