Example #1
0
        private void btnlistarem_Click(object sender, RoutedEventArgs e)
        {
            dtgempleado.ItemsSource = null;
            EmpleadoBLL emp = new EmpleadoBLL();

            dtgempleado.ItemsSource = emp.listarTodos();
        }
Example #2
0
        private void btnbuscarcargem_Click(object sender, RoutedEventArgs e)
        {
            EmpleadoBLL        emp   = new EmpleadoBLL();
            List <EmpleadoBLL> lista = emp.listarTodos();

            lista = (from empleado in lista
                     where empleado.CARGO_EMPL == (Cargos)cmbcargoem.SelectedItem
                     select empleado).ToList();
            dtgempleado.ItemsSource = null;
            dtgempleado.ItemsSource = lista;
            dtgempleado.IsReadOnly  = true;
        }
Example #3
0
        private void MetroWindow_Loaded(object sender, RoutedEventArgs e)
        {//carga grilla
            EmpleadoBLL emp = new EmpleadoBLL();

            dtgempleado.ItemsSource = emp.listarTodos();

            // carga el comboBox
            var cargos = (Cargos[])Enum.GetValues(typeof(Cargos));

            cmbcargoem.ItemsSource   = cargos;
            cmbcargoem.SelectedIndex = 1;
        }