Пример #1
0
 public void OnCooperationProjectDataGetted(CooperationProjectResponse res)
 {
     try
     {
         this.dataService.ClearCooperation();
         this.INWindow.Collaboration.Clear();
         if (res == null || res.cooperationProject == null || res.cooperationProject.Count == 0)
         {
             this.SendCooperationOfflineDataRequest();
             this.CloseCooperationTab();
         }
         else
         {
             this.INWindow.Collaboration.Add(res);
             this.projectids.Clear();
             foreach (CooperationProjectWrapper item in this.dataService.GetCooperationProjectList())
             {
                 this.projectids.Add(item.UnitedProjecid);
             }
             if (res.cooperationProject.Count > 0)
             {
                 ServiceUtil.Instance.Logger.Debug(res.cooperationProject[res.cooperationProject.Count - 1].from_ProjectID + "." + res.cooperationProject[res.cooperationProject.Count - 1].to_ProjectID);
             }
             foreach (CooperationProjectWrapper item in this.dataService.GetCooperationProjectList())
             {
                 this.SendCooperationDockingRequest(item);
             }
         }
     }
     catch (System.Exception ex)
     {
         ServiceUtil.Instance.Logger.Error(ex);
     }
 }
Пример #2
0
 public void Add(CooperationProjectResponse resp)
 {
     this.TreeRoot.Visibility = Visibility.Visible;
     this.tbkTip.Visibility   = Visibility.Collapsed;
     foreach (CooperationProject item in resp.cooperationProject)
     {
         CooperationProjectWrapper cooperationProjectWrapper = new CooperationProjectWrapper(item);
         if (!this.dataService.ContainsCooperationProjectWrapper(cooperationProjectWrapper.UnitedProjecid))
         {
             TreeViewItem cooperationProjectNode = new TreeViewItem();
             cooperationProjectNode.Style = (base.TryFindResource("TreeViewItemStyle") as Style);
             CollaborationTreeViewItem uscCooperationProject = new CollaborationTreeViewItem(item);
             cooperationProjectNode.Header = uscCooperationProject;
             this.TreeRoot.Items.Add(cooperationProjectNode);
             this.dataService.AddCooperationProjectWrapper(cooperationProjectWrapper);
             this.dataService.AddCooperationProjectTvi(cooperationProjectWrapper.UnitedProjecid, cooperationProjectNode);
         }
     }
 }
 public void Add(CooperationProjectResponse resp)
 {
     this.TreeRoot.Visibility = Visibility.Visible;
     this.tbkTip.Visibility = Visibility.Collapsed;
     foreach (CooperationProject item in resp.cooperationProject)
     {
         CooperationProjectWrapper cooperationProjectWrapper = new CooperationProjectWrapper(item);
         if (!this.dataService.ContainsCooperationProjectWrapper(cooperationProjectWrapper.UnitedProjecid))
         {
             TreeViewItem cooperationProjectNode = new TreeViewItem();
             cooperationProjectNode.Style = (base.TryFindResource("TreeViewItemStyle") as Style);
             CollaborationTreeViewItem uscCooperationProject = new CollaborationTreeViewItem(item);
             cooperationProjectNode.Header = uscCooperationProject;
             this.TreeRoot.Items.Add(cooperationProjectNode);
             this.dataService.AddCooperationProjectWrapper(cooperationProjectWrapper);
             this.dataService.AddCooperationProjectTvi(cooperationProjectWrapper.UnitedProjecid, cooperationProjectNode);
         }
     }
 }
 public void OnCooperationProjectDataGetted(CooperationProjectResponse res)
 {
     try
     {
         this.dataService.ClearCooperation();
         this.INWindow.Collaboration.Clear();
         if (res == null || res.cooperationProject == null || res.cooperationProject.Count == 0)
         {
             this.SendCooperationOfflineDataRequest();
             this.CloseCooperationTab();
         }
         else
         {
             this.INWindow.Collaboration.Add(res);
             this.projectids.Clear();
             foreach (CooperationProjectWrapper item in this.dataService.GetCooperationProjectList())
             {
                 this.projectids.Add(item.UnitedProjecid);
             }
             if (res.cooperationProject.Count > 0)
             {
                 ServiceUtil.Instance.Logger.Debug(res.cooperationProject[res.cooperationProject.Count - 1].from_ProjectID + "." + res.cooperationProject[res.cooperationProject.Count - 1].to_ProjectID);
             }
             foreach (CooperationProjectWrapper item in this.dataService.GetCooperationProjectList())
             {
                 this.SendCooperationDockingRequest(item);
             }
         }
     }
     catch (System.Exception ex)
     {
         ServiceUtil.Instance.Logger.Error(ex);
     }
 }