private void ConsultarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Persona>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: //PersonaId listado = PersonaBLL.GetList(e => e.PersonaId == Convert.ToInt32(CriterioTextBox.Text)); break; case 1: //Nombres //listado = PersonaBLL.GetList(e => e.Nombres.Contains(CriterioTextBox.Text, StringComparison.OrdinalIgnoreCase)); break; } } else { listado = PersonaBLL.GetList(c => true); } DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
private void ConsultarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Persona>(); if (string.IsNullOrWhiteSpace(CriterioTextBox.Text)) { listado = PersonaBLL.GetList(); } else { switch (FiltroComboBox.SelectedIndex) { case 1: listado = PersonaBLL.GetList(e => e.PersonaId == Convert.ToInt32(CriterioTextBox.Text)); break; case 2: listado = PersonaBLL.GetList(e => e.Nombres.Contains(CriterioTextBox.Text)); break; } } DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
private void ConsultarBoton_Click(object sender, RoutedEventArgs e) { var listado = new List <Personas>(); string criterio = CriterioTextBox.Text.Trim(); if (criterio.Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: listado = PersonaBLL.GetList(p => p.PersonaId == Utilities.ToInt(CriterioTextBox.Text)); break; case 1: listado = PersonaBLL.GetList(p => p.Nombres.ToLower().Contains(criterio.ToLower())); break; } } else { listado = PersonaBLL.GetList(c => true); } DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
private void BuscarButton_Click(object sender, RoutedEventArgs e) { var listado = new List <Personas>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: listado = PersonaBLL.GetList(e => e.PersonaId == this.ToInt(CriterioTextBox.Text)); break; case 1: listado = PersonaBLL.GetList(e => e.Nombres == this.CriterioTextBox.Text); break; } } else { listado = PersonaBLL.GetList(c => true); } DatosDataGrid.ItemsSource = null; DatosDataGrid.ItemsSource = listado; }
public void GetListTest() { var lista = new List <Persona>(); lista = PersonaBLL.GetList(p => true); Assert.AreEqual(lista, lista); }
public void GetListTest() { var Lista = new List <Personas>(); Lista = PersonaBLL.GetList(p => true); Assert.AreEqual(Lista, Lista); }
//private Persona persona; public rPrestamo() { InitializeComponent(); PersonaComboBox.ItemsSource = PersonaBLL.GetList(); PersonaComboBox.SelectedValuePath = "PersonaId"; PersonaComboBox.DisplayMemberPath = "PersonaId"; Limpiar(); }
public rPrestamos() { InitializeComponent(); PersonaIdComboBox.ItemsSource = PersonaBLL.GetList(p => true); PersonaIdComboBox.SelectedValuePath = "PersonaId"; PersonaIdComboBox.DisplayMemberPath = "Nombres"; prestamo.Monto += prestamo.Balance; this.DataContext = prestamo; }
public rPrestamos() { InitializeComponent(); prestamo = new Prestamos(); prestamo.Fecha = DateTime.Now; this.DataContext = prestamo; PersonaComboBox.ItemsSource = PersonaBLL.GetList(p => true); PersonaComboBox.SelectedValuePath = "PersonaId"; PersonaComboBox.DisplayMemberPath = "Nombres"; }
private void BuscarCButton_Click(object sender, EventArgs e) { dataGridView1.DataSource = PersonaBLL.GetList(filter); dataGridView1.DataSource = TicketBLL.GetList(filterT); if (PersonaBLL.GetList(filter) != null) { dataGridView1.Columns["Edad"].Visible = false; dataGridView1.Columns["Fecha"].Visible = false; dataGridView1.Columns["Direccion"].Visible = false; } if (TicketBLL.GetList(filterT) != null) { dataGridView1.Columns["Id"].Visible = false; dataGridView1.Columns["PersId"].Visible = false; } }
private void ConsultaButton_Click(object sender, EventArgs e) { var listado = new List <Persona>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: //Todo listado = PersonaBLL.GetList(p => true); break; case 1: //ID int id = Convert.ToInt32(CriterioTextBox.Text); listado = PersonaBLL.GetList(p => p.PersonaId == id); break; case 2: //Nombre listado = PersonaBLL.GetList(p => p.Nombre.Contains(CriterioTextBox.Text)); break; case 3: //Cedula listado = PersonaBLL.GetList(p => p.Cedula.Contains(CriterioTextBox.Text)); break; case 4: //Direccion listado = PersonaBLL.GetList(p => p.Direccion.Contains(CriterioTextBox.Text)); break; } listado = listado.Where(c => c.fechaNacimiento.Date >= DesdedateTimePicker.Value.Date && c.fechaNacimiento.Date <= HastadateTimePicker.Value.Date).ToList(); } else { listado = PersonaBLL.GetList(p => true); } ConsultaPersonasDataGridView.DataSource = null; ConsultaPersonasDataGridView.DataSource = listado; }
private void BuscarButton_Click(object sender, RoutedEventArgs e) { Consulta.ItemsSource = null; var listado = new List <Persona>(); if (DesdeDatePicker.SelectedDate != null) { listado = PersonaBLL.GetList(c => c.Fecha.Date >= DesdeDatePicker.SelectedDate); } else { listado = PersonaBLL.GetList(c => true); } if (HastaDatePicker.SelectedDate != null) { listado = PersonaBLL.GetList(c => c.Fecha.Date <= HastaDatePicker.SelectedDate); } else { listado = PersonaBLL.GetList(c => true); } Consulta.ItemsSource = listado; }
private void btnConsultarr_Click(object sender, RoutedEventArgs e) { var listado = new List <Persona>(); if (CriterioTextBox.Text.Trim().Length > 0) { switch (FiltroComboBox.SelectedIndex) { case 0: listado = PersonaBLL.GetList(c => true); break; case 1: int id = Convert.ToInt32(CriterioTextBox.Text); listado = PersonaBLL.GetList(p => p.PersonaId == id); break; case 2: listado = PersonaBLL.GetList(p => p.Nombre.Contains(CriterioTextBox.Text)); break; } } else { listado = PersonaBLL.GetList(c => true); } ConsultaDataGrid.ItemsSource = null; ConsultaDataGrid.ItemsSource = listado; }
public void GetListTest() { PersonaBLL bll = new PersonaBLL(); Assert.IsNotNull(bll.GetList(t => true)); }
public void GetListTest() { var list = PersonaBLL.GetList(m => true); Assert.IsNotNull(list); }