async void send_Clicked(object sender, System.EventArgs e) { string st = ""; string folio = ""; string note; if (this.ST.SelectedIndex >= 0) { st = viewModel.StItems[this.ST.SelectedIndex].st; } else { return; } if (this.Folio.SelectedIndex >= 0) { folio = viewModel.StItems[this.ST.SelectedIndex].folios[this.Folio.SelectedIndex].number; } else { return; } note = notes.Text; //System.Diagnostics.Debugger.Break(); var result = await viewModel.SaveItems(st, folio, note); if (result) { await viewModel.DataStore.UpdateStateAsync(true, "#E0F8E0", viewModel.Item); Toast.MakeText(Forms.Context, "Foto enviada correctamente", ToastLength.Long).Show(); } else { await viewModel.DataStore.UpdateStateAsync(false, "#FFFFFF", viewModel.Item); Toast.MakeText(Forms.Context, "Foto NO fue enviada", ToastLength.Long).Show(); } var x = 0; App.GoToMainPage(); //await Navigation.PushAsync(new ItemsPage(App.picService)); }
async Task SignIn() { try { IsBusy = true; Message = "Signing In..."; // Log the user in await TryLoginAsync(); } finally { Message = string.Empty; IsBusy = false; if (Settings.IsLoggedIn) { App.GoToMainPage(); } } }