Exemplo n.º 1
0
 public ActionResult Faculty_Login(string email, string password)
 {
     try
     {
         Faculty faculty = facultyrepo.Faculty_Login(email, password);
         if (faculty.Active)
         {
             Session["facultyId"]   = faculty.FacultyId;
             Session["facultyName"] = faculty.FacultyName;
             return(View("Faculty_Dashboard"));
         }
     }
     catch (Exception ex)
     {
         Exceptions exception = new Exceptions
         {
             ExceptionNumber  = ex.HResult.ToString(),
             ExceptionMessage = ex.Message,
             ExceptionMethod  = "Faculty_Login",
             ExceptionUrl     = ""
         };
         exceptionrepo.Exception_Create(exception);
     }
     ViewBag.Message = "Incorrect E-mail or Password";
     return(View());
 }