Beispiel #1
0
        public IActionResult Matchup()
        {
            List <Matchup> matchups = HttpDataHelper.Load_Matchups(week);

            ViewBag.week = week;
            return(View(matchups));
        }
Beispiel #2
0
        public IActionResult Matchup(string search)
        {
            //List<Matchup> scores = HttpDataHelper.Get_Week_Scores(week);
            List <Matchup> matchups = HttpDataHelper.Load_Matchups(search);

            ViewBag.week = search;
            return(View(matchups));
        }
Beispiel #3
0
        public IActionResult EditPicks(int id)
        {
            List <Matchup> matchups = null;
            var            player   = _context.Players.Where(p => p.Id == id).FirstOrDefault();
            var            week     = HttpDataHelper.Get_Current_Week();
            var            picks    = _context.PlayerPicks.Where(p => p.PlayerId == id && p.Week == week).FirstOrDefault();

            if (picks != null)
            {
                ViewBag.player = player;
                matchups       = HttpDataHelper.Load_Matchups(HttpDataHelper.Get_Current_Week());
                ViewBag.week   = week;
                return(View(matchups));
            }
            else
            {
                ViewBag.player = player;
                ViewBag.week   = week;
                return(View(matchups));
            }
        }