コード例 #1
0
        public ActionResult UserLogin(StudentModel studentModel)
        {
            int result = student.LoginInfo(studentModel.Email, studentModel.Password);

            ModelState.Clear();
            if (result == 1)
            {
                Session["MailId"] = studentModel.Email.ToString();
                ModelState.Clear();
                return(RedirectToAction("Index", "Student"));
            }
            else
            {
                ViewBag.message = "Invalid User";

                return(View("Index"));
            }
        }