private void ConsultarButton_Click(object sender, RoutedEventArgs e)
        {
            var listado = new List <Prestamo>();

            if (CriterioTextBox.Text.Trim().Length > 0)
            {
                switch (FiltroComboBox.SelectedIndex)
                {
                case 0:
                    listado = PrestamoBLL.GetList(p => p.PrestamoID == this.ToInt(CriterioTextBox.Text));
                    break;

                case 1:
                    listado = PrestamoBLL.GetList(p => p.PersonaID == this.ToInt(CriterioTextBox.Text));
                    break;
                }
            }
            else
            {
                listado = PrestamoBLL.GetList(c => true);
            }

            DatosDataGrid.ItemsSource = null;
            DatosDataGrid.ItemsSource = listado;
        }
예제 #2
0
        public void GetListTest()
        {
            List <Prestamo> lista = new List <Prestamo>();

            lista = PrestamoBLL.GetList(l => true);
            Assert.IsNotNull(lista);
        }
예제 #3
0
        public void GetListTest()
        {
            List <Prestamo> persona = new List <Prestamo>();

            persona = PrestamoBLL.GetList(p => true);
            Assert.IsNotNull(persona);
        }
예제 #4
0
        private void ConsultarButton_Click(object sender, RoutedEventArgs e)
        {
            var listado = new List <Prestamo>();

            if (string.IsNullOrWhiteSpace(CriterioTextBox.Text))
            {
                listado = PrestamoBLL.GetList();
            }
            else
            {
                switch (FiltroComboBox.SelectedIndex)
                {
                case 0:
                    listado = PrestamoBLL.GetList(e => e.PrestamoId == Convert.ToInt32(CriterioTextBox.Text));
                    break;

                case 1:
                    listado = PrestamoBLL.GetList(e => e.PersonaId == Convert.ToInt32(CriterioTextBox.Text));
                    break;
                }
            }

            listado = PrestamoBLL.GetList(c => c.FechaPrestamo.Date >= DesdeDataPicker.SelectedDate && c.FechaPrestamo <= HastaDataPicker.SelectedDate);

            DatosDataGrid.ItemsSource = null;
            DatosDataGrid.ItemsSource = listado;
        }
        public void GetListTest()
        {
            var lista = new List <Prestamos>();

            lista = PrestamoBLL.GetList(p => true);
            Assert.IsNotNull(lista);
        }
예제 #6
0
 public rMoras()
 {
     InitializeComponent();
     PrestamoIdComboBox.ItemsSource       = PrestamoBLL.GetList(p => true);
     PrestamoIdComboBox.SelectedValuePath = "PrestamosId";
     PrestamoIdComboBox.DisplayMemberPath = "PrestamoId";
     this.DataContext = moras;
 }
예제 #7
0
        public void GetListTest()
        {
            var Lista = new List <Prestamos>();

            Lista = PrestamoBLL.GetList(p => true);

            Assert.AreEqual(Lista, Lista);
        }
예제 #8
0
 public rMora()
 {
     InitializeComponent();
     PrestamosComboBox.ItemsSource       = PrestamoBLL.GetList();
     PrestamosComboBox.SelectedValuePath = "PrestamoId";
     PrestamosComboBox.DisplayMemberPath = "PrestamoId";
     Limpiar();
 }
예제 #9
0
        public void GetPrestamosTest()
        {
            var lista = new List <Prestamo>();

            lista = PrestamoBLL.GetList(p => true);

            Assert.AreEqual(lista, lista);
        }
 public rMoras()
 {
     InitializeComponent();
     PrestamoIDComboBox.ItemsSource       = PrestamoBLL.GetList();
     PrestamoIDComboBox.SelectedValuePath = "PrestamoID";
     PrestamoIDComboBox.DisplayMemberPath = "PrestamoID";
     this.DataContext    = moras;
     MorasIDTextBox.Text = "0";
 }
예제 #11
0
        public rMoras()
        {
            InitializeComponent();
            mora             = new Moras();
            this.DataContext = mora;

            DetallesDataGrid.ItemsSource = new List <MorasDetalle>();

            PrestamoComboBox.ItemsSource       = PrestamoBLL.GetList();
            PrestamoComboBox.SelectedValuePath = "PrestamoId";
            PrestamoComboBox.DisplayMemberPath = "Concepto";
        }
예제 #12
0
        private void ConsultarBoton_Click(object sender, RoutedEventArgs e)
        {
            var listado = new List <Prestamos>();

            if (CriterioTextBox.Text.Trim().Length > 0)
            {
                switch (FiltroComboBox.SelectedIndex)
                {
                case 0:
                    listado = PrestamoBLL.GetList(p => p.PrestamoId == Utilities.ToInt(CriterioTextBox.Text));
                    break;

                case 1:
                    listado = PrestamoBLL.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 = PrestamoBLL.GetList(p => p.Fecha.Equals(DateTime.Parse(CriterioTextBox.Text)));
                    break;

                case 3:
                    listado = PrestamoBLL.GetList(p => p.Concepto.ToLower().Contains(CriterioTextBox.Text.ToLower()));
                    break;
                }
            }
            else
            {
                listado = PrestamoBLL.GetList(c => true);
            }

            DatosDataGrid.ItemsSource = null;
            DatosDataGrid.ItemsSource = listado;
        }
예제 #13
0
        private void BuscarButton_Click(object sender, RoutedEventArgs e)
        {
            Consulta.ItemsSource = null;
            var listado = new List <Prestamo>();

            if (DesdeDatePicker.SelectedDate != null)
            {
                listado = PrestamoBLL.GetList(c => c.Fecha.Date >= DesdeDatePicker.SelectedDate);
            }
            else
            {
                listado = PrestamoBLL.GetList(c => true);
            }

            if (HastaDatePicker.SelectedDate != null)
            {
                listado = PrestamoBLL.GetList(c => c.Fecha.Date <= HastaDatePicker.SelectedDate);
            }
            else
            {
                listado = PrestamoBLL.GetList(c => true);
            }
            Consulta.ItemsSource = listado;
        }
예제 #14
0
        public void GetListTest()
        {
            var listaPrestamos = PrestamoBLL.GetList();

            Assert.IsNotNull(listaPrestamos, "Error al obtener lista");
        }
        public void GetListTest()
        {
            PrestamoBLL bll = new PrestamoBLL();

            Assert.IsNotNull(bll.GetList(t => true));
        }