Ejemplo n.º 1
0
 public void OnCooperationDockingDataGetted(CooperationDockingResponse res)
 {
     try
     {
         if (res != null && res.cooperationDocking != null)
         {
             if (this.projectids.Contains(res.projectID))
             {
                 this.projectids.Remove(res.projectID);
             }
             this.INWindow.Collaboration.Add(res);
             if (this.projectids.Count == 0)
             {
                 this.SendCooperationOfflineDataRequest();
                 this.CloseCooperationTab();
             }
         }
     }
     catch (System.Exception ex)
     {
         ServiceUtil.Instance.Logger.Error(ex);
     }
 }
 public void OnCooperationDockingDataGetted(CooperationDockingResponse res)
 {
     try
     {
         if (res != null && res.cooperationDocking != null)
         {
             if (this.projectids.Contains(res.projectID))
             {
                 this.projectids.Remove(res.projectID);
             }
             this.INWindow.Collaboration.Add(res);
             if (this.projectids.Count == 0)
             {
                 this.SendCooperationOfflineDataRequest();
                 this.CloseCooperationTab();
             }
         }
     }
     catch (System.Exception ex)
     {
         ServiceUtil.Instance.Logger.Error(ex);
     }
 }
Ejemplo n.º 3
0
        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);
                }
            }
        }
 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);
         }
     }
 }