public EmployeesTabViewModel(IList <EmployeeViewModel> dataModel) : base(dataModel) { Employees = new ListCollectionView((IList)dataModel); Employees.CurrentChanged += (s, e) => SubOrdinates.Refresh(); SubOrdinates = new ListCollectionView((IList)dataModel); SubOrdinates.Filter = FilterSubOrdinate; }
void IDropTarget.Drop(IDropInfo dropInfo) { EmployeeViewModel targetEmployee = (EmployeeViewModel)dropInfo.TargetItem; IEnumerable <EmployeeViewModel> employees = GetEmployees(dropInfo.Data); foreach (EmployeeViewModel employee in employees) { employee.DataModel.ReportsTo = targetEmployee.DataModel.EmployeeID; } SubOrdinates.Refresh(); }