public WebServiceClient() : base("http://service2.winic.org/Service.asmx") { _smsSetting = ConfigurtaionHelper.Instance.GetAppSettings <SmsSetting> ("sms"); SMSReturnCode rstr = GetUserInfo(); LogHelper.Warn("smsInfo:" + rstr.ReturnString); if (rstr.IsSuccess) { MaxChars = Convert.ToInt32(rstr.ReturnArray[3]); } }
private List <SMSReport> PullSMSReports() { List <SMSReport> list_tmp = new List <SMSReport> (); SMSReturnCode rcode = SMS_Reports(); if (rcode.IsSuccess) { try { string[] tmps = rcode.ReturnString.Split('|'); if (tmps != null) { for (int i = 0; i < tmps.Length; i++) { string tmp = tmps[i]; if (string.IsNullOrWhiteSpace(tmp)) { continue; } string[] tmparr = tmp.Split('/'); if (tmparr.Length == 5) { SMSReport report = new SMSReport() { snum = tmparr[0].Trim(), uid = tmparr[1], phone = tmparr[2], state = tmparr[3], time = DateTime.ParseExact(tmparr[4], "yyyy-M-d H:mm:ss", CultureInfo.InvariantCulture) }; list_tmp.Add(report); } } } } catch (Exception ex) { LogHelper.Warn(rcode.ReturnString); LogHelper.Error("PullSMSReports", ex); } } return(list_tmp); }