Esempio n. 1
0
        public string TestResult(string ret)
        {
            string code = reg.Match(ret).Value;

            if (code.Length > 1)
            {
                code = code.Split('=')[1].Trim('"');
            }
            if ("1".Equals(code) && ret.IndexOf("<Item") >= 0)
            {
                RetEntity entity = RetEntity.Parse(ret);
                return(entity.ToString());
            }
            else
            {
                return(RetCode[code] + ";");
            }
        }
Esempio n. 2
0
        public string SendSMS(string mobile, string content)
        {
            string data = string.Format("action=sendOnce&cgid=52&csid=0&ac={0}&authkey={1}&m={2}&c={3}", UserID, Password, mobile, HttpUtility.UrlEncode(content));
            string ret  = GCL.Common.Tool.PostString(APIUrl, data);
            string code = reg.Match(ret).Value;

            if (code.Length > 1)
            {
                code = code.Split('=')[1].Trim('"');
            }
            if ("1".Equals(code) && ret.IndexOf("<Item") >= 0)
            {
                RetEntity entity = RetEntity.Parse(ret);
                return(entity.ToString());
            }
            else
            {
                return(RetCode[code] + ";");
            }
        }