private void FindAll() { try { EmployeeObjectCollection employees = new BL.Internal.Employee().GetAll(); this.gdcEmployee.DataSource = employees; } catch (System.Exception exception1) { System.Exception innerException = exception1; throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
private void FindAll() { try { BL.Internal.Employee blEmp = new BL.Internal.Employee(); gdcEmployee.DataSource = blEmp.GetAll(); } catch (System.Exception exception1) { System.Exception innerException = exception1; throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
private void FillGrids() { gridUnassigned.DataSource = null; gridAssigned.DataSource = null; //TODO: Check for refactoring EmployeeObjectCollection employees = new BL.Internal.Employee().GetAll(); EmployeeObjectCollection employeesTwo = new BL.Internal.Employee().GetAll(); List <AssignedDriver> assignedDrivers = new AssignedDriver(new UnitOfWork()).GetAll(); foreach (EmployeeObject employeeObject in employees) { foreach (AssignedDriver assignedDriver in assignedDrivers) { if (employeeObject.EmpID == assignedDriver.Driver) { employeesTwo.Remove(employeeObject); } } } gridUnassigned.DataSource = employeesTwo; gridAssigned.DataSource = assignedDrivers; }
public void Initialize() { try { this.louCategory.Properties.DataSource = new BL.Internal.MaterialCategory().GetAll(); EmployeeObjectCollection employees = new BL.Internal.Employee().GetAll(); this.louCreator.Properties.DataSource = employees; this.louResponsable.Properties.DataSource = employees; this.louSupplier.Properties.DataSource = new BL.Internal.Supplier().GetAll(); this.louVehicle.Properties.DataSource = new BL.Internal.Vehicle().GetAll(); this.louCategory.Properties.DataSource = new BL.Internal.MaterialCategory().GetAll(); if (Context.User.Employee != null) { this.louCreator.EditValue = Context.User.Employee; this.louResponsable.EditValue = Context.User.Employee; } } catch (System.Exception exception1) { System.Exception innerException = exception1; throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
private void FillGrids() { gridUnassigned.DataSource = null; gridAssigned.DataSource = null; //TODO: Check for refactoring EmployeeObjectCollection employees = new BL.Internal.Employee().GetAll(); EmployeeObjectCollection employeesTwo = new BL.Internal.Employee().GetAll(); List<AssignedDriver> assignedDrivers = new AssignedDriver(new UnitOfWork()).GetAll(); foreach (EmployeeObject employeeObject in employees) { foreach (AssignedDriver assignedDriver in assignedDrivers) { if (employeeObject.EmpID == assignedDriver.Driver) { employeesTwo.Remove(employeeObject); } } } gridUnassigned.DataSource = employeesTwo; gridAssigned.DataSource = assignedDrivers; }