private async void botonLupa_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            MessageDialog mensajeError = new MessageDialog("Su búsqueda no retornó ningún resultado.");
            ServicioAEIClient servicioProducto = new ServicioAEIClient();
            if (comboCategoria.SelectedIndex == 0)
                ListaProducto.ListaProductos = await servicioProducto.BusquedaProductoAplicacionAsync(textBoxBusqueda.Text);
            else
                ListaProducto.ListaProductos = await servicioProducto.BusquedaProductoConCategoriaAsync(comboCategoria.SelectedItem.ToString(), textBoxBusqueda.Text);

            if (ListaProducto.ListaProductos.Count() == 0)
            {
                mensajeError.ShowAsync();
            }
            else
                cargarProductos();
        }
Exemple #2
0
        private async void botonLupa_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            MessageDialog     mensajeError     = new MessageDialog("Su búsqueda no retornó ningún resultado.");
            ServicioAEIClient servicioProducto = new ServicioAEIClient();

            if (comboCategoria.SelectedIndex == 0)
            {
                ListaProducto.ListaProductos = await servicioProducto.BusquedaProductoAplicacionAsync(textBoxBusqueda.Text);
            }
            else
            {
                ListaProducto.ListaProductos = await servicioProducto.BusquedaProductoConCategoriaAsync(comboCategoria.SelectedItem.ToString(), textBoxBusqueda.Text);
            }

            if (ListaProducto.ListaProductos.Count() == 0)
            {
                mensajeError.ShowAsync();
            }
            else
            {
                cargarProductos();
            }
        }