Example #1
0
 private void SendSms(string phone, string userId)
 {
     if (!string.IsNullOrEmpty(phone))
     {
         Sms_Bll.SmsMod info = new Sms_Bll.SmsMod();
         info.AlarmContent = Info.AlarmContent;
         info.DeviceTime   = Info.DeviceTime;
         info.Phone        = phone;
         info.Content      = "\n告警:" + Info.AlarmContent + "\n" + Info.DeviceTime.ToString("MM月dd日HH时mm分");
         info.Reason       = Info.Reason;
         info.SubCmd       = Info.ProtocolType;
         info.UserId       = userId;
         Sms_Bll d      = new Sms_Bll(info);
         string  Result = d.Handle();
         if (Result != "0")
         {
             Log.Warn("短信发送错误;电话号码:" + info.Phone + " 内容:" + info.AlarmContent);
         }
     }
 }
Example #2
0
 public SendSms_Bll(Sms_Bll.SmsMod info)
 {
     this.Info = info;
 }