public ActionResult UploadScholarshipDetails(int?scholarshipID) { try { if (scholarshipID == null) { return(RedirectToAction("ScholarshipSelection", "WebsiteContent")); } else { if (User.IsInRole("Administrator")) { return(View(websiteActions.GetScholarshipByID((int)scholarshipID))); } else { TempData["errorMessage"] = "Sorry you do not have access."; return(RedirectToAction("DownloadableForms", "WebsiteContent")); } } } catch (Exception e) { TempData["errorMessage"] = "There was an error in displaying the scholarship you wish to edit."; return(RedirectToAction("WebsiteContent", "ScholarshipSelection")); } }
public ActionResult Scholarship(int? scholarshipID) { Scholarship scholarship = null; try { if(scholarshipID == null) { return RedirectToAction("ScholarshipSelection"); } else { scholarship = websiteActions.GetScholarshipByID( (int)scholarshipID ); return View(scholarship); } } catch(Exception e) { TempData["errorMessage"] = "Sorry there was an error in displaying the scholarships. Please try again."; return RedirectToAction("ScholarshipSelection"); } }