Exemplo n.º 1
0
        /// <summary>
        /// 管理员转让
        /// </summary>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        public bool ChangeAdmin(ref string errMsg)
        {
            bool changeResult = false;

            try
            {
                //ChangeGroupAdminIn input = new ChangeGroupAdminIn()
                //{
                //    groupId = GroupId,
                //    newManagerId = Member.userId,
                //    token = AntSdkService.AntSdkLoginOutput.token,
                //    userId = AntSdkService.AntSdkLoginOutput.userId,
                //    version = GlobalVariable.Version
                //};
                //ChangeGroupAdminOut output = new ChangeGroupAdminOut();
                //TODO:AntSdk_Modify
                //DONE:AntSdk_Modify
                AntSdkGroupOwnerChangeInput groupManageChangeInput = new AntSdkGroupOwnerChangeInput();
                groupManageChangeInput.groupId    = GroupId;
                groupManageChangeInput.newOwnerId = Member.userId;
                groupManageChangeInput.userId     = AntSdkService.AntSdkLoginOutput.userId;
                var errorCode = 0;
                changeResult = AntSdkService.GroupOwnerChange(groupManageChangeInput, ref errorCode, ref errMsg);
                //changeResult=(new HttpService()).ChangeGroupAdmin(input, ref output, ref errMsg);
                //转让管理员成功显示阅后即焚图标
                if (changeResult == true)
                {
                    switchImage();
                }
            }
            catch (Exception ex)
            {
                changeResult = false;
                errMsg       = $"变更管理员时发生异常:{ex.Message}";
            }
            return(changeResult);
        }