Beispiel #1
0
        async void salvarClick(object sender, EventArgs e)
        {
            var bc = BindingContext as FeedbackViewModel;

            var tcAv = new TrackFeedback();

            tcAv.Gostou         = bc.Gostou;
            tcAv.Observacao     = bc.Observacao;
            tcAv.IDCracha       = App.Cracha;
            tcAv.avConteudo     = pkConteudo.SelectedIndex.ToString();
            tcAv.avApresentacao = pkApresentacao.SelectedIndex.ToString();
            tcAv.avPalestrante  = pkPalestrante.SelectedIndex.ToString();
            tcAv.avCoordenador  = pkCoordenador.SelectedIndex.ToString();

            try {
                await azureService.Initialize();

                azureService.AddAv(tcAv);

                await DisplayAlert("Obrigado", "Sua avaliação foi salva", "OK");

                Navigation.PopAsync();
            } catch (Exception ex) {
                Debug.WriteLine(ex);
            }
        }
Beispiel #2
0
        public async Task AddAv(TrackFeedback tc)
        {
            try
            {
                await avTrackTable.InsertAsync(tc);

                await avTrackTable.PullAsync("allTrackFeedback", avTrackTable.CreateQuery());

                await MobileService.SyncContext.PushAsync();
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
            }
        }