Exemplo n.º 1
0
        /// <summary>
        /// 调用wcf接口发送短信
        /// </summary>
        /// <param name="mobile"></param>
        /// <param name="content"></param>
        public static bool SendWCFSms(string mobile, string content)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add(mobile, content);
            var flag = WCFAppSmsHelper.SendSms(dic, SmsType.SmsAD);

            return(flag);
        }
Exemplo n.º 2
0
        public static bool SendWCFRegisterSms(string mobile, string content)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add(mobile, content);
            var flag = WCFAppSmsHelper.SendSms(dic, SmsType.SmsEvent);

            if (flag)
            {
                SmsLogBLL.Instance.Add(new SmsLogEntity()
                {
                    SmsLogId    = QSDMS.Util.Util.NewUpperGuid(),
                    Caption     = content,
                    RecivMobile = mobile,
                    Status      = 1,
                    SmsTempId   = "WCFAppSms",
                    CreateTime  = DateTime.Now,
                    Exception   = "成功"
                });
                return(true);
            }
            else
            {
                SmsLogBLL.Instance.Add(new SmsLogEntity()
                {
                    SmsLogId    = QSDMS.Util.Util.NewUpperGuid(),
                    Caption     = content,
                    RecivMobile = mobile,
                    Status      = 0,
                    SmsTempId   = "WCFAppSms",
                    CreateTime  = DateTime.Now,
                    Exception   = "发送失败"
                });
            }
            return(false);
        }