Ejemplo n.º 1
0
 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"));
         }
     }
 }
Ejemplo n.º 2
0
        public GetGameListResponse Get(GetGameList request)
        {
            var games = Cache.Get <AllGames>(AllGamesSummaries);

            return(new GetGameListResponse
            {
                AllGames = games
            });
        }
Ejemplo n.º 3
0
 public PartialViewResult GetRefList(int GameCode)
 {
     using (var context = new StripeEntities())
     {
         GetGameList getRefList = new GetGameList(context);
         ViewBag.RefList = getRefList.getRefTypeList(GameCode);
         return(PartialView("_RefList"));
     }
 }
Ejemplo n.º 4
0
        public async Task <GetGameListResult> Handle(GetGameList request, CancellationToken cancellationToken)
        {
            var gameList = await queryExecutor.Query <GameListItem>(queryString, new { request.UserId });

            return(new GetGameListResult
            {
                List = gameList.ToList()
            });
        }
Ejemplo n.º 5
0
 public ActionResult CreateEvent()
 {
     using (var context = new StripeEntities())
     {
         ViewBag.SchoolList = SchoolClass.getSchoolList(context);
         GetGameList getGameList = new GetGameList(context);
         ViewBag.GameList = getGameList.getGameTypeList();
     }
     return(View());
 }
Ejemplo n.º 6
0
        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));
            }
        }
Ejemplo n.º 7
0
    private void OpenGameList(string interactableObjectName)
    {
        gameList = GetGameList.GetGames(interactableObjectName);

        if (gameList.Count == 0)
        {
            npcText.text = "Sorry you are not allowed to play this games. Come back later.";
            return;
        }

        textBox.SetActive(false);
        gamelistObject.SetActive(true);

        FillPanelWithGames(interactableObjectName);

        scrollList.AddButtons(gameList);

        gamelistTitle.text       = dialogue.GetGamelistTitle(interactableObjectName, json);
        gamelistDescription.text = dialogue.GetGamelistDescription(interactableObjectName, json);
    }
Ejemplo n.º 8
0
 public ActionResult Apply(int eventId)
 {
     using (var context = new StripeEntities())
     {
         int          refereeId    = Convert.ToInt32(Session["loginid"]);
         EventReferee eventReferee = new EventReferee(context);
         if (eventReferee.CheckRefereeEligibilityForApplication(eventId, refereeId))
         {
             Event       allEvents    = new Event(context);
             var         eventDetails = allEvents.GetEventByEventId(eventId).SingleOrDefault();
             GetGameList getRefList   = new GetGameList(context);
             ViewBag.RefereeList = getRefList.getRefTypeList(eventDetails.Sport_Name_spt_Sport_Name_ID);
             return(View(eventDetails));
         }
         else
         {
             ViewBag.ErrorMessage = "You've already applied for this event. Please wait for any further notification.";
             return(View("Error"));
         }
     }
 }
Ejemplo n.º 9
0
 public GetGameListResponse Get(GetGameList request)
 {
     var games = Cache.Get<AllGames>(AllGamesSummaries);
     return new GetGameListResponse
     {
         AllGames = games
     };
 }