private async void GetData(int id)
        {
            IPeopleRepository repository = PeopleRepository.Instance;

            try {
                var interpellation = await repository.GetPoselInterpellation(id);

                string text = interpellation.Teksty.First();
                if (text != null)
                {
                    text = "<p><center><b>Brak tekstu interpelacji</b></center></p>";
                }

                TextContentController textContentController = owner.Storyboard.InstantiateViewController("TextContentController") as TextContentController;
                if (textContentController != null)
                {
                    textContentController.TextToView = text;
                    owner.NavigationController.PushViewController(textContentController, true);
                }
            } catch (ApiRequestException ex) {
                owner.DisplayError(ex.Message);
            } finally {
                owner.loadingOverlay.Hide();
            }
        }
Beispiel #2
0
        private async void GetData(int id)
        {
            IPeopleRepository repository = PeopleRepository.Instance;

            try {
                var speech = await repository.GetPoselSpeech(id);

                string text = speech.Tresc;

                TextContentController textContentController = owner.Storyboard.InstantiateViewController("TextContentController") as TextContentController;
                if (textContentController != null)
                {
                    textContentController.TextToView = text;
                    owner.NavigationController.PushViewController(textContentController, true);
                }
            } catch (ApiRequestException ex) {
                owner.DisplayError(ex.Message);
            } finally {
                owner.loadingOverlay.Hide();
            }
        }