Exemple #1
0
        private string SendSMSToMutiUser(string strCont, string strCondition)
        {
            ISMS   iSMS  = SMSProvider.Create();
            string text  = string.Empty;
            string text2 = " SELECT AutoID,UserName,Email,Mobile FROM cms_User WHERE Mobile<>'' ";

            if (!strCondition.IsNullOrEmpty())
            {
                text2 = text2 + " AND " + strCondition;
            }
            DataTable dataTable = PageBase.dbo.GetDataTable(text2);

            if (dataTable != null && dataTable.Rows.Count > 0)
            {
                foreach (DataRow dataRow in dataTable.Rows)
                {
                    string text3 = dataRow["Mobile"].ToString();
                    if (!string.IsNullOrEmpty(text3) && text3.Length.Equals(11))
                    {
                        if (MsgService.SendSMS(text3, strCont) == 0)
                        {
                            text = text + "发送" + text3 + "短信失败;";
                        }
                    }
                }
            }
            return(text);
        }
Exemple #2
0
        private void SendMobileOnFH(OrdersInfo order, UserInfo user)
        {
            bool   @bool       = WebUtils.GetBool(base.GetConfigValue("IsSendSMSOnGoodsSend"));
            string configValue = base.GetConfigValue("SMSTmpOnGoodsSend");

            if (@bool && !string.IsNullOrEmpty(configValue) && !string.IsNullOrEmpty(user.Mobile) && user.Mobile.Length == 11 && user != null)
            {
                MsgService.SendSMS(user.Mobile, configValue.Replace("${username}", user.UserName).Replace("${orderno}", order.OrderNo));
            }
        }
Exemple #3
0
        private string SendSMSToCustom(string strRevicer, string strCont)
        {
            string text = string.Empty;

            string[] array = strRevicer.Split(new char[]
            {
                ','
            });
            for (int i = 0; i < array.Length; i++)
            {
                if (MsgService.SendSMS(array[i], strCont) == 0)
                {
                    text = text + "发送" + array[i] + "短信失败;";
                }
            }
            return(text);
        }