예제 #1
0
파일: Class1.cs 프로젝트: liuwei0925/myPrj
            //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();
        }
예제 #2
0
파일: Class1.cs 프로젝트: liuwei0925/myPrj
            //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();
        }
예제 #3
0
파일: Class1.cs 프로젝트: liuwei0925/myPrj
            //9.2.2	增加群组
        public string AddGroup(QChat_Group qchat)
        {
            QchatQEDService qqs = new QchatQEDService();
            qqs = getQchatQEDService(qchat.username, qchat.password, qchat.deviceID, qchat.urlIp);

            //增加参数
            AddGroupRequest queryRequest_add = new AddGroupRequest();
            GroupInfo gi = new GroupInfo();
            gi.name = qchat.name;//"test";
            gi.title = qchat.title;//"title";
            gi.memberCount = qchat.memberCount;//20;
            gi.type = qchat.type;//2;
            gi.policy = "2";//固定
            gi.domain = (gi.type == 2 ? "2" : "3"); ;
            gi.codec = 2;//固定
            gi.code = string.Empty;//固定

            queryRequest_add.adminAccount = qchat.adminAccount;//"admin057100622"; //集团管理员名称
            queryRequest_add.groupInfo = gi;

            QedRequest qedr_add = new QedRequest();
            qedr_add.addGroupRequest = queryRequest_add;

            QedResponse response = qqs.addGroup(qedr_add);
            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();
        }