public override void DataBind() { List <WeiXinResponse> list = WeiXinProxy.GetAllResponse(); rptResponse.DataSource = list; rptResponse.DataBind(); }
protected void btnAdv_Click(object sender, EventArgs e) { int y = 0; string id = ""; for (int i = 0; i < this.GVAdvertise.Rows.Count; i++) { CheckBox chk = (CheckBox)this.GVAdvertise.Rows[i].FindControl("cbox"); if (chk.Checked == true) { id += chk.ToolTip + ","; y++; } } if (y <= 0) { this.Label5.Text = "请勾选后在进行发布"; return; } if (y > 10) { this.Label5.Text = "勾选发布广告不允许超过10条"; return; } string ids = id.Substring(0, id.Length - 1); List <string> list = WeiXinProxy.GetAdvertseList(ids); IWeiXinAdvertService iwx = new WeiXinAdvertService(); string str = iwx.SendArticleToAll(list); }
public override void DataBind() { List <WeiXinAdvertse> list = WeiXinProxy.GetAllAdvertise(); GVAdvertise.DataSource = list; GVAdvertise.DataBind(); }
protected void btnBIn_Click(object sender, EventArgs e) { if (ddlType.SelectedValue == "-1") { lbltxt.Text = "请选择一个分类"; return; } if (txttext.Text.Trim() == "") { lbltxt.Text = "输入内容不能为空"; return; } if (Request.QueryString["id"] != null) { AMS_UserInfo userinfo = Session["Login"] as AMS_UserInfo; WeiXinResponse wxr = new WeiXinResponse { AddDateTime = DateTime.Now, IsUsed = 1, LoginID = new AMS_UserInfo { ID = userinfo.ID }, Text = txttext.Text, Type = Convert.ToInt32(ddlType.SelectedValue) }; wxr.ID = Convert.ToInt32(Request.QueryString["id"]); if (WeiXinProxy.UpdateResponse(wxr)) { Response.Write("<script>alert('修改成功!');window.location.href ='TextsConfig.aspx'</script>"); } else { lbltxt.Text = "修改失败"; } } else { AMS_UserInfo userinfo = Session["Login"] as AMS_UserInfo; WeiXinResponse wxr = new WeiXinResponse { AddDateTime = DateTime.Now, IsUsed = 1, LoginID = new AMS_UserInfo { ID = userinfo.ID }, Text = txttext.Text, Type = Convert.ToInt32(ddlType.SelectedValue) }; WeiXinProxy.UpResponstype(wxr.Type); if (WeiXinProxy.AddResponse(wxr)) { Response.Write("<script>window.location.href ='TextsConfig.aspx'</script>"); } else { lbltxt.Text = "添加失败"; } } DataBind(); }
protected void delete(object sender, CommandEventArgs e) { string ID = e.CommandArgument.ToString(); WeiXinProxy.DeleResponse(int.Parse(ID)); DataBind(); //删除动作 }
protected void Page_Load(object sender, EventArgs e) { this.UserSchoolInfo = null; if (!IsPostBack) { BindSelSchool(); if (Request.QueryString["WXID"] != null) { BindStuData(Request.QueryString["WXID"]); } } if (Request.QueryString["WXID"] == null) { divcontent.Style.Add("display", "block"); divstuInfo.Style.Add("display", "none"); divSuccess.Style.Add("display", "none"); return; } cmd = Request.Form["subCmd"]; //通过页面验证,执行登录操作 if (cmd == "Login") { WeiXinUsers user = new WeiXinUsers(); UserInfo users = new UserInfo(); string schoolId = selSchool.Items[selSchool.SelectedIndex].Value; if (schoolId == "-1") { spanWarmInfo.Visible = true; spanWarmInfo.InnerText = string.Format("请选择学校"); } users.LoginId = txt_LoginID.Value; users.Password = txt_Password.Value; if (loginHandle(users, schoolId)) { user.WeixinID = Request.QueryString["WXID"].ToString(); user.CardNo = txt_LoginID.Value; user.SchoolInfo = new AMS.Model.AMS_School() { Id = Convert.ToInt32(schoolId) }; spanWarmInfo.Visible = true; spanWarmInfo.InnerText = WeiXinProxy.BindUserInfo(user); AMS.Model.AMS_School school = handler.GetSingleSchoolInfo(schoolId); SeatManage.SeatManageComm.CookiesManager.SetCookies(user.CardNo, txt_Password.Value, schoolId); } else { //spanWarmInfo.Visible = true; //spanWarmInfo.InnerText = "账号或密码不正确"; } } else { } }
public override void DataBind() { if (Request.QueryString["id"] != null) { WeiXinResponse type = WeiXinProxy.GetResponseById(Convert.ToInt32(Request.QueryString["id"])); txttext.Text = type.Text; this.ddlType.SelectedValue = type.Type.ToString(); } }
// 关注事件 void service_SubscribeEvent(object sender, WeiXinMessageBase arge) { string WeixinTxt = WeiXinProxy.GetResponse(EnumReplyMsgType.Subscribe); WeiXinTextMsg TexXml = new WeiXinTextMsg(); TexXml.FromUserName = arge.ToUserName; TexXml.ToUserName = arge.FromUserName; TexXml.MsgType = EnumWeiXinMsgType.Text; TexXml.Content = WeixinTxt; context.Response.Write(TexXml.ToXML()); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; int type = Convert.ToInt32(context.Request.Form["types"]); EnumReplyMsgType MsgType = new EnumReplyMsgType(); MsgType = (EnumReplyMsgType)type; string types = WeiXinProxy.GetResponse(MsgType); string sss = ""; context.Response.Write(types); }
public override void DataBind() { if (Request.QueryString["id"] != null) { WeiXinAdvertse model = WeiXinProxy.GetAdvertseById(Convert.ToInt32(Request.QueryString["id"])); txtTitle.Text = model.Title; txtURl.Text = model.Url; preview.Src = model.Image; preview.Style.Add("display", "block"); preview.Width = 90; preview.Height = 90; } }
//接收消息 void service_ReceiveMsgEvent(object sender, WeiXinMessageBase arge) { string WeixinTxt = ""; switch (arge.MsgType) { case WeiXinJK.Model.EnumWeiXinMsgType.Text: WeixinTransfer WXXml = new WeixinTransfer(); WXXml.ToUserName = arge.FromUserName; WXXml.FromUserName = arge.ToUserName; WXXml.MsgType = EnumWeiXinMsgType.transfer_customer_service; context.Response.Write(WXXml.ToXML()); break; case WeiXinJK.Model.EnumWeiXinMsgType.Image: WeixinTxt = WeiXinProxy.GetResponse(EnumReplyMsgType.ImgAutoReply); break; case WeiXinJK.Model.EnumWeiXinMsgType.Voice: case WeiXinJK.Model.EnumWeiXinMsgType.Video: WeixinTxt = WeiXinProxy.GetResponse(EnumReplyMsgType.VideoAutoReply); break; case WeiXinJK.Model.EnumWeiXinMsgType.Location: WeixinTxt = WeiXinProxy.GetResponse(EnumReplyMsgType.LocationAutoReply); break; case WeiXinJK.Model.EnumWeiXinMsgType.Link: WeixinTxt = WeiXinProxy.GetResponse(EnumReplyMsgType.LinkAutoReply); break; default: WeixinTxt = "哦!太博大精深了。但是我看不懂!!!"; break; } if (WeixinTxt != "") { WeiXinTextMsg TexXml = new WeiXinTextMsg(); TexXml.ToUserName = arge.FromUserName; TexXml.FromUserName = arge.ToUserName; TexXml.MsgType = EnumWeiXinMsgType.Text; TexXml.Content = WeixinTxt; context.Response.Write(TexXml.ToXML()); } }
private void BindStuData(string uid) { try { WeiXinUsers user = WeiXinProxy.GetWeiXinUser(uid); if (user != null) { tcpHandler = new TcpClient_BespeakSeatAllMethod(user.SchoolInfo); this.LoginUserInfo = (tcpHandler as TcpClient_BespeakSeatAllMethod).GetReaderInfoByCardNofalse(user.CardNo, user.SchoolInfo); this.lblMyName.InnerText = LoginUserInfo.Name; this.lblMyStuCode.InnerText = LoginUserInfo.CardNo; this.lblmySchool.InnerText = user.SchoolInfo.Name; this.txt_LoginID.Value = LoginUserInfo.CardNo; foreach (ListItem li in selSchool.Items) { if (li.Value == user.SchoolInfo.Id.ToString()) { li.Selected = true; break; } } divcontent.Style.Add("display", "none"); divstuInfo.Style.Add("display", "block"); divSuccess.Style.Add("display", "none"); } else { divcontent.Style.Add("display", "block"); divstuInfo.Style.Add("display", "none"); divSuccess.Style.Add("display", "none"); } } catch (Exception EX) { divcontent.Style.Add("display", "block"); divstuInfo.Style.Add("display", "none"); divSuccess.Style.Add("display", "none"); spanWarmInfo.Visible = true; spanWarmInfo.InnerText = string.Format(EX.Message); } }
private void BindStuData(string uid) { try { WeiXinUsers user = WeiXinProxy.GetWeiXinUser(uid); if (user != null) { LoginUserInfo = weiXinSercive.GetReaderInfo(user.CardNo, user.SchoolInfo.Number); lblMyName.InnerText = LoginUserInfo.Name; lblMyStuCode.InnerText = LoginUserInfo.StudentNo; lblmySchool.InnerText = user.SchoolInfo.Name; txt_LoginID.Value = LoginUserInfo.StudentNo; foreach (ListItem li in selSchool.Items) { if (li.Value == user.SchoolInfo.Id.ToString()) { li.Selected = true; break; } } divcontent.Style.Add("display", "none"); divstuInfo.Style.Add("display", "block"); divSuccess.Style.Add("display", "none"); } else { divcontent.Style.Add("display", "block"); divstuInfo.Style.Add("display", "none"); divSuccess.Style.Add("display", "none"); } } catch (Exception EX) { divcontent.Style.Add("display", "block"); divstuInfo.Style.Add("display", "none"); divSuccess.Style.Add("display", "none"); spanWarmInfo.Visible = true; spanWarmInfo.InnerText = string.Format(EX.Message); } }
protected void Button1_Click(object sender, EventArgs e) { AMS_UserInfo userinfo = Session["Login"] as AMS_UserInfo; WeiXinAdvertse model = new WeiXinAdvertse { Title = txtTitle.Text, Url = txtURl.Text, LoginID = new AMS_UserInfo { ID = userinfo.ID }, DateTime = DateTime.Now }; bool fileOK = false; string path = "~/Temp/"; if (FileUpload1.HasFile) { string a = FileUpload1.FileName; String fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower(); if (fileExtension == ".gif") { fileOK = true; } } if (FileUpload1.FileName == "" && Request.QueryString["id"] == null) { this.lbltxt.Text = "请上传图片!"; //this.RegisterStartupScript("错误提示", "<script>alert('图片上传不能等于空');</script>"); return; } if (fileOK) { model.Image = path + FileUpload1.FileName; FileUpload1.SaveAs(Server.MapPath(path) + FileUpload1.FileName); model.ContentXML = AdvertiseToJson(model); } else { if (Request.QueryString["id"] != null) { WeiXinAdvertse josns = WeiXinProxy.GetAdvertseById(Convert.ToInt32(Request.QueryString["id"])); josns.Title = model.Title; josns.Url = model.Url; model.ContentXML = AdvertiseToJson(josns); } } if (Request.QueryString["id"] != null) { model.ID = Convert.ToInt32(Request.QueryString["id"]); WeiXinProxy.UpdateAdvertise(model); Response.Write("<script>window.location.href ='AdvertiseFrom.aspx'</script>"); } else { if (WeiXinProxy.SaveAdvertise(model)) { Response.Write("<script>window.location.href ='AdvertiseFrom.aspx'</script>"); } else { this.lbltxt.Text = "添加失败"; //this.RegisterStartupScript("添加提示", "<script>alert('添加失败');</script>"); } } }
//取消关注事件 void service_UnSubscribeEvent(object sender, WeiXinMessageBase arge) { string WeixinTxt = WeiXinProxy.DeleteBind(arge.FromUserName); }
//菜单点击 void service_MenuClickEvent(object sender, WeixinEventMsg arge) { WeiXinUsers user = WeiXinProxy.GetWeiXinUser(arge.FromUserName); //获取用户信息 WeiXinTextMsg responseTxt = new WeiXinTextMsg(); //要回复的信息 responseTxt.MsgType = EnumWeiXinMsgType.Text; responseTxt.FromUserName = arge.ToUserName; responseTxt.ToUserName = arge.FromUserName; string domain = ConfigurationManager.AppSettings["Domain"]; string pocketdomain = ConfigurationManager.AppSettings["PocketDomain"]; IMainFunctionPageBll mainFunctionBll = null; if (user == null)//连接地址未填写 { context.Response.Flush(); context.Response.Close(); WeiXinAdvertse ad = new WeiXinAdvertse(); ad.Title = "绑定学号"; ad.Image = domain + "/Images/Bd.jpg"; ad.Url = domain + "/BindUsers.aspx? WXID=" + arge.FromUserName; ad.Description = "请先绑定学号"; //------------------------------------------------- ad.ContentXML = WeiXinJsonArticle.AdvertiseToJson(ad); //------------------------------------------------- List <WeiXinAdvertse> lw = new List <WeiXinAdvertse>(); lw.Add(ad); ads.SendArticleMessage(arge.FromUserName, lw); return; } WeiXinJK.Model.WexinEventClickMenu click = (WeiXinJK.Model.WexinEventClickMenu)arge; string resultValue = ""; switch (click.EventKey) { case EnumMenuKey.GetMyInfo: break; case WeiXinJK.Model.EnumMenuKey.BindWeiXinId: //修改绑定*******修改绑定连接未实现 #region 修改绑定 context.Response.Flush(); context.Response.Close(); WeiXinAdvertse ad = new WeiXinAdvertse(); ad.Title = "我的资料"; ad.Image = domain + "/Images/Bd.jpg"; ad.Url = domain + "/BindUsers.aspx?WXID=" + click.FromUserName; ad.Description = "点击查看我的资料"; //--------------------------------------------------- ad.ContentXML = WeiXinJsonArticle.AdvertiseToJson(ad); //--------------------------------------------------- List <WeiXinAdvertse> lw = new List <WeiXinAdvertse>(); lw.Add(ad); ads.SendArticleMessage(arge.FromUserName, lw); #endregion break; case WeiXinJK.Model.EnumMenuKey.FreeSeat: //释放座位 #region 释放座位 lock (lockObject) { mainFunctionBll = new TcpClient_BespeakSeatAllMethod(user.SchoolInfo); try { resultValue = mainFunctionBll.FreeSeat(user.SchoolInfo, new ReaderInfo() { CardNo = user.CardNo }); } catch (Exception ex) { resultValue = ex.Message; } finally { (mainFunctionBll as TcpClient_BespeakSeatAllMethod).Dispose(); } } responseTxt.Content = resultValue; context.Response.Write(responseTxt.ToXML()); #endregion break; case WeiXinJK.Model.EnumMenuKey.GetBespeakLog: //获取预约记录预留接口 #region 查看预约信息 List <BespeakLogInfo> li = new List <BespeakLogInfo>(); lock (lockObject) { try { Loghandler = new TcpClient_BespeakSeatAllMethod(user.SchoolInfo); li = Loghandler.GetBookLogs(user.SchoolInfo, user.CardNo, null, 7); (Loghandler as TcpClient_BespeakSeatAllMethod).Dispose(); } catch (Exception ex) { responseTxt.Content = "执行出错误,请再次尝试"; context.Response.Write(responseTxt.ToXML()); SeatManage.SeatManageComm.WriteLog.Write(string.Format("获取预约信息失败:{0},异常来自:{1}", ex.Message, ex.Source)); return; } } string content = ""; if (li.Count == 0) { content = "您暂无预约记录!"; } else { content += "以下是您7天内的预约记录:" + Environment.NewLine; //content += "地点".PadRight(5, ' ') + "座位号".PadRight(8, ' ') + "时间".PadRight(5, ' ') + Environment.NewLine; foreach (BespeakLogInfo log in li) { content += "地点:" + Environment.NewLine; content += log.ReadingRoomName + Environment.NewLine; content += "座位号:" + log.ShortSeatNum + Environment.NewLine; content += "时间:" + log.BsepeakTime.ToString("yy/MM/dd") + Environment.NewLine; } } responseTxt.Content = content; context.Response.Write(responseTxt.ToXML()); #endregion break; case WeiXinJK.Model.EnumMenuKey.GetRoomUsedState: //获取阅览室剩余座位 #region 获取阅览室剩余座位 context.Response.Flush(); context.Response.Close(); Dictionary <string, ReadingRoomSeatUsedState_Ex> dic = new Dictionary <string, ReadingRoomSeatUsedState_Ex>(); lock (lockObject) { mainFunctionBll = new TcpClient_BespeakSeatAllMethod(user.SchoolInfo); try { dic = mainFunctionBll.GetAllRoomSeatUsedState(user.SchoolInfo); } catch (Exception ex) { ads.SendTxtMessage(responseTxt.ToUserName, "执行出错误,请再次尝试。"); SeatManage.SeatManageComm.WriteLog.Write(string.Format("获取可用座位数失败:{0},异常来自:{1}", ex.Message, ex.Source)); } finally { (mainFunctionBll as TcpClient_BespeakSeatAllMethod).Dispose(); } } StringBuilder strtxt = new StringBuilder(); foreach (ReadingRoomSeatUsedState_Ex seatUsedState in dic.Values) { strtxt.Append(string.Format("{0}:{1}/{2}(已用/总共)", seatUsedState.ReadingRoom.Name, seatUsedState.SeatAmountUsed.ToString(), seatUsedState.SeatAmountAll.ToString()) + Environment.NewLine); } ads.SendTxtMessage(responseTxt.ToUserName, strtxt.ToString()); #endregion break; case WeiXinJK.Model.EnumMenuKey.ShortLeave: //设置暂离 #region 设置暂离 lock (lockObject) { mainFunctionBll = new TcpClient_BespeakSeatAllMethod(user.SchoolInfo); try { resultValue = mainFunctionBll.SetShortLeave(user.SchoolInfo, new ReaderInfo() { CardNo = user.CardNo }); responseTxt.Content = resultValue; } catch (Exception ex) { responseTxt.Content = ex.Message; } finally { (mainFunctionBll as TcpClient_BespeakSeatAllMethod).Dispose(); } } context.Response.Write(responseTxt.ToXML()); #endregion break; case WeiXinJK.Model.EnumMenuKey.ReserveSeat: #region 预约座位 #endregion break; case EnumMenuKey.BlackList: #region 黑名单 #endregion break; case EnumMenuKey.GetReaderState: #region 读者状态 ReaderInfo readerIn = new ReaderInfo(); lock (lockObject) { try { mainFunctionBll = new TcpClient_BespeakSeatAllMethod(user.SchoolInfo); readerIn = mainFunctionBll.GetReaderInfo(user.SchoolInfo, user.CardNo); } catch { responseTxt.Content = "执行出错误,请再次尝试"; context.Response.Write(responseTxt.ToXML()); } finally { (mainFunctionBll as TcpClient_BespeakSeatAllMethod).Dispose(); } } string state = ""; if (readerIn.EnterOutLog == null) { state = "Leave"; } else { state = readerIn.EnterOutLog.EnterOutState.ToString(); } if (readerIn.BespeakLog.Count > 0) { state = "Booking"; } string message = ""; switch (state) { case "SelectSeat": case "ComeBack": case "ContinuedTime": case "WaitingSuccess": case "BookingConfirmation": case "ReselectSeat": message = "当前状态:在座"; break; case "Leave": message = ""; break; case "Booking": message = "今天有预约未确认"; break; case "Waiting": message = "您正在等待座位"; break; case "ShortLeave": message = "当前状态:暂离"; break; default: message = ""; SeatManage.SeatManageComm.WriteLog.Write(string.Format("获取到读者信息,读者状态为:", state)); break; } if (readerIn.EnterOutLog != null && readerIn.EnterOutLog.EnterOutState != SeatManage.EnumType.EnterOutLogType.Leave) { string nowMessage = ""; //座位号 readerIn.EnterOutLog.ShortSeatNo; if (message != "") { string seatNo = readerIn.EnterOutLog.ShortSeatNo; nowMessage += string.Format("阅览室:{0}\n座位号:{1}\n学号:{2}\n{3}", readerIn.AtReadingRoom.Name, seatNo, readerIn.CardNo, message); responseTxt.Content = nowMessage; context.Response.Write(responseTxt.ToXML()); } } else { responseTxt.Content = "您当前还没有座位!"; context.Response.Write(responseTxt.ToXML()); } #endregion break; case EnumMenuKey.GetRules: #region 查看规则 #endregion break; case EnumMenuKey.ReservationService: #region 预约多图文 context.Response.Flush(); context.Response.Close(); List <WeiXinAdvertse> ListWeiXin = new List <WeiXinAdvertse>(); WeiXinAdvertse adv = new WeiXinAdvertse(); adv.Title = "更多资讯"; //标题 adv.Image = domain + "/Images/ysgg.jpg"; //图片地址 adv.Url = "http://shanghai.longre.com/"; //访问地址 //------------------------------------------------- adv.ContentXML = WeiXinJsonArticle.AdvertiseToJson(adv); ListWeiXin.Add(adv); //--------------------------------------------------- adv = new WeiXinAdvertse(); adv.Title = "预约座位"; adv.Image = domain + "/Images/yyzw.jpg"; string para = SeatManage.SeatManageComm.AESAlgorithm.DESEncode(string.Format("cardNo={0}&schoolId={1}&operateKey={2}", user.CardNo, user.SchoolInfo.Id, Convert.ToInt32(EnumMenuKey.ReserveSeat))); para = HttpUtility.UrlEncode(para); adv.Url = pocketdomain + "/AutoLogin.aspx?parameters=" + para; adv.ContentXML = WeiXinJsonArticle.AdvertiseToJson(adv); ListWeiXin.Add(adv); //------------------------------------------------------ adv = new WeiXinAdvertse(); adv.Title = "预约记录"; adv.Image = domain + "/Images/yyjl.jpg"; string par = SeatManage.SeatManageComm.AESAlgorithm.DESEncode(string.Format("cardNo={0}&schoolId={1}&operateKey={2}", user.CardNo, user.SchoolInfo.Id, Convert.ToInt32(EnumMenuKey.GetBespeakLog))); par = HttpUtility.UrlEncode(par); adv.Url = pocketdomain + "/AutoLogin.aspx?parameters=" + par; adv.ContentXML = WeiXinJsonArticle.AdvertiseToJson(adv); ListWeiXin.Add(adv); ads.SendArticleMessage(arge.FromUserName, ListWeiXin); break; #endregion case EnumMenuKey.Weather: context.Response.Flush(); context.Response.Close(); WeiXinAdvertse Weathers = new WeiXinAdvertse(); Weathers.Title = "回复城市+天气名可获取输入城市的实况天气\t如:南京天气"; Weathers.Image = domain + "/Images/Bd.jpg"; Weathers.Url = ""; //------------------------------------------------- Weathers.ContentXML = WeiXinJsonArticle.AdvertiseToJson(Weathers); //------------------------------------------------- List <WeiXinAdvertse> ListWeather = new List <WeiXinAdvertse>(); ListWeather.Add(Weathers); ads.SendArticleMessage(arge.FromUserName, ListWeather); break; case EnumMenuKey.Service: WeixinTransfer WXXml = new WeixinTransfer(); WXXml.ToUserName = arge.FromUserName; WXXml.FromUserName = arge.ToUserName; WXXml.MsgType = EnumWeiXinMsgType.transfer_customer_service; context.Response.Write(WXXml.ToXML()); break; case EnumMenuKey.Press: context.Response.Flush(); context.Response.Close(); List <WeiXinAdvertse> ListPress = new List <WeiXinAdvertse>(); WeiXinAdvertse press = new WeiXinAdvertse(); press.Title = "0"; //标题 press.Image = domain + ""; //图片地址 press.Url = ""; //访问地址 //------------------------------------------------- press.ContentXML = WeiXinJsonArticle.AdvertiseToJson(press); ListPress.Add(press); //--------------------------------------------------- press = new WeiXinAdvertse(); press.Title = "1"; press.Image = domain + ""; press.Url = ""; press.ContentXML = WeiXinJsonArticle.AdvertiseToJson(press); ListPress.Add(press); //------------------------------------------------------ press = new WeiXinAdvertse(); press.Title = "2"; press.Image = domain + ""; press.Url = ""; press.ContentXML = WeiXinJsonArticle.AdvertiseToJson(press); ListPress.Add(press); //------------------------------------------------------ press = new WeiXinAdvertse(); press.Title = "3"; press.Image = domain + ""; press.Url = ""; press.ContentXML = WeiXinJsonArticle.AdvertiseToJson(press); ListPress.Add(press); //------------------------------------------------------ press = new WeiXinAdvertse(); press.Title = "4"; press.Image = domain + ""; press.Url = ""; press.ContentXML = WeiXinJsonArticle.AdvertiseToJson(press); ListPress.Add(press); //------------------------------------------------------ press = new WeiXinAdvertse(); press.Title = "4"; press.Image = domain + ""; press.Url = ""; press.ContentXML = WeiXinJsonArticle.AdvertiseToJson(press); ListPress.Add(press); //------------------------------------------------------ ads.SendArticleMessage(arge.FromUserName, ListPress); break; } }
protected void Page_Load(object sender, EventArgs e) { Label1.Text = WeiXinProxy.GetWeather("南京"); }