Professional Documents
Culture Documents
SMS Code
SMS Code
com/Articles/29106/Migrate-MySQL-to-Microsoft-SQL-Server
public class SendMSG
{
string username;
string password;
string msgSender;
string mobileNo;
string message;
public SendMSG(string username, string password, string msgSender)
{
this.username = username;
this.password = password;
this.msgSender = msgSender;
}
//Public Sub New(ByVal username As String, ByVal password As String, ByVal msgSender As String,
ByVal mobileNo As String, ByVal message As String)
// Me.username = username
// Me.password = password
// Me.msgSender = msgSender
// Me.mobileNo = mobileNo
// Me.message = message
// SendMessage()
//End Sub
//public void SendMSG()
//{
// //Create ViaNettSMS object with username and password
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//}
public Result SendSMS(string destinationaddr, string message)
{
/// <summary>
/// Parses the XML code and returns a Result object.
/// </summary>
/// <param name="ServerResult">XML data from a request through HTTP API.</param>
/// <returns>Returns a Result object with the parsed data.</returns>
private Result ParseServerResult(string ServerResult)
{
System.Xml.XmlDocument xDoc = new System.Xml.XmlDocument();
// Dim ack As System.Xml.XmlNode
Result result = new Result();
//xDoc.LoadXml(ServerResult)
//changes for mVayoo API
//If ServerResult.ToLower.Contains("success") Then
//if (ServerResult.ToLower.Contains("status=0"))
//{
// result.Success = true;
//}
//else
//{
// result.Success = false;
//}
//ack = xDoc.GetElementsByTagName("ack").Item(0)
//result.ErrorCode = CInt(ack.Attributes("errorcode").Value)
//result.ErrorMessage = ack.InnerText
//result.Success = (result.ErrorCode = 0)
return result;
}
public class Result
{
public bool Success;
public int ErrorCode;
public string ErrorMessage;
}
}