public void fillCBCompanyDepartment(int idDepartment, int idOffice)
 {
     EmployeeList        = CollectionViewSource.GetDefaultView(employeeControl.getAllEmployeesFromDepartment(idDepartment, idOffice));
     EmployeeList.Filter = new Predicate <object>(FilterEmployee);
 }
Ejemplo n.º 2
0
        private void fillGriddEmployee()
        {
            int idDepartment = 0;

            if (CBDepartment.SelectedIndex != -1)
            {
                Department dp = (Department)CBDepartment.SelectedItem;
                idDepartment = dp.idDepartment;
            }

            int idOffice = 0;

            if (CBOffice.SelectedIndex != -1)
            {
                Office of = (Office)CBOffice.SelectedItem;
                idOffice = of.idOffice;
            }


            ObservableCollection <Employee> employeeList = new ObservableCollection <Employee>(employeeControl.getAllEmployeesFromDepartment(idDepartment, idOffice));

            GDEmployee.ItemsSource = employeeList;
        }