Пример #1
0
 public override int SendSMS(SMSSDKMassInfo smsInfos, string extendNub)
 {
     Random iRandom = new Random();
     return iRandom.Next(0, 2);
 }
Пример #2
0
        /// <summary>
        /// 发送短信
        /// </summary>
        /// <param name="us"></param>
        /// <returns></returns>
        public override int SendSMS(SMSSDKMassInfo smsInfos, string extendNub)
        {
            SendUser us = this.SendUser;
            //即时发送      这里是软件序列号    手机号       短信内容     优先级
            int result = 0;
            if (!string.IsNullOrEmpty(extendNub))
                result = SendSMSEx(us.serialNumber, smsInfos.Phones.ToArray().ToString(), smsInfos.Content, extendNub, us.priority);
            else
            {
                result = SendSMS(us.serialNumber, smsInfos.Phones.ToArray().ToString(), smsInfos.Content, us.priority);

            }
            if (result == 1)
                return 1;
            else if (result == 101)
                return 10;
            else if (result == 102)
                return 8;
            else if (result == 0)
                return 0;
            else if (result == 100)
                return 7;
            else if (result == 107)
                return 6;
            else if (result == 108)
                return 7;
            else if (result == 109)
                return 1;
            else if (result == 110)
                return 9;
            else if (result == 201)
                return 3;
            else
                return 8;
            //if (result == 1)
            //    return "发送成功";
            //else if (result == 101)
            //    return "网络故障";
            //else if (result == 102)
            //    return "其它故障";
            //else if (result == 0)
            //    return "失败";
            //else if (result == 100)
            //    return "序列号码为空或无效";
            //else if (result == 107)
            //    return "手机号码为空或者超过1000个";
            //else if (result == 108)
            //    return "手机号码分割符号不正确";
            //else if (result == 109)
            //    return "部分手机号码不正确,已删除,其余手机号码被发送";
            //else if (result == 110)
            //    return "短信内容为空或超长(70个汉字)";
            //else if (result == 201)
            //    return "计费失败,请充值";
            //else
            ////    return "其他故障值:" + result.ToString();
        }
Пример #3
0
        /// <summary>
        /// 发送短信
        /// </summary>
        /// <param name="us"></param>
        /// <returns></returns>
        public override int SendSMS(SMSSDKMassInfo smsInfos, string extendNub)
        {
            SendUser us = this.SendUser;
            //即时发送      这里是软件序列号    手机号       短信内容     优先级
            int result = 0;

            if (!string.IsNullOrEmpty(extendNub))
            {
                result = SendSMSEx(us.serialNumber, smsInfos.Phones.ToArray().ToString(), smsInfos.Content, extendNub, us.priority);
            }
            else
            {
                result = SendSMS(us.serialNumber, smsInfos.Phones.ToArray().ToString(), smsInfos.Content, us.priority);
            }
            if (result == 1)
            {
                return(1);
            }
            else if (result == 101)
            {
                return(10);
            }
            else if (result == 102)
            {
                return(8);
            }
            else if (result == 0)
            {
                return(0);
            }
            else if (result == 100)
            {
                return(7);
            }
            else if (result == 107)
            {
                return(6);
            }
            else if (result == 108)
            {
                return(7);
            }
            else if (result == 109)
            {
                return(1);
            }
            else if (result == 110)
            {
                return(9);
            }
            else if (result == 201)
            {
                return(3);
            }
            else
            {
                return(8);
            }
            //if (result == 1)
            //    return "发送成功";
            //else if (result == 101)
            //    return "网络故障";
            //else if (result == 102)
            //    return "其它故障";
            //else if (result == 0)
            //    return "失败";
            //else if (result == 100)
            //    return "序列号码为空或无效";
            //else if (result == 107)
            //    return "手机号码为空或者超过1000个";
            //else if (result == 108)
            //    return "手机号码分割符号不正确";
            //else if (result == 109)
            //    return "部分手机号码不正确,已删除,其余手机号码被发送";
            //else if (result == 110)
            //    return "短信内容为空或超长(70个汉字)";
            //else if (result == 201)
            //    return "计费失败,请充值";
            //else
            ////    return "其他故障值:" + result.ToString();
        }
Пример #4
0
 /// <summary>
 /// 发送短信
 /// </summary>
 /// <returns></returns>
 public abstract int SendSMS( SMSSDKMassInfo smsInfos, string extendNub);
Пример #5
0
        public override int SendSMS(SMSSDKMassInfo smsInfos, string extendNub)
        {
            Random iRandom = new Random();

            return(iRandom.Next(0, 2));
        }
Пример #6
0
 /// <summary>
 /// 发送短信
 /// </summary>
 /// <returns></returns>
 public abstract int SendSMS(SMSSDKMassInfo smsInfos, string extendNub);