private async Task DoViewPollAsync() { this.IsBusy = true; var identity = (IUserIdentity)Csla.ApplicationContext.User.Identity; var command = await this.objectFactory.CreateAsync(); command.PollID = this.Id; command.UserID = identity.UserID.HasValue ? identity.UserID.Value : 0; command = await this.objectFactory.ExecuteAsync(command); this.IsBusy = false; if (command.Submission != null) { var criteria = new ViewPollPageNavigationCriteria { PollId = this.Id }; this.ShowViewModel<ViewPollPageViewModel>(criteria); } else { var navigationCriteria = new PollResultsPageNavigationCriteria { PollId = this.Id }; this.ShowViewModel<PollResultsPageViewModel>(navigationCriteria); } }
private void NavigateToPollResults(int pollId) { var navigationCriteria = new PollResultsPageNavigationCriteria { PollId = pollId }; this.Navigation.NavigateToViewModelAndRemoveCurrent<PollResultsPageViewModel>(navigationCriteria); }