Example #1
0
        public ActionResult Index()//ComingSoon()
        {
            int                        MemberId  = 0;
            AccountService             service   = new AccountService(db, null);
            HomeAuthenticatedViewModel mainModel = new HomeAuthenticatedViewModel();

            if (Request.IsAuthenticated)
            {
                MemberId = service.findMember(User.Identity.Name).MemberID;
                List <MyVaultItemViewModel> topSectionList = FindTopSectionList(MemberId);

                mainModel.TopSection = topSectionList.OrderBy(x => x.GameScheduleStart).Take(10);
                //3.Get Upcoming Vault Items

                List <MyVaultItemViewModel> upcomingVaultItemList = new List <MyVaultItemViewModel>();
                //TODO : Get Vault Items
                mainModel.UpcomingVaultItems = topSectionList.OrderBy(x => x.GameScheduleStart).Take(10);
            }
            GameService gameService = new GameService(db);
            List <ComingSoonViewModel> ComingSoonList = ToCommingSoon(gameService.FindComingSoonGames(MemberId));

            if (ComingSoonList.All(c => c.ComingSoonGameVM.Count() == 0) && MemberId != 0)
            {
                ComingSoonList = ToCommingSoon(gameService.findGlobalGames(MemberId));
            }
            mainModel.ComingSoon = ComingSoonList;
            GameDao        gd          = new GameDao(db);
            List <dynamic> recentSales = gd.findRecentWinners();

            mainModel.recentWinners = recentSales;
            return(View(mainModel));
        }
Example #2
0
        public dynamic RecentWinners()
        {
            GameDao gd = new GameDao(db);

            return(gd.findRecentWinners());
        }