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(); }
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 = ""; } }