示例#1
0
        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);
            }
        }
示例#2
0
 public void LoadDataGridView()
 {
     dataGridViewDataEmpleado.DataSource = EmployeeBLL.All("Reporte");
 }
示例#3
0
        public IEnumerable <Employee> Get()
        {
            EmployeeBLL bll = new EmployeeBLL(_repository);

            return(bll.All());
        }