public PopupOferta(string user) { idPhone = user; InitializeComponent(); CloseWhenBackgroundIsClicked = false; promocion promo = new restClient().insertPromo(idPhone); razon.Text = promo.Razon; img.Source = promo.promo; btnAck.Clicked += BtnAck_Clicked; }
private async void BtnConfirmarOrden_Clicked(object sender, EventArgs e) { var activo = true; promocion p = null; await Task.Factory.StartNew(() => { UserDialogs.Instance.ShowLoading("Estamos procesando tu pago"); new restClient().insertOrden(idPhone1, sucursal1, descripcion1, total1); p = new restClient().insertPromo(idPhone1); UserDialogs.Instance.HideLoading(); activo = false; var documents = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); for (int i = 0; i <= 5; i++) { var filename = Path.Combine(documents, i.ToString() + ".txt"); try { File.Delete(filename); } catch (FileNotFoundException) { } } }); if (activo == false) { await Navigation.PopToRootAsync(); await Rg.Plugins.Popup.Services.PopupNavigation.Instance.PushAsync(new PopUpConfirmacion()); if (p.exists) { await Rg.Plugins.Popup.Services.PopupNavigation.Instance.PushAsync(new PopupOferta(idPhone1)); } } }
: base(new DiscordClient(restClient, configuration ??= new DiscordBotConfiguration()), prefixProvider, configuration)
public Ordenes(string id) { identificador_telefono = id; InitializeComponent(); //mis_ordenes.Text += identificador_telefono; BtnBackOrdenes.Clicked += BtnBackOrdenes_Clicked; resp = new restClient().getOrden(identificador_telefono); if (resp != null) { int cont = 0; foreach (orden simple in resp) { if (cont == 0) { ordenes.IsEnabled = true; ordenes.IsVisible = true; crearStack(orden1, sucursal1, total1, fecha1, qrResult, listOrden, simple); } else if (cont == 1) { ordenes2.IsEnabled = true; ordenes2.IsVisible = true; crearStack(orden2, sucursal2, total2, fecha2, qrResult2, listOrden2, simple); } else if (cont == 2) { ordenes3.IsEnabled = true; ordenes3.IsVisible = true; crearStack(orden3, sucursal3, total3, fecha3, qrResult3, listOrden3, simple); } else if (cont == 3) { ordenes4.IsEnabled = true; ordenes4.IsVisible = true; crearStack(orden4, sucursal3, total4, fecha4, qrResult4, listOrden4, simple); } cont += 1; } } else { ordenes.IsVisible = false; } List <CarouselData> promo = new restClient().promo(identificador_telefono); if (promo == null) { MyDataSource = new List <CarouselData>() { new CarouselData() { nombre = "Logo.png", codigo = "Sin Promociones" } }; } else { MyDataSource = promo; } BindingContext = this; }