Esempio n. 1
0
 public IActionResult EditStudent(UserInfo student)
 {
     try
     {
         int Logged = Convert.ToInt32(HttpContext.Session.GetInt32("Logged"));
         int User   = Convert.ToInt32(HttpContext.Session.GetInt32("User"));
         if (Logged == 1 && User == 1)
         {
             adminDAObj.UpdateStudent(student);
             string Success = "Student Details Updated successfully";
             return(RedirectToAction("StudentList", new { message = Success }));
         }
         else
         {
             return(RedirectToAction("Login", "Home"));
         }
     }
     catch (Exception ex)
     {
         string exMessage = "oops! There is a problem in editing student.";
         return(RedirectToAction("Index", "ExeptionHandler", new { Exeption = exMessage }));
     }
 }