public void LoadEmployee() { try { EmployeeBLL EmployeeBLL = new EmployeeBLL(); DataTable Empleados; Empleados = EmployeeBLL.All("All"); comboBoxEmpleado.DisplayMember = "Text"; comboBoxEmpleado.ValueMember = "Value"; List <Object> items = new List <object>(); items.Add(new { Text = "Todos", Value = "0" }); foreach (DataRow Empleado in Empleados.Rows) { items.Add(new { Text = string.Format("{0} {1}", Empleado[EmployeeML.DataBase.Name].ToString(), Empleado[EmployeeML.DataBase.Lastname].ToString()), Value = Empleado[EmployeeML.DataBase.Id].ToString() }); } comboBoxEmpleado.DataSource = items; } catch (Exception ex) { MessageBox.Show(String.Format("LoadEmployee: {0}", ex.Message), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void LoadDataGridView() { dataGridViewDataEmpleado.DataSource = EmployeeBLL.All("Reporte"); }
public IEnumerable <Employee> Get() { EmployeeBLL bll = new EmployeeBLL(_repository); return(bll.All()); }