public ActionResult Profile() { using (var context = new StripeEntities()) { try { UserProfile userProfile = new UserProfile(); int id = Convert.ToInt32(Session["loginid"]); var refereeProfile = userProfile.getUserProfile(id, context); GetGameList getGameList = new GetGameList(context); ViewBag.GameList = getGameList.getGameTypeList(); if (refereeProfile != null) { ViewBag.RefList = getGameList.getRefTypeList(refereeProfile.Sport_Name_spt_Sport_Name_ID); } return(View(refereeProfile)); } catch (Exception exception) { Console.Write(exception.Message); ViewBag.ErrorMessage = "There is something wrong with the account. Please contact admin"; return(View("Error")); } } }
public ActionResult CreateEvent() { using (var context = new StripeEntities()) { ViewBag.SchoolList = SchoolClass.getSchoolList(context); GetGameList getGameList = new GetGameList(context); ViewBag.GameList = getGameList.getGameTypeList(); } return(View()); }
public ActionResult EditEvent(int eventId) { using (var context = new StripeEntities()) { Event getEventDetails = new Event(context); var eventDetails = getEventDetails.GetEventByEventId(eventId) .SingleOrDefault(); ViewBag.SchoolList = SchoolClass.getSchoolList(context); GetGameList getGameList = new GetGameList(context); ViewBag.GameList = getGameList.getGameTypeList(); return(View(eventDetails)); } }