Esempio n. 1
0
 public Employees()
 {
     try
     {
         InitializeComponent();
         _vacationList = new List<TIS.Model.Internal.Vacation>();
         _vacationSessionList = new List<TIS.Model.Internal.Vacation>();
         _employeeBL = new EmployeeBL(Uow);
         _vacationBL = new VacationBL(Uow);
         FindAll();
         Initialize();
     }
     catch (System.Exception exception1)
     {
         System.Exception innerException = exception1;
         throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Esempio n. 2
0
        private void Initialize()
        {
            _employeeBL = new EmployeeBL(Uow);
            _vacationBL = new VacationBL(Uow);
            _vacationTypeBL = new VacationTypeBL(Uow);

            //VacationType type = new VacationType(Uow);
            //type.Name = "Verlof";
            //Uow.CommitChanges();

            List<TIS.Model.Internal.Employee> employees = _employeeBL.GetAll();
            List<TIS.Model.Internal.VacationType> vacationTypes = _vacationTypeBL.GetAll();
            _vacations = _vacationBL.GetByEmployee(EmployeeModel);
            gdcVacation.DataSource = _vacations;

            glouDispatcher.Properties.DataSource = employees;
            glouDispatcher.Properties.DisplayMember = "DisplayName";
            glouDispatcher.Properties.ValueMember = "empID";

            glouVacationType.Properties.DataSource = vacationTypes;
            glouVacationType.Properties.DisplayMember = "Name";
            glouVacationType.Properties.ValueMember = "Id";
        }