private async void Save() { var answer = await App.Current.MainPage.DisplayAlert("TSHIRT", "Esta seguro que desea Guardar?", "SI", "NO"); if (answer) { var qry = NewDetails.Select(a => new CountPlanDetailItem() { Id = a.Id, CountPlanId = a.CountPlanId, UserCode = a.UserCode, DateCreated = a.DateCreated, Quantity = a.Quantity, ProductCode = a.ProductCode, Count = a.Count }).ToList(); var result = await countServices.SaveDetail(qry); if (result == "OK") { Device.BeginInvokeOnMainThread(async() => { await Xamarin.Forms.Application.Current.MainPage .Navigation.PopAsync(); }); } else { await App.Current.MainPage.DisplayAlert("TSHIRT - Error", result, "OK"); } } }
private async void Save() { var rct = new RctExtendModel(); var answer = await App.Current.MainPage.DisplayAlert("TSHIRT", "Esta seguro que desea Guardar?", "SI", "NO"); if (answer) { var result = await countServices.SaveDetail(NewDetails.ToList()); if (result == "OK") { Xamarin.Forms.Application.Current.MainPage.Navigation.PushAsync(new Plan(PlanId)); } else { App.Current.MainPage.DisplayAlert("TSHIRT - Error", result, "OK"); } } }