Ejemplo n.º 1
0
        //9.3.3	修改用户
        public string updateUser(QChat_User qchat)
        {
            QchatQEDService qqs = new QchatQEDService();

            qqs = getQchatQEDService(qchat.username, qchat.password, qchat.deviceID, qchat.urlIp);


            //修改用户
            UserRequest userequest = new UserRequest();
            UserInfo    ui         = new UserInfo();

            ui.callRestriction  = qchat.callRestriction; //"1111111111";
            ui.level            = qchat.level;           //"3";
            ui.number           = qchat.number_user;     //"15314604129";
            ui.password         = qchat.password_user;   //"abcdef1111";
            userequest.userInfo = ui;

            QedRequest qedr = new QedRequest();

            qedr.userRequest = userequest;

            QedResponse  response     = qqs.updateUser(qedr);
            UserResponse userresponse = response.userResponse;

            StringBuilder sb = new StringBuilder();

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

            //Console.ReadKey();
            return(sb.ToString());
        }
Ejemplo n.º 2
0
            //9.4	遥毙/复活
        public string updateUserStatus(QChat_User qchat)
        {
            QchatQEDService qqs = new QchatQEDService();
            qqs = getQchatQEDService(qchat.username, qchat.password, qchat.deviceID, qchat.urlIp);
            
            //遥毙/复活
            UserInfo ui = new UserInfo();
            ui.number = qchat.number_user;// "15314604129";
            ui.status = qchat.status;// "0";
            UserRequest userequest = new UserRequest();
            userequest.userInfo = ui;

            QedRequest qedr = new QedRequest();
            qedr.userRequest = userequest;

            QedResponse response = qqs.updateUserStatus(qedr);
            UserResponse userresponse = response.userResponse;

            StringBuilder sb = new StringBuilder();
            if (userresponse != null && userresponse.response != null)
            {
                sb.AppendLine("description:" + userresponse.response.description);
                sb.AppendLine("reserve:" + userresponse.response.reserve);
                sb.AppendLine("returnCode:" + userresponse.response.returnCode);

            }
            else
            {
                sb.AppendLine("返回信息为null");
            }
            Console.WriteLine(sb);
            //Console.ReadKey();
            return sb.ToString();
        }