コード例 #1
0
        public IActionResult Onsite()
        {
            var players = _api.OnsitePlayers(CasinoID).Result;
            var data    = new OnsitePlayerModel
            {
                Players = players,
            };

            return(View(data));
        }
コード例 #2
0
        public IActionResult Index()
        {
            var casino      = _data.CasinoSettings(_casino).Result;
            var staffperson = _data.StaffPerson(_casino, _staff).Result;
            var players     = _data.OnsitePlayers(_casino).Result;
            var data        = new HomePageModel
            {
                CasinoID    = _casino,
                CasinoName  = casino.Name,
                CasinoLogo  = string.IsNullOrWhiteSpace(casino.Logo) ? string.Format("casino-{0}-logo.png", _casino) : casino.Logo,
                CasinoTheme = string.IsNullOrWhiteSpace(casino.Theme) ? "default" : casino.Theme,
                StaffID     = _staff,
                StaffName   = staffperson.FirstName + " " + staffperson.LastName,
                StaffStatus = staffperson.Status,
                Players     = players,
            };

            return(View(data));
        }