using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LYFZ.WinicSmsInterface { /// /// 用户查询返回信息 /// public class SmsUserInfo { public SmsUserInfo(string userInfoStr) { this.SourceString = userInfoStr; if (userInfoStr != "") { string[] userInfos = userInfoStr.Split('/'); try { this.ReturnStatus = SendSmsResults.GetResults(userInfos[0]); } catch { this.ReturnStatus = userInfoStr; } try { this.Username = userInfos[1]; } catch { this.ReturnStatus = userInfoStr; } try { this.Balance = userInfos[2]; } catch { } try { this.Price =Convert.ToDecimal(userInfos[3]); } catch { } try { this.SMSCharacterCount =Convert.ToInt32(userInfos[4]); } catch { } try { this.Signatures = userInfos[5]; } catch { } try { this.VoiceMessagingPrice = Convert.ToDecimal(userInfos[6]); } catch { } try { this.FaxMessagingPrice =Convert.ToDecimal(userInfos[7]); } catch { } try { this.MMSPrice = Convert.ToDecimal(userInfos[8]); } catch { } try { this.OwnedOperators =userInfos[9]; } 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 { if (_Signatures.Trim() == "") { _Signatures = "未设置签名"; } 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; } } } }