示例#1
0
        public async void aplicarCommand()
        {
            try
            {
                compraresult.IdDistribuidor = Settings.IdDistribuidor;
                var response = await ApiServices.InsertarAsync <Compra>(compraresult, new Uri(Constants.BaseApiAddress), "/api/Compras/Aplicar");

                //    var compraresult = JsonConvert.DeserializeObject<Compra>(response.Result.ToString());
                if (response.IsSuccess)
                {
                    Settings.VenderGas = false;
                    Settings.IdCompra  = 0;
                    TkCircle.Clear();
                    VerCompra = false;
                    EntregasPendientes();
                }
                else
                {
                    Settings.VenderGas = false;
                    Settings.IdCompra  = 0;
                    TkCircle.Clear();
                    VerCompra = false;
                }

                // App.clienteseleccionado = null;
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }
        }
示例#2
0
 public async void noaplicarCommand()
 {
     try
     {
         Settings.VenderGas = false;
         Settings.IdCompra  = 0;
         TkCircle.Clear();
         VerCompra = false;
         // App.clienteseleccionado = null;
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message);
     }
 }