public ActionResult LeaveApplication(int applicationId) { try { var check = eDAO.CheckRequest(applicationId); if (!check) { return(View("Requested")); } var state = eDAO.LeaveApplication(applicationId); if (state) { return(RedirectToAction("Index")); } else { return(View("ProfileNotFound")); } } catch (Exception ex) { return(RedirectToAction("Index")); } }