示例#1
0
            //9.2.4	修改群组
        public string updateGroup(QChat_Group qchat)
        {
            QchatQEDService qqs = new QchatQEDService();
            qqs = getQchatQEDService(qchat.username, qchat.password, qchat.deviceID, qchat.urlIp);

            //7修改群组
            GroupRequest updateRequest = new GroupRequest();
            GroupInfo gi3 = new GroupInfo();
            gi3.name = qchat.name;//"123";
            gi3.memberCount = qchat.memberCount;//101;
            gi3.code = qchat.code;// "zppaam678685";
            gi3.title = qchat.title;// "title";
            updateRequest.groupInfo = gi3;
            QedRequest qedr_update = new QedRequest();
            qedr_update.groupRequest = updateRequest;
            QedResponse response = qqs.updateGroup(qedr_update);
            GroupResponse companyResponse = response.groupResponse;
            StringBuilder sb = new StringBuilder();

            if (companyResponse != null && companyResponse.response != null)
            {
                sb.AppendLine("Response:" + companyResponse.response.description.ToString());
                sb.AppendLine("reserve:" + companyResponse.response.reserve);
                sb.AppendLine("returnCode:" + companyResponse.response.returnCode);
            }
            else
            {
                sb.AppendLine("返回信息为null");
            }
            Console.WriteLine(sb);

            //Console.ReadKey();
            return sb.ToString();
        }
示例#2
0
            //9.2.3	删除群组
        public string deleteGroup(QChat_Group qchat)
        {
            QchatQEDService qqs = new QchatQEDService();
            qqs = getQchatQEDService(qchat.username, qchat.password, qchat.deviceID, qchat.urlIp);

            //6删除群组
            GroupRequest deleteRequest = new GroupRequest();
            GroupInfo gi2 = new GroupInfo();
            gi2.code = qchat.code;//"gmikym193313";
            deleteRequest.groupInfo = gi2;
            QedRequest qedr_del = new QedRequest();
            qedr_del.groupRequest = deleteRequest;
            QedResponse response = qqs.deleteGroup(qedr_del);
            GroupResponse companyResponse = response.groupResponse;
            StringBuilder sb = new StringBuilder();

            if (companyResponse != null)//&& companyResponse.response != null)
            {
                sb.AppendLine("Response:" + companyResponse.response.description.ToString());
                sb.AppendLine("reserve:" + companyResponse.response.reserve);
                sb.AppendLine("returnCode:" + companyResponse.response.returnCode);
            }
            else
            {
                sb.AppendLine("返回信息为null");
            }
            Console.WriteLine(sb);

            //Console.ReadKey();
            return sb.ToString();
        }