public async Task GetAll() { try { var x = await Repository.GetAllAsync(); ListaPaquete.Clear(); foreach (var item in x) { ListaPaquete.Add(item); } } catch (Exception ex) { throw ex; } }
public async Task BusquedaPaquete() { try { var x = await Repository.GetBusqPaqueteAsync(this.BandNombre, this.Nombre, this.BandClave, this.Clave); ListaPaquete.Clear(); foreach (var item in x) { ListaPaquete.Add(item); } } catch (Exception) { throw; } }
public async Task GetBusquedaRapida(int TipoBusqueda, string Busqueda, int Idsucursal) { try { if (TipoBusqueda == 1) { var x = await BusqProductoRepository.GetBusquedaProductoAsync(false, Busqueda, true, Busqueda, Idsucursal); ListaBusquedaProducto.Clear(); foreach (var item in x) { ListaBusquedaProducto.Add(item); } } else if (TipoBusqueda == 2) { var x = await ServicioRepository.GetBusqServicioAsync(false, Busqueda, true, Busqueda); ListaServicio.Clear(); foreach (var item in x) { ListaServicio.Add(item); } } else if (TipoBusqueda == 3) { var x = await PaqueteRepository.GetBusqPaqueteAsync(false, Busqueda, true, Busqueda); ListaPaquete.Clear(); foreach (var item in x) { ListaPaquete.Add(item); } } } catch (Exception ex) { throw ex; } }