using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SMS.cn.woxp.gateway;
using System.IO;
using System.Xml;
namespace SMS
{
/*采用web Service接口实现短信收发
* 本程序适合网关版本v1.0开发
本演示代码由星幻科技提供.如有其它问题请与我们联系.
* 如果发送失败原因与通道有关.可能是由于某些原因导致通道关闭.请切换其它通道使用
* 短信通道发送出现延时比较长.建议切换通道发送.[任何短信网关都会出现短信延时.请谅解]
* -----------------------------------------------------------------
* 本演示代码由[星幻科技 www.woxp.cn]提供,最新接口请登陆会员中心查看
* -----------------------------------------------------------------
*/
public partial class Form1 : Form
{
private cn.woxp.gateway.WebSMS wsms = new SMS.cn.woxp.gateway.WebSMS();
private string strIdentity = "";
public Form1()
{
InitializeComponent();
}
private void label7_Click(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
this.l_money.Text = "0.00";
}
private bool CheckGate()
{
int temp = 0;
if (this.t_eid.Text.ToString().Trim() == "" || this.t_gateid.Text.ToString().Trim() == "" || this.t_pwd.Text.ToString().Trim() == "" || this.t_uid.Text.ToString().Trim() == "")
{
MessageBox.Show("网关参数输入不全!请重新输入", "网关参数配置", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if (!Int32.TryParse(this.t_eid.Text.ToString().Trim(), out temp) || !Int32.TryParse(this.t_gateid.Text.ToString().Trim(),out temp))
{
MessageBox.Show("企业代码或者网关通道ID必须为数字!请重新输入.", "网关参数配置", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
return true;
&nb

这是一个.NET Windows应用程序,通过Web Services接口实现短信的发送和接收。程序首先检查网关参数,然后调用接口获取身份标识串,用于发送和接收短信。发送短信功能支持定时发送,接收短信则将XML响应转换为DataSet展示在数据网格中。
最低0.47元/天 解锁文章
2669

被折叠的 条评论
为什么被折叠?



