Ejemplo n.º 1
0
 internal CSmsItem(CItem parent, ISMS medSms) : base(parent)
 {
     if (!(parent is CSmsItems))
     {
         throw new Exception("Internal error");
     }
     this.MedSms = medSms;
     this.Text   = medSms.Text;
     this.Type   = (CSmsItem.EType)medSms.Type;
     this.State  = (CSmsItem.EState)medSms.State;
     this.Number = "";
     if (this.Type == CSmsItem.EType.StatusReport || this.Type == CSmsItem.EType.Submit)
     {
         this.Number = medSms.ToNumber;
     }
     if (this.Type == CSmsItem.EType.Deliver)
     {
         this.Number = medSms.FromNumber;
     }
     this.ServiceCenter = medSms.ServiceCenter;
     if (this.Type == CSmsItem.EType.StatusReport)
     {
         this.Status = medSms.Status;
     }
     this.ReceivedTimezone = medSms.ReceivedTimezone;
     this.ReceivedTime     = DateTime.MinValue;
     try
     {
         int num;
         this.ReceivedTime = medSms.GetReceivedTimestamp(out num);
         if (num == 0)
         {
             this.ReceivedTime = DateTime.MinValue;
         }
     }
     catch
     {
     }
     this.SentTime = DateTime.MinValue;
     try
     {
         int num;
         this.SentTime = medSms.GetSentTimestamp(out num);
         if (num == 0)
         {
             this.SentTime = DateTime.MinValue;
         }
     }
     catch
     {
     }
 }
Ejemplo n.º 2
0
 public void StoreSMS(CSmsItem.EType type, CSmsItem.EState state, string number, string serviceCenter, string text, DateTime time, int timeZone)
 {
     this.MedSmsFolder.StoreSMS((int)type, (int)state, 0, 0, 0, 0, 0, null, number, 129, serviceCenter, 129, text, time, timeZone, null);
 }