Ejemplo n.º 1
0
        private void Click_CrearEvento(object sender, RoutedEventArgs e)
        {
            RegistrarEvento evento = new RegistrarEvento();

            evento.Show();
            this.Close();
        }
Ejemplo n.º 2
0
        public async Task <bool> RegistrarEventoAsync(RegistrarEvento peticion)
        {
            try
            {
                StringContent request   = new StringContent(JObject.FromObject(peticion).ToString(), Encoding.UTF8, "application/json");
                var           solicitud = await EGuardianAPI.PostAsync(Constants.Endpoint_Evento_Registro, request);

                solicitud.EnsureSuccessStatusCode();
                string respuesta = await solicitud.Content.ReadAsStringAsync();

                if (respuesta.Contains("SUCCESS"))
                {
                    return(true);
                }
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("ERROR: " + e.Message);
            }
            return(false);
        }
Ejemplo n.º 3
0
 public Task <bool> RegistrarEventoAsync(RegistrarEvento peticion)
 {
     return(ServicioWeb.RegistrarEventoAsync(peticion));
 }