Exemple #1
0
        /// <summary>
        /// 登记接收报告
        /// </summary>
        /// <param name="res">传入参数</param>
        private void WriteReportLog(reportMessageRes res)
        {
            string        subStat    = res.subStat;
            string        subStatDes = res.subStatDes;
            List <string> rs         = new List <string>();

            if (res.resDetail == null)
            {
                rs.Add("\t--  res.resDetail == null");
            }
            else
            {
                foreach (reportMessageResDetail r in res.resDetail)
                {
                    rs.Add(string.Format("【smsId】:{0}|【phoneNumber】:{1}|【stat】:{2}|【statDes】:{3}|【ToString()】:{4}", r.smsId, r.phoneNumber, r.stat, r.statDes, r.ToString()));
                }
            }

            txtResult.Text += "【接收报告】--------------【" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss.fff") + "】---------------" + br + "【subStat】:" + subStat + br + "【subStatDes】:" + subStatDes + br;
            foreach (string str in rs)
            {
                txtResult.AppendText(str + br);
            }

            /* 文本框光标滚动到底端 */
            txtResult.ScrollToCaret();
        }
Exemple #2
0
        /// <summary>
        /// 接收报告
        /// </summary>
        private void btnGetReport_Click(object sender, EventArgs e)
        {
            /* 执行接收 */
            SmsOperatorClient soc = new SmsOperatorClient();
            reportMessageRes  res = soc.getReport(_account, _pwd);

            /* 写记录 */
            WriteReportLog(res);
        }