private void SelectAllDepartments() { AuthorizationDepartments.ForEach(t => { if (SelectedSyncDepartmentDtos.All(sy => sy.ID != t.DepartmentID)) { SelectedSyncDepartmentDtos.Add(new ComboBoxItem() { ID = t.DepartmentID, DisplayName = t.Name }); } }); }
private void SelectDepartments() { if (SelectedNode == null) { return; } if (SelectedSyncDepartmentDtos.All(sy => sy.ID != SelectedNode.ID)) { SelectedSyncDepartmentDtos.Add(new ComboBoxItem() { ID = SelectedNode.ID, DisplayName = SelectedNode.Name }); } }