Esempio n. 1
0
 private DataSet GetRecordForReply(String ActivationCode)
 {
     try
     {
         DataSet ds     = new DataSet();
         SMSDal  smsDal = new SMSDal();
         ds = smsDal.GetRecordForReply(ActivationCode);
         return(ds);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
        private void ParseMessage(SMSComponent smsComponent, String message)
        {
            Array  array;
            String ID           = "";
            String Sender       = "";
            String MessageType  = "";
            String DateReceived = "";
            String TimeReceived = "";
            String Content      = "";

            try
            {
                message = message.Replace(@"""", "").Replace(",,", ",");
                array   = message.Split(',');

                ID           = array.GetValue(0).ToString();
                Sender       = array.GetValue(2).ToString();
                MessageType  = array.GetValue(1).ToString();
                DateReceived = array.GetValue(3).ToString();

                Array spitTimeContent;

                spitTimeContent = array.GetValue(4).ToString().Split(' ');
                TimeReceived    = spitTimeContent.GetValue(0).ToString();
                Content         = array.GetValue(4).ToString().Substring(TimeReceived.Length + 1);

                SMSDal smsDal = new SMSDal();
                smsDal.ActivationCode = oNode.SelectSingleNode("smssettings/activationCode").InnerXml;
                smsDal.InboxSave(ID, Content, Sender, DateReceived, TimeReceived, oNode.SelectSingleNode("smssettings/modemID").InnerXml);
                DeleteSMS(smsComponent, ID);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 3
0
        private void SendingSMS(SMSComponent smsComponent, String mobilenumber, String message, Boolean IsDeleted, Int64 InboxID, String InboxType)
        {
            try
            {
                String status = "";
                String Remark = "";
                SMSDal smsDal = new SMSDal();

                if (smsComponent.SendSMS(IsDeleted, InboxID, mobilenumber, message))
                {
                    status = "Success";
                }
                else
                {
                    status = "Failed";
                }

                if (InboxID > 0)
                {
                    Remark = "AutoReply";
                }
                else
                {
                    Remark = "Manual";
                }

                if (status == "Success")
                {
                    smsDal.OutboxSave(message, mobilenumber, status, Remark, InboxID, InboxType);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }