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"; }
private void btnReportEmployee_Click(object sender, EventArgs e) { Vacations vacForm = new Vacations(); TIS.Model.Internal.Employee emp = ((TIS.Model.Internal.Employee)glouReportEmployee.GetSelectedDataRow()); vacForm.gdcVacation.DataSource = _vacationBL.GetByEmployee(emp); vacForm.Show(); }