Esempio n. 1
0
        public async Task <IActionResult> InitializeMyGameSets(string filter = "", FilterType type = FilterType.None)
        {
            MySetsViewModel viewModel = new MySetsViewModel();

            if (User != null)
            {
                ResultData <Set> setResults = null;
                switch (type)
                {
                case FilterType.None:
                    break;

                case FilterType.TokType:
                    break;

                case FilterType.Text:
                    break;

                case FilterType.Category:
                    break;

                case FilterType.Country:
                    break;

                case FilterType.User:
                    setResults = await _setService.GetGameSetsAsync(new SetQueryValues()
                    {
                        userid = User.GetUserId()
                    });

                    break;
                }
                if (setResults.Results != null)
                {
                    viewModel.GameSets = setResults.Results;
                }
                viewModel.Token = setResults.Token;
            }
            else
            {
                return(RedirectToAction("Index"));
            }

            return(PartialView("Set/_GameSetsListing", viewModel));
        }