public void GetPrestamosTest() { List <Prestamos> lista = new List <Prestamos>(); lista = PrestamosBLL.GetPrestamos(); Assert.IsNotNull(lista); }
private void BuscarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Prestamos>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: //PrestamoId listado = PrestamosBLL.GetPrestamos(p => p.PrestamoId == Utilidades.ToInt(CriterioTextBox.Text)); break; case 1: //AmigoId listado = PrestamosBLL.GetPrestamos(p => p.AmigoId == Utilidades.ToInt(CriterioTextBox.Text)); break; case 2: //Observacion listado = PrestamosBLL.GetPrestamos(p => p.Observacion.Contains(CriterioTextBox.Text, StringComparison.OrdinalIgnoreCase)); break; case 3: //CantidadJuegos listado = PrestamosBLL.GetPrestamos(p => p.CantidadJuegos == Utilidades.ToInt(CriterioTextBox.Text)); break; } } else { listado = PrestamosBLL.GetPrestamos(c => true); } if (DesdeDataPicker.SelectedDate != null) { listado = PrestamosBLL.GetPrestamos(c => c.Fecha.Date >= DesdeDataPicker.SelectedDate); } if (HastaDatePicker.SelectedDate != null) { listado = PrestamosBLL.GetPrestamos(c => c.Fecha.Date <= HastaDatePicker.SelectedDate); } DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
public ActionResult <List <Prestamo> > Get() { return(PrestamosBLL.GetPrestamos()); }