以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]移动Openmas短信发送该怎么写代码  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=30236)

--  作者:浙江仔
--  发布时间:2013/3/23 14:30:00
--  [求助]移动Openmas短信发送该怎么写代码

最近单位的移动短信平台开通了二次开发的账号,但是我看了说明,主要是C#,asp等语言,如:

短信发送示例

图片点击可在新窗口打开查看CopyC#
using OpenMas;

public void main()
{

    string Text = "你好";
    string[] destinationAddresses = new String[] { "139********" };



    //发送短信(立即发送)
    string gateWayId = SendMms(Text, destinationAddresses);

    //发送短信(定时发送)
    DateTime ExpectDateTime = DateTime.Now.AddHours(1);
    gateWayId = SendMms(Text, destinationAddresses,ExpectDateTime);

   //具体业务信息,包括保存彩信ID等
   //...
}


public string SendSms(string Message,string[] destinationAddresses)
{
    string Url = "http://***.***.***.***:9080/OpenMasService";
    Sms Client = new Sms(Url);
    string externcode = "0101"; //自定义扩展代码(模块)
    string ApplicationID = "DefaultApplication";
    string Password = "";
    //发送短信(立即发送)
    return Client.SendMessage(destinationAddresses, Message, externcode, ApplicationID, Password);            
}


public string SendSms(string Message,string[] destinationAddresses,DateTime ExpectDateTime)
{
    string Url = "http://***.***.***.***:9080/OpenMasService";
    Sms Client = new Sms(Url);
    string externcode = "0101"; //自定义扩展代码(模块)
    string ApplicationID = "DefaultApplication";
    string Password = "";
    //发送短信(定时发送)
    return Client.SendMessage(destinationAddresses, Message, externcode, ApplicationID, Password,ExpectDateTime);            
}
 
 
不知道用在狐表里面改怎么写代码?谢谢帮忙哦
 

--  作者:浙江仔
--  发布时间:2013/3/23 15:17:00
--  
编程基础薄弱啊,亟待大神帮忙啊! 帖子可不要沉了啊
--  作者:浙江仔
--  发布时间:2013/3/24 11:45:00
--  
顶起
--  作者:sgs
--  发布时间:2013/3/24 20:23:00
--  
需要引用这个dll吧
--  作者:浙江仔
--  发布时间:2013/3/24 21:20:00
--  
以下是引用sgs在2013-3-24 20:23:00的发言:
需要引用这个dll吧

有dll的,苦于不会用啊