using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace LYFZ.BakMandaoSmsInterface
{
///
/// 用户查询返回信息
///
public class SmsUserInfo
{
public SmsUserInfo(string userInfoStr,string uid) {
/*
Sucess
预付费
97
100
*/
this.SourceString = userInfoStr;
if (userInfoStr != "")
{
System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
xml.LoadXml(userInfoStr);
XmlNode xmlReturnstatusNode = xml.SelectSingleNode("//returnsms//returnstatus");
if (xmlReturnstatusNode.InnerText.ToLower() == "Sucess".ToLower())
{
XmlNode xmlNode = xml.SelectSingleNode("//returnsms//overage");
try
{
this.ReturnStatus = SendSmsResults.GetResults("000");
try
{
this.Balance = xmlNode.InnerText;
}
catch { }
}
catch { this.ReturnStatus = userInfoStr; }
}
try
{
this.Username = uid;
}
catch { this.ReturnStatus = userInfoStr; }
try
{
this.Price =0;
}
catch { }
try
{
this.SMSCharacterCount =70;
}
catch { }
try
{
this.Signatures = "";
}
catch { }
try
{
this.VoiceMessagingPrice = 0;
}
catch { }
try
{
this.FaxMessagingPrice =0;
}
catch { }
try
{
this.MMSPrice =0;
}
catch { }
}
}
private string _SourceString = "";
///
/// 源字符串
///
public string SourceString
{
get { return _SourceString; }
set { _SourceString = value; }
}
private string _Username="";
private string _Balance="";
private decimal _Price=0m;
private int _SMSCharacterCount=0;
private string _Signatures="";
private decimal _VoiceMessagingPrice=0m;
private decimal _FaxMessagingPrice=0m;
private decimal _MMSPrice = 0m;
private string _OwnedOperators = "北京漫道(备用)";
string _ReturnStatus="";
///
/// 返回状态
///
public string ReturnStatus
{
get { return _ReturnStatus; }
set { _ReturnStatus = value; }
}
///
///用户名
///
public string Username
{
get { return _Username; }
set { _Username = value; }
}
///
///余额
///
public string Balance
{
get { return _Balance; }
set { _Balance = value; }
}
///
///单价
///
public decimal Price
{
get { return _Price; }
set { _Price = value; }
}
///
///短信字符数
///
public int SMSCharacterCount
{
get { return _SMSCharacterCount; }
set { _SMSCharacterCount = value; }
}
///
///签名
///
public string Signatures
{
get {
return _Signatures; }
set { _Signatures = value; }
}
///
///语音短信单价
///
public decimal VoiceMessagingPrice
{
get { return _VoiceMessagingPrice; }
set { _VoiceMessagingPrice = value; }
}
///
/// 传真短信单价
///
public decimal FaxMessagingPrice
{
get { return _FaxMessagingPrice; }
set { _FaxMessagingPrice = value; }
}
///
///彩信单价
///
public decimal MMSPrice
{
get { return _MMSPrice; }
set { _MMSPrice = value; }
}
///
///所属经营商
///
public string OwnedOperators
{
get { return _OwnedOperators; }
set { _OwnedOperators = value; }
}
}
}