private void ConsultarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Prestamos>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: listado = PrestamosBLL.GetList(p => p.PrestamosId == Utilities.ToInt(CriterioTextBox.Text)); break; case 1: listado = PrestamosBLL.GetList(p => p.PersonaId == Utilities.ToInt(CriterioTextBox.Text)); break; case 2: bool fechaValidada = ValidarFecha(CriterioTextBox.Text); if (!fechaValidada) { MessageBox.Show("Introduzca un fecha válida", "Datos incorrectos", MessageBoxButton.OK, MessageBoxImage.Warning); return; } listado = PrestamosBLL.GetList(p => p.Fecha.Equals(DateTime.Parse(CriterioTextBox.Text))); break; } } else { listado = PrestamosBLL.GetList(c => true); } }
public void GetListTest() { List <Prestamos> persona = new List <Prestamos>(); persona = PrestamosBLL.GetList(p => true); Assert.IsNotNull(persona); }
public void GetListTest() { var lista = new List <Prestamo>(); lista = PrestamosBLL.GetList(p => true); Assert.AreEqual(lista, lista); }
public void GetListTest() { List <Prestamos> lista = new List <Prestamos>(); lista = PrestamosBLL.GetList(l => true); Assert.IsNotNull(lista); }
public rMoras() { InitializeComponent(); PrestamoIdDetalleComboBox.ItemsSource = PrestamosBLL.GetList(p => true); PrestamoIdDetalleComboBox.SelectedValuePath = "PrestamosId"; PrestamoIdDetalleComboBox.DisplayMemberPath = "PrestamoId"; this.DataContext = moras; }
public void GetListTest() { GenericaBLL <Prestamos> genericaBLL = new GenericaBLL <Prestamos>(); List <Prestamos> lista = new List <Prestamos>(); lista = PrestamosBLL.GetList(l => true); Assert.IsNotNull(lista); }
// private MorasDetalle morasDetalle = new MorasDetalle(); public rMoras() { InitializeComponent(); PrestamoComboBox.ItemsSource = PrestamosBLL.GetList(p => true); PrestamoComboBox.SelectedValuePath = "PrestamosId"; PrestamoComboBox.DisplayMemberPath = "PrestmosId"; //moraId.Total += morasDetalle.Valor; this.DataContext = moras; TotalTextBox.Text = "0"; }
private void ConsultarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Prestamos>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: try { listado = PrestamosBLL.GetList(p => p.PrestamoId == Utilidades.ToInt(CriterioTextBox.Text)); } catch (FormatException) { MessageBox.Show("Debes ingresar un Critero valido para aplicar este filtro.", "Advertencia", MessageBoxButton.OK, MessageBoxImage.Warning); } break; case 1: try { listado = PrestamosBLL.GetList(p => p.AmigoId == Utilidades.ToInt(CriterioTextBox.Text)); } catch (FormatException) { MessageBox.Show("Debes ingresar un Critero valido para aplicar este filtro.", "Advertencia", MessageBoxButton.OK, MessageBoxImage.Warning); } break; } } else { listado = PrestamosBLL.GetList(c => true); } if (DesdeDatePicker.SelectedDate != null) { listado = PrestamosBLL.GetList(c => c.Fecha.Date >= DesdeDatePicker.SelectedDate); } if (HastaDatePicker.SelectedDate != null) { listado = PrestamosBLL.GetList(c => c.Fecha.Date <= HastaDatePicker.SelectedDate); } DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
public void GetListTest() { bool paso; var lista = PrestamosBLL.GetList(x => true); if (lista != null) { paso = true; } else { paso = false; } Assert.AreEqual(paso, true); }
private void ConsultarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Prestamos>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: listado = PrestamosBLL.GetList(e => true); break; case 1: listado = PrestamosBLL.GetList(e => e.PrestamoId == Convert.ToInt32(CriterioTextBox.Text)); break; case 2: listado = PrestamosBLL.GetList(e => e.AmigoId == Convert.ToInt32(CriterioTextBox.Text)); break; case 3: listado = PrestamosBLL.GetList(e => e.Observacion.Contains(CriterioTextBox.Text)); break; case 4: listado = PrestamosBLL.GetList(e => e.CantidadJuegos == Convert.ToInt32(CriterioTextBox.Text)); break; } } else { listado = PrestamosBLL.GetList(c => true); } if (DesdeDataPicker.SelectedDate != null) { listado = PrestamosBLL.GetList(c => c.Fecha.Date >= DesdeDataPicker.SelectedDate); } if (HastaDatePicker.SelectedDate != null) { listado = PrestamosBLL.GetList(c => c.Fecha.Date <= HastaDatePicker.SelectedDate); } DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
private void ConsultarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Prestamos>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: listado = PrestamosBLL.GetList(e => e.PrestamoId == int.Parse(CriterioTextBox.Text)); break; case 1: listado = PrestamosBLL.GetList(e => e.PersonaId == int.Parse(CriterioTextBox.Text)); break; case 2: listado = PrestamosBLL.GetList(e => e.Cliente.Contains(CriterioTextBox.Text, StringComparison.OrdinalIgnoreCase)); break; case 3: listado = PrestamosBLL.GetList(e => e.Fecha.Contains(CriterioTextBox.Text, StringComparison.OrdinalIgnoreCase)); break; case 4: listado = PrestamosBLL.GetList(e => e.Monto == float.Parse(CriterioTextBox.Text)); break; case 5: listado = PrestamosBLL.GetList(e => e.Balance == float.Parse(CriterioTextBox.Text)); break; case 6: listado = PrestamosBLL.GetList(e => e.Concepto.Contains(CriterioTextBox.Text, StringComparison.OrdinalIgnoreCase)); break; } } else { listado = PrestamosBLL.GetList(c => true); } DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
private void ConsultarButton_Click(object sender, RoutedEventArgs e) { Datos.ItemsSource = null; var listado = new List <Prestamos>(); if (DesdeDate.SelectedDate != null) { listado = PrestamosBLL.GetList(c => c.Fecha.Date >= HastaDate.SelectedDate); } else { listado = PrestamosBLL.GetList(c => true); } if (HastaDate.SelectedDate != null) { listado = PrestamosBLL.GetList(c => c.Fecha.Date <= HastaDate.SelectedDate); } else { listado = PrestamosBLL.GetList(c => true); } Datos.ItemsSource = listado; }
public ActionResult <List <Prestamos> > Get() { return(PrestamosBLL.GetList(x => true)); }
public void GetListTest() { List <Prestamos> lista = PrestamosBLL.GetList(); Assert.IsNotNull(lista); }
public void GetListTest() { List <Prestamos> listadoPrestamos = PrestamosBLL.GetList(p => true); Assert.IsTrue(listadoPrestamos != null); }
public ActionResult <IEnumerable <Prestamos> > Get() { return(PrestamosBLL.GetList()); }