Пример #1
0
 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);
     }
 }
Пример #2
0
 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);
     }
 }
Пример #3
0
        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;
        }
Пример #4
0
        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);
            }
        }
Пример #5
0
        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;
        }
Пример #6
0
        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);
            }
        }
Пример #7
0
 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);
     }
 }