public ClientSmsModel(SmsBase sms) { this.SenderId = sms.SenderId; this.ClientId = sms.ClientId; this.VisitGroupId = sms.VisitGroupId; this.VisitId = sms.VisitId; this.Phone = sms.Phone; this.Message = sms.Message; this.CreateDate = sms.CreateDate; this.Comment = sms.Comment; this.StatusIdInside = sms.StatusIdInside; if (string.IsNullOrEmpty(sms.StatusFromService) && sms.SendDate != null) { this.StatusFromService = "Успешно"; } else { this.StatusFromService = sms.StatusFromService; } if (string.IsNullOrEmpty(sms.MessageFromService) && sms.SendDate != null) { this.MessageFromService = "Сообщение успешно отправлено"; } else { this.MessageFromService = sms.MessageFromService; } this.SendDate = sms.SendDate; }
public static void Run() { try { // Log.Info("启动ABSManagerReminder(" + GetVersion() + ")..."); Log.Info("启动SmsABSManagerReminder..."); } catch (Exception ex) { Log.Error("启动SmsABSManagerReminder失败", ex); } m_running = true; while (m_running) { try { Log.Info("轮询开始"); SmsBase.SendSmsUserThread("13916924969", "这是第一条短信", "成功了吗?", "成功了"); } catch (Exception ex) { Log.Error(ex); } finally { Log.Info("轮询结束"); } m_running = false; System.Threading.Thread.Sleep(5000); } }
static void Main(string[] args) { string apiID = ""; var baseSms = new SmsBase(apiID, true); //baseSms.Sms.Send(new string[] { "9686262480" }, "test"); var a = baseSms.SmsAccount.GetBalance(); a.ToString(); }