Exemplo n.º 1
0
        public static void SmsLog_Submitted(ISms sms, ISmsStatusCollection status, DateTime timeStamp)
        {
            using (var db = new SmsLogDataContext())
            {
                for (int count = 0; count < status.Count; ++count)
                    db.SmsLog_Forwarded(sms.ReferenceId, status[count].ProviderReference, timeStamp, sms.Recipients[count], status[count].Status < 0, status[count].ErrorCode, status[count].ErrorMessage);

                db.SubmitChanges();
            }
        }
Exemplo n.º 2
0
        public override void OnSubmissionFailure(ISms sms, ISmsStatusCollection status, DateTime timeStamp)
        {
            int failures = 0;

            WriteLine(string.Format("**Failure: {0}", sms));
            foreach (ISmsStatus st in status)
            {
                WriteIndented(st.ToString());
                if (st.Status < 0)
                    failures++;
            }

            WriteIndented(string.Format("Number of failures: {0}", failures));
        }
Exemplo n.º 3
0
 public override void OnSubmissionFailure(ISms sms, ISmsStatusCollection status, DateTime timeStamp)
 {
     SmsLogDataContext.SmsLog_Submitted(sms, status, timeStamp);
 }
Exemplo n.º 4
0
 public override void OnSubmission(ISms sms, ISmsStatusCollection status, DateTime timeStamp)
 {
     WriteLine(string.Format("Submitted: {0}", sms));
     foreach (ISmsStatus st in status)
         WriteIndented(st.ToString());
 }
Exemplo n.º 5
0
 protected void NotifySubmission(ISms sms, ISmsStatusCollection status)
 {
     if (OnSubmission != null) OnSubmission(sms, status, DateTime.Now);
 }