Пример #1
0
 public clsSMS(string strUserID)
 {
     this.SMSobj                = new SmsNav.Sms();
     this.ResponseObj           = new SmsNav.Sms.responseStruct();
     this.strSMSGateWayUserName = System.Configuration.ConfigurationManager.AppSettings["SMSGateWayUsername"].ToString();
     this.strSMSGateWayPassword = System.Configuration.ConfigurationManager.AppSettings["SMSGateWayPassword"].ToString();
     this.strSMSGateWayAppID    = System.Configuration.ConfigurationManager.AppSettings["SMSGateWayAppID"].ToString();
     this.strSMSGateWayURL      = System.Configuration.ConfigurationManager.AppSettings["SMSGateWayURL"].ToString();
 }
Пример #2
0
        public void sendMessage(string strContactNo, string strMessage)
        {
            this.ResponseObj = propSMSobj.sendSms(propSMSGateWayUserName, propSMSGateWayPassword, propSMSGateWayAppID, strContactNo, strMessage, propSMSGateWayURL);
            this.strErrorMsg = propResponseObj.strError != null?propResponseObj.strError.ToString() : "";

            this.strReturnID = propResponseObj.strMessage != null?propResponseObj.strMessage.ToString() : "";

            if (propResponseObj.strMessage.StartsWith("ERR"))
            {
                this.strReturnID = "";
                this.strErrorMsg = propResponseObj.strMessage;
            }
            else
            {
                this.strErrorMsg = "";
            }
        }