public virtual ActionResult Details(int id, ApplicationUser currentUser, [System.Web.Http.FromUri] BasicDateRangeFilter dateRangeFilter = null) { if (dateRangeFilter == null) { dateRangeFilter = new BasicDateRangeFilter(); } string errorMessage; if (!dateRangeFilter.IsValid(out errorMessage)) { ModelState.AddModelError("dateRangeFilter", errorMessage); } var gamingGroupSummary = GetGamingGroupSummary(id, dateRangeFilter); var viewModel = gamingGroupViewModelBuilder.Build(gamingGroupSummary, currentUser); viewModel.PlayedGames.ShowSearchLinkInResultsHeader = true; viewModel.DateRangeFilter = dateRangeFilter; viewModel.UserCanEdit = currentUser.CurrentGamingGroupId == id; ViewBag.RecentGamesSectionAnchorText = SECTION_ANCHOR_RECENT_GAMES; ViewBag.PlayerSectionAnchorText = SECTION_ANCHOR_PLAYERS; ViewBag.GameDefinitionSectionAnchorText = SECTION_ANCHOR_GAMEDEFINITIONS; return(View(MVC.GamingGroup.Views.Details, viewModel)); }
public virtual ActionResult Index(ApplicationUser currentUser) { var gamingGroupSummary = this.GetGamingGroupSummary(currentUser.CurrentGamingGroupId); GamingGroupViewModel viewModel = gamingGroupViewModelBuilder.Build(gamingGroupSummary, currentUser); viewModel.PlayedGames.ShowSearchLinkInResultsHeader = true; ViewBag.RecentGamesSectionAnchorText = SECTION_ANCHOR_RECENT_GAMES; ViewBag.PlayerSectionAnchorText = SECTION_ANCHOR_PLAYERS; ViewBag.GameDefinitionSectionAnchorText = SECTION_ANCHOR_GAMEDEFINITIONS; return(View(MVC.GamingGroup.Views.Index, viewModel)); }