private void ShowOtherStaffSmallHead() { try { System.Collections.Generic.ICollection <TreeViewItem> cooperationStafffListTvi = this.dataService.GetCooperationStafffListTvi(); if (cooperationStafffListTvi != null) { foreach (TreeViewItem item in cooperationStafffListTvi) { if (item != null) { if (item.Header != null) { CollaborationNodeStaff temNodeCooperationStaff = item.Header as CollaborationNodeStaff; if (temNodeCooperationStaff != null) { if (temNodeCooperationStaff != this && temNodeCooperationStaff.isBigHead) { temNodeCooperationStaff.ShowSmallHead(); } } } } } } } catch (System.Exception ex) { this.logger.Error(ex.ToString()); } }
public void Add(CooperationDockingResponse resp) { TreeViewItem parentCooperationProjectNode = null; CooperationProjectWrapper cooperationProjectWrapper = null; foreach (CooperationDocking item in resp.cooperationDocking) { if (parentCooperationProjectNode == null) { parentCooperationProjectNode = this.dataService.GetCooperationProjectTvi(item.projectId); if (parentCooperationProjectNode == null) { continue; } } if (cooperationProjectWrapper == null) { cooperationProjectWrapper = this.dataService.GetCooperationProjectWrapper(item.projectId); if (cooperationProjectWrapper == null) { continue; } } CooperationStaff cooperationStaff = new CooperationStaff(item); if (!this.dataService.ContainsCooperationStaff(cooperationStaff.Uid, cooperationStaff.UnitedProjectid)) { this.dataService.AddCooperationStaff(cooperationStaff); CollaborationNodeStaff uscCollaborationNodeStaff = new CollaborationNodeStaff(cooperationStaff, cooperationProjectWrapper); TreeViewItem subCooperationStaffNode = new TreeViewItem(); subCooperationStaffNode.Tag = cooperationStaff; subCooperationStaffNode.Style = (base.TryFindResource("TreeViewItemStyle") as Style); subCooperationStaffNode.Header = uscCollaborationNodeStaff; parentCooperationProjectNode.Items.Add(subCooperationStaffNode); this.dataService.AddCooperationStaffTvi(cooperationStaff.Uid, cooperationStaff.UnitedProjectid, subCooperationStaffNode); } } }