public IActionResult Teams(Attendee model)
        {
            var attendee = _attendeeProvider.GetAttendee(model.code, null);

            if (attendee == null || (attendee.isTemp ?? false) == true)
            {
                return(Redirect("/vote?e=o"));
            }
            else if (attendee.voteTeamId != null)
            {
                return(Redirect("/vote?e=d"));
            }
            else
            {
                var teams = _teamProvider.GetTeams();
                ViewData["attendeeCode"] = attendee.code;
                return(View("Teams", teams));
            }

            // var teams = _teamProvider.GetTeams();
            // if (attendee != null) {
            //     ViewData["attendeeCode"] = attendee.code;
            //     return View("Teams", teams);
            // } else {
            //     isSuccess = false;
            //     return Redirect("/vote");
            // }
        }
        public Boolean Vote(string attendeeCode, int teamId)
        {
            var attendee = _attendeeProvider.GetAttendee(attendeeCode, null);

            if (attendee == null)
            {
                return(false);
            }
            attendee.voteTeamId = teamId;
            _context.SaveChanges();

            return(true);
        }
        public IActionResult Completion(Attendee model)
        {
            var attendee = _attendeeProvider.GetAttendee(model.code, null);

            if (attendee == null)
            {
                return(Redirect("/registration?e=o"));
            }
            else if (attendee.isChecked ?? false)
            {
                return(Redirect("/registration?e=d"));
            }
            else
            {
                _attendeeProvider.Checkin(model.code);
                return(View("Completion", attendee));
            }
        }