Exemple #1
0
        /// <summary>
        /// 获取讨论组成员信息
        /// </summary>
        public bool GetGroupMembers(GetGroupMembersInput input, ref GetGroupMembersOutput output, ref string errMsg)
        {
            bool result = HttpCommonMethod <GetGroupMembersInput, GetGroupMembersOutput>("/antuser/group.findGroupMembers.do", GlobalVariable.RequestMethod.POST, input, ref output, ref errMsg);

            if (result && output.result == (int)GlobalVariable.Result.Failure)
            {
                errMsg = string.IsNullOrEmpty(output.errorCode) ? "获取讨论组成员信息失败" : resources.GetString("E_" + output.errorCode);
                return(false);
            }
            return(result);
        }
Exemple #2
0
        public static List <AntSdkGroupMember> GetMembers(string groupId)
        {
            System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch();
            stopWatch.Start();
            GetGroupMembersInput input = new GetGroupMembersInput();

            input.token   = AntSdkService.AntSdkLoginOutput.token;
            input.version = GlobalVariable.Version;
            input.userId  = AntSdkService.AntSdkLoginOutput.userId;
            input.groupId = groupId;
            GetGroupMembersOutput output = new GetGroupMembersOutput();
            var    errCode = 0;
            string errMsg  = string.Empty;
            //TODO:AntSdk_Modify
            //if ((new HttpService()).GetGroupMembers(input, ref output, ref errMsg))
            //{
            //    Members = output.users;

            //    this.GroupName = string.Format("{0}", GroupInfo.groupName);
            //    GroupMemberCount = string.Format("({0}人)", Members == null ? 0 : Members.Count());
            //    GetGroupMembers_User tempUser = Members.Find(c => c.roleLevel == (int)GlobalVariable.GroupRoleLevel.Admin);
            //    if (tempUser != null && AntSdkService.AntSdkLoginOutput.userId == tempUser.userId)
            //    {
            //        DeleteGroupVisibility = Visibility.Visible;
            //        GroupClassifyName = "我管理的";
            //        GroupClassify = 1;
            //    }
            //    else
            //    {
            //        GroupClassifyName = "我加入的";
            //        GroupClassify = 2;
            //    }
            //}
            //DONE:AntSdk_Modify
            var groupMembers = AntSdkService.GetGroupMembers(AntSdkService.AntSdkLoginOutput.userId,
                                                             groupId, ref errCode, ref errMsg);

            if (groupMembers != null && groupMembers.Length > 0)
            {
                return(groupMembers.ToList());
            }
            //Log输出
            if (!string.IsNullOrEmpty(errMsg))
            {
            }
            stopWatch.Stop();
            LogHelper.WriteDebug(string.Format("[GroupInfoViewModel_GetMembers({0}毫秒)]",
                                               stopWatch.Elapsed.TotalMilliseconds));
            return(new List <AntSdkGroupMember>());
        }