Esempio n. 1
0
 private void InitQueryViewRightTree()
 {
     if (CurrentPost != null)
     {
         using (SinoSZClientBase.UserManagerService.UserManagerServiceClient _umsc = new SinoSZClientBase.UserManagerService.UserManagerServiceClient())
         {
             List <UserQueryModelInfo> _qvRightList = _umsc.GetModelRightListByPostID(CurrentPost.PostID).ToList <UserQueryModelInfo>();
             TObj_ModelRightList       _qvRights    = new TObj_ModelRightList();
             foreach (UserQueryModelInfo _qmRight in _qvRightList)
             {
                 TObj_ModelRightItem _ritem = new TObj_ModelRightItem(_qmRight);
                 _qvRights.Add(_ritem);
             }
             this.treeList3.BeginUpdate();
             this.treeList3.DataSource = _qvRights;
             this.treeList3.EndUpdate();
         }
     }
 }
Esempio n. 2
0
 private void InitQueryViewRightTree(SinoRole _sr)
 {
     using (SinoSZClientBase.UserManagerService.UserManagerServiceClient _umsc = new SinoSZClientBase.UserManagerService.UserManagerServiceClient())
     {
         List <UserQueryModelInfo> _qvRightList = _umsc.GetModelRightListByRoleID(_sr.RoleID).ToList <UserQueryModelInfo>();
         TObj_ModelRightList       _qvRights    = new TObj_ModelRightList();
         foreach (UserQueryModelInfo _qmRight in _qvRightList)
         {
             string _qvname = string.Format("{0}.{1}", _qmRight.QueryModelNamespace, _qmRight.QueryModelName);
             if (this.CanUseQueryModelNames.Contains(_qvname))
             {
                 TObj_ModelRightItem _ritem = new TObj_ModelRightItem(_qmRight);
                 _qvRights.Add(_ritem);
             }
         }
         this.treeList3.BeginUpdate();
         this.treeList3.DataSource = _qvRights;
         this.treeList3.EndUpdate();
     }
 }