Пример #1
0
 protected void SendSystemMsg2User(MessageSet setting, Dictionary <string, string> msgParams)
 {
     if (setting.IsSendMsg)
     {
         Message.SendS2UMsg(MsgService.user.UserName, setting.MessageTitle, this.ReplaceTemplate(setting.MessageTemplate, msgParams));
     }
     if (setting.IsSendMail)
     {
         MsgService.SendMail(MsgService.user.Email, setting.MailTitle, this.ReplaceTemplate(setting.MailTemplate, msgParams));
     }
     if (setting.IsSendSMS)
     {
         MsgService.SendSMS(MsgService.user.Mobile, this.ReplaceTemplate(setting.SMSTemplate, msgParams));
     }
 }
Пример #2
0
 protected void SendSystemMsg2Mger(MessageSet setting, Dictionary <string, string> msgParams)
 {
     if (setting.IsSendMsg)
     {
         Message.SendSysMsg(setting.MessageTitle, this.ReplaceTemplate(setting.MessageTemplate, msgParams));
     }
     if (setting.IsSendMail && !string.IsNullOrEmpty(ConfigProvider.Configs.ManagerMail))
     {
         string[] array = ConfigProvider.Configs.ManagerMail.Split(new char[]
         {
             ','
         });
         for (int i = 0; i < array.Length; i++)
         {
             string text = array[i];
             if (ValidateUtils.IsEmail(text))
             {
                 MsgService.SendMail(text, setting.MailTitle, this.ReplaceTemplate(setting.MailTemplate, msgParams));
             }
         }
     }
     if (setting.IsSendSMS && !string.IsNullOrEmpty(ConfigProvider.Configs.ManagerMobile))
     {
         string[] array = ConfigProvider.Configs.ManagerMobile.Split(new char[]
         {
             ','
         });
         for (int i = 0; i < array.Length; i++)
         {
             string text = array[i];
             if (ValidateUtils.IsMobilePhone(text))
             {
                 MsgService.SendSMS(text, this.ReplaceTemplate(setting.SMSTemplate, msgParams));
             }
         }
     }
 }
Пример #3
0
        public static int SendSMSCheckCode(string strToMobile, string strContent, string strValidateCode)
        {
            string empty = string.Empty;

            return(MsgService.SendSMS(strToMobile, "CheckCode", strContent, strValidateCode, ref empty));
        }
Пример #4
0
        public static int SendSMS(string strToMobile, string strContent)
        {
            string empty = string.Empty;

            return(MsgService.SendSMS(strToMobile, "Normal", strContent, string.Empty, ref empty));
        }