60 lines
1.7 KiB
C#
60 lines
1.7 KiB
C#
using SuperMap.RealEstate.WeiXinExtend;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace WeiXin.WebSite
|
|
{
|
|
public partial class Manager : SuperMap.RealEstate.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
SetControlClientAction(ButtonLogin);
|
|
SetControlClientAction(ButtonSend);
|
|
}
|
|
}
|
|
|
|
protected void ButtonLogin_Click(object sender, EventArgs e)
|
|
{
|
|
string name = TextBoxEx_UserName.Text;
|
|
string pass = TextBoxEx_PassWord.Text;
|
|
|
|
if (WeiXinHelper.ExecLogin(name, pass))
|
|
{
|
|
Alert("登陆成功");
|
|
MessageBar.Visible = true;
|
|
}
|
|
else
|
|
{
|
|
Alert("登陆失败");
|
|
MessageBar.Visible = false;
|
|
}
|
|
}
|
|
|
|
protected void ButtonSend_Click(object sender, EventArgs e)
|
|
{
|
|
string message = TextBoxEx_Content.Text.ToString() + DateTime.Now.ToLongTimeString();
|
|
|
|
ArrayList facid = WeiXinHelper.GetFakeidList();
|
|
Int32 number = facid.Count;
|
|
ResultList.InnerHtml = "";
|
|
for (int i = 0; i < number; i++)
|
|
{
|
|
if (WeiXinHelper.SendMessage(message, facid[i].ToString()))
|
|
{
|
|
ResultList.InnerHtml += facid[i].ToString() + "ok<br />";
|
|
}
|
|
else
|
|
{
|
|
ResultList.InnerHtml += facid[i].ToString() + "ok<br />";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |