private void ConsultarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Ordenes>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltrarComboBox.SelectedIndex) { case 0: listado = OrdenesBLL.GetList(o => true); break; case 1: int id; id = int.Parse(CriterioTextBox.Text); listado = OrdenesBLL.GetList(o => o.OrdenId == id); break; case 2: int clienteid; clienteid = int.Parse(CriterioTextBox.Text); listado = OrdenesBLL.GetList(o => o.ClienteID == clienteid); break; } } else { listado = OrdenesBLL.GetList(p => true); } ConsultarDataGrid.ItemsSource = null; ConsultarDataGrid.ItemsSource = listado; }
public void GetListTest() { var lista = new List <Ordenes>(); lista = OrdenesBLL.GetList(p => true); Assert.IsNotNull(lista); }
private void ConsultarButton_Click(object sender, RoutedEventArgs e) { List <Ordenes> listado = new List <Ordenes>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 1: listado = OrdenesBLL.GetList(p => p.OrdenId == Utilidades.ToInt(CriterioTextBox.Text)); break; } } else { listado = OrdenesBLL.GetList(c => true); } if (DesdeDatePicker.SelectedDate != null) { listado = (List <Ordenes>)OrdenesBLL.GetList(p => p.Fecha.Date >= DesdeDatePicker.SelectedDate); } if (HastaDatePicker.SelectedDate != null) { listado = (List <Ordenes>)OrdenesBLL.GetList(p => p.Fecha.Date <= HastaDatePicker.SelectedDate); } DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
private void ConsultarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Ordenes>(); if (string.IsNullOrWhiteSpace(CriterioTextBox.Text)) { listado = OrdenesBLL.GetList(e => true); } else { switch (FiltroComboBox.SelectedIndex) { case 0: listado = OrdenesBLL.GetList(e => e.OrdenId == Convert.ToInt32(CriterioTextBox.Text)); break; case 1: listado = OrdenesBLL.GetList(e => e.SuplidorId == Convert.ToInt32(CriterioTextBox.Text)); break; } } listado = OrdenesBLL.GetList(c => c.Fecha.Date >= DesdeDataPicker.SelectedDate && c.Fecha.Date <= HastaDataPicker.SelectedDate); DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
private void ConsultarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Ordenes>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: listado = OrdenesBLL.GetList(p => p.OrdenID == this.ToInt(CriterioTextBox.Text)); break; case 1: listado = OrdenesBLL.GetList(p => p.ProductosID == this.ToInt(CriterioTextBox.Text)); break; } } else { listado = OrdenesBLL.GetList(c => true); } DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
public void GetListTest() { List <Ordenes> lista; lista = OrdenesBLL.GetList(p => true); Assert.IsNotNull(lista); }
private void BuscarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Ordenes>(); listado = OrdenesBLL.GetList(c => true); DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
public void GetListTest() { bool paso; var lista = OrdenesBLL.GetList(x => true); if (lista != null) { paso = true; } else { paso = false; } Assert.AreEqual(paso, true); }