예제 #1
0
        public void AddSMSHistoryTest()
        {
            SMS sms = GetSMS();
            var b   = ReportStatisticsDB.AddSMSHistory(sms);

            Assert.IsTrue(b);
        }
예제 #2
0
        public void GetReportStatisticsTest()
        {
            SMS sms = GetSMS();
            var b   = ReportStatisticsDB.AddSMSHistory(sms);

            Assert.IsTrue(b);
            var r = ReportStatisticsDB.GetReportStatistics(sms.SerialNumber, sms.SendTime);

            Assert.IsNotNull(r);
        }
예제 #3
0
 private static bool frSMSOriginal_ReceiveMessage(RabbitMQHelper mq, string message)
 {
     try
     {
         var rs = JsonSerialize.Instance.Deserialize <ReportStatistics>(message);
         ReportStatisticsDB.AddSMSHistory(rs);
     }
     catch (Exception ex)
     {
         LogClient.LogHelper.LogError("StatusReport", "StatusReportHost.frSMSOriginal_ReceiveMessage", ex.ToString());
     }
     return(true);
 }
예제 #4
0
        public void UpdateTest()
        {
            SMS sms = GetSMS();
            var b   = ReportStatisticsDB.AddSMSHistory(sms);

            Assert.IsTrue(b);
            var r = ReportStatisticsDB.GetReportStatistics(sms.SerialNumber, sms.SendTime);

            Assert.IsNotNull(r);
            ReportStatistics rs = new ReportStatistics()
            {
                SerialNumber = sms.SerialNumber,
                SendCount    = 100,
                SendTime     = sms.SendTime
            };

            b = ReportStatisticsDB.Update("account", rs);
            Assert.IsTrue(b);
        }
예제 #5
0
 internal void Send(SMSDTO sms)
 {
     ReportStatisticsDB.AddSMSHistory(new ReportStatistics(sms.Message));
     fqSMS.PublishMessage(JsonConvert.SerializeObject(sms), sms.Message.SMSLevel);
 }
예제 #6
0
 public static void Send(SMSDTO sms)
 {
     ReportStatisticsDB.AddSMSHistory(new ReportStatistics(sms.Message));
 }