private void ShowInfo(int id) { hidid.Value = id.ToString(); Model.wx_dati_base dati = datiBll.GetModel(id); hidid.Value = dati.id.ToString(); //绑定控件的值 txttitle.Text = dati.title.Trim().ToString(); //封面图片 if (dati.headimg != null && dati.headimg.Trim() != "" && dati.headimg.Trim() != "/images/noneimg.jpg") { txtHeadimg.Text = dati.headimg.Trim(); imgbjurl.ImageUrl = dati.headimg.Trim(); } txtsummary.InnerText = dati.summary.Trim(); txtdttime.Text = dati.dttime.ToString().Trim(); rblisshowend.SelectedValue = dati.isshowend == true ? "1" : "0"; txtdxtitle.Text = dati.dxtitle.Trim().ToString(); txtdxgetnum.Text = dati.dxgetnum.ToString(); txtdxscore.Text = dati.dxscore.ToString(); txtbjcolor.Text = dati.bjcolor.Trim(); txtstarttime.Text = dati.starttime.Value.ToString("yyyy-MM-dd HH:mm:ss"); txtendtime.Text = dati.endtime.Value.ToString("yyyy-MM-dd HH:mm:ss"); txtjfval.Text = dati.jfval.ToString(); ddlJFtype.SelectedIndex = (dati.jftype); litwUrl.Text = MyCommFun.getWebSite() + "/weixin/dati/index.aspx?wid=" + dati.wid + "&id=" + id; }
/// <summary> /// 输出最终的html /// </summary> /// <param name="templateFileName"></param> /// <param name="tPath"></param> /// <param name="wid"></param> public void OutPutHtml(string templateFileName) { ////注册一个自定义函数 //this.Document.RegisterGlobalFunction(this.GetNewsUrl); //对VT模板里的config变量赋值 Model.siteconfig config = new BLL.siteconfig().loadConfig(); string dd = Utils.ObjectToStr(config.webkeyword); this.Document.Variables.SetValue("config", config); this.Document.SetValue("ccright", ccRight); this.Document.SetValue("thisurl", MyCommFun.getTotalUrl()); this.Document.SetValue("yuming", MyCommFun.getWebSite()); string openid = MyCommFun.RequestOpenid(); this.Document.SetValue("openid", openid); this.Document.Variables.SetValue("this", this); if (tType == TemplateType.Class) { //如果为列表页面 ArticleClassPage(); } if (tType == TemplateType.News) { ArticleDetailPage(); } if (tType == TemplateType.Channel) { ArticleChannelPage(); } //输出最终呈现的数据 this.Document.Render(HttpContext.Current.Response.Output); }
protected void Page_Load(object sender, EventArgs e) { //OAuth2 string thisUrl = MyCommFun.getWebSite() + "/weixin/restaurant/index.aspx" + Request.Url.Query; var bll = new BLL.wx_userweixin(); int widInt = MyCommFun.RequestWid(); Model.wx_userweixin uWeiXinModel = bll.GetModel(widInt); OAuth2BaseProc(uWeiXinModel, "index", thisUrl); this.shopid = string.IsNullOrEmpty(WebHelper.GetQueryString("shopid")) ? 0 : int.Parse(WebHelper.GetQueryString("shopid")); this.openid = string.IsNullOrEmpty(WebHelper.GetQueryString("openid")) ? "loseopenid" : WebHelper.GetQueryString("openid"); this.wid = string.IsNullOrEmpty(WebHelper.GetQueryString("wid")) ? "1" : WebHelper.GetQueryString("wid"); this.title = this.GetTitle(); if (!Page.IsPostBack) { if (this.shopid == 0) { this.hotelName = "无选定商铺"; } else { var shopinfo = new BLL.wx_diancai_shopinfo().GetModel(this.shopid); if (shopinfo == null) { return; } this.hotelName = shopinfo.hotelName; } } }
/// <summary> /// 微房产 /// </summary> /// <param name="id"></param> /// <param name="apiid"></param> /// <param name="openid"></param> /// <returns></returns> private IList <Model.ResponseContentEntity> WXFReponse(int id, int apiid, string openid) { IList <Model.ResponseContentEntity> responselist = new List <Model.ResponseContentEntity>(); Model.ResponseContentEntity responseEntity = new Model.ResponseContentEntity(); responseEntity.id = id; responseEntity.wid = apiid; BLL.wx_fc_floor fcBll = new BLL.wx_fc_floor(); Model.wx_fc_floor actModel = fcBll.GetModel(id); if (actModel == null) { responseEntity.rcType = Model.ReponseContentType.text; responseEntity.rContent = "该房产信息不存在"; } else { responseEntity.rcType = Model.ReponseContentType.txtpic; responseEntity.rContent = actModel.newsTitle; // responseEntity.rContent2 = actModel.pSummary; responseEntity.rContent2 = ""; responseEntity.detailUrl = MyCommFun.getWebSite() + "/weixin/wfangchan/index.aspx?wid=" + apiid + "&fid=" + id; responseEntity.picUrl = actModel.newsCover; } responselist.Add(responseEntity); return(responselist); }
/// <summary> /// 处理语音请求 /// </summary> /// <param name="requestMessage"></param> /// <returns></returns> public IResponseMessageBase GetResponseMessageeMusic(RequestMessageText requestMessage, int Indexid, int wid) { var responseMessage = ResponseMessageBase.CreateFromRequestMessage <ResponseMessageMusic>(requestMessage); RequestRuleContent model_wx = getDataMusicComm(wid, Indexid); if (model_wx == null) { DependencyManager.Resolve <IResponseMessageLogRepository>().Add(wid, requestMessage.FromUserName, requestMessage.MsgType.ToString(), requestMessage.Content, "music", "-1", requestMessage.ToUserName); } else { if (model_wx.MediaUrl.StartsWith("http")) { responseMessage.Music.MusicUrl = model_wx.MediaUrl; } else { responseMessage.Music.MusicUrl = MyCommFun.getWebSite() + model_wx.MediaUrl; } responseMessage.Music.Title = model_wx.RContent; responseMessage.Music.Description = model_wx.RContent2; DependencyManager.Resolve <IResponseMessageLogRepository>().Add(wid, requestMessage.FromUserName, requestMessage.MsgType.ToString(), requestMessage.Content, "music", "音乐链接:" + model_wx.MediaUrl + "|标题:" + model_wx.RContent + "|描述:" + model_wx.RContent2, requestMessage.ToUserName); } return(responseMessage); }
protected void Page_Load(object sender, EventArgs e) { OnlyWeiXinLook(); if (!IsPostBack) { int xid = MyCommFun.RequestInt("xid"); int wid = MyCommFun.RequestInt("wid"); string openid = MyCommFun.RequestOpenid(); if (wid == 0 || openid == "") { MessageBox.Show(this, "参数不正确!"); return; } if (xid > 0 && wid > 0) { BLL.wx_xt_base bll = new BLL.wx_xt_base(); xitie = bll.GetModel(xid); xitie.music = MyCommFun.getWebSite() + xitie.music; this.Title = xitie.wxTitle; BLL.wx_xt_photo pbll = new BLL.wx_xt_photo(); IList <Model.wx_xt_photo> plist = pbll.GetModelList("bId=" + xid); if (plist == null || plist.Count <= 0) { return; } for (int i = 0; i < plist.Count; i++) { photolistStr += "<li class=\"pb_10\"><img src=\"" + plist[i].pUrl + "\" style=\"width: 100%;\"></li>"; } } } }
private void ShowInfo() { Model.wx_userweixin weixin = GetWeiXinCode(); lblWSiteUrl.Text = MyCommFun.getWebSite() + "/shop/index.aspx?wid=" + weixin.id; IList <MxWeiXinPF.Model.wx_shop_setting> modellist = bll.GetModelList("wId=" + weixin.id); if (modellist == null || modellist.Count <= 0) { return; } MxWeiXinPF.Model.wx_shop_setting model = modellist[0]; this.lblId.Text = model.id.ToString(); this.txtshopName.Text = model.shopName; this.txtcopyright.Text = model.copyright; this.txtlogo.Text = model.logo; this.txtbgPic.Text = model.bgPic; this.txttel.Text = model.tel; this.txtaddr.Text = model.addr; //微支付配置信息 lblzfsqml.Text = MyCommFun.getWebSite() + "/api/payment/"; lblzfqqsl.Text = "paypage.aspx"; lblwqtz.Text = MyCommFun.getWebSite() + "/api/payment/wxpay/feedback.aspx"; lbljjtz.Text = MyCommFun.getWebSite() + "/api/payment/wxpay/warning.aspx"; }
private void RptBind(string _strWhere, string _orderby) { Model.wx_userweixin weixin = GetWeiXinCode(); _strWhere = "wid=" + weixin.id + " " + _strWhere; this.page = MXRequest.GetQueryInt("page", 1); txtKeywords.Text = this.keywords; DataSet ds = ptbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { DataRow dr; int count = ds.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { dr = ds.Tables[0].Rows[i]; dr["url"] = MyCommFun.getWebSite() + "/weixin/albums/alubmslist.aspx?wid=" + dr["wid"].ToString() + "&tid=" + dr["id"].ToString(); } ds.AcceptChanges(); } this.rptList.DataSource = ds; this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("typelist.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
private void ShowInfo() { Model.wx_userweixin weixin = GetWeiXinCode(); lblWSiteUrl.Text = MyCommFun.getWebSite() + "/book/index.aspx?wid=" + weixin.id; IList <XCWeiXin.Model.wx_book_setting> modellist = bll.GetModelList("wId=" + weixin.id); if (modellist == null || modellist.Count <= 0) { return; } XCWeiXin.Model.wx_book_setting model = modellist[0]; this.lblId.Text = model.id.ToString(); this.txtbookName.Text = model.bookName; this.txtcopyright.Text = model.copyright; this.txtlogo.Text = model.logo; this.txtbgPic.Text = model.bgPic; this.txttel.Text = model.tel; this.txtaddr.Text = model.addr; //微支付配置信息 lblzfsqml.Text = MyCommFun.getWebSite() + "/api/payment/"; lblzfqqsl.Text = "paypage.aspx"; lblwqtz.Text = MyCommFun.getWebSite() + "/api/payment/wxpay/feedback.aspx"; lbljjtz.Text = MyCommFun.getWebSite() + "/api/payment/wxpay/warning.aspx"; model.albums = new wx_book_albums().GetModelList("booksettingId=" + model.id); rptAlbumList.DataSource = model.albums; rptAlbumList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { OnlyWeiXinLook(); if (!IsPostBack) { wid = MyCommFun.RequestInt("wid"); openid = MyCommFun.RequestOpenid(); aid = MyCommFun.RequestInt("aid"); if (wid == 0 || aid == 0) { MessageBox.Show(this, "参数不正确!"); return; } BLL.wx_albums_info aBll = new BLL.wx_albums_info(); albums = aBll.GetModel(aid); if (albums != null) { if (albums.music != null && albums.music.Trim() != "") { bgMusic = " var audio = new Audio(); audio.src = \"" + MyCommFun.getWebSite() + albums.music.Trim() + "\"; audio.play();"; // bgMusic = " var audio = new Audio(); audio.src = \"http://bcs.duapp.com/baemp3mp3/mp3/138305426164953243.mp3\"; audio.play();"; } } BindPhotoList(); } }
private void RptBind(string _strWhere, string _orderby) { Model.wx_userweixin weixin = GetWeiXinCode(); this.page = MXRequest.GetQueryInt("page", 1); this.txtKeywords.Text = this.keywords; //图表或列表显示 BLL.wx_qp_base bll = new BLL.wx_qp_base(); _strWhere = "wid=" + weixin.id + " and " + _strWhere; DataSet ds = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { DataRow dr; int cout = ds.Tables[0].Rows.Count; for (int i = 0; i < cout; i++) { dr = ds.Tables[0].Rows[i]; dr["link_url"] = "<a href=\"javascript:;\">" + MyCommFun.getWebSite() + "/weixin/qiangpiao/index.aspx?wid=" + MyCommFun.ObjToStr(dr["wid"]) + "&aid=" + dr["id"].ToString() + "</a>"; } ds.AcceptChanges(); } this.rptList1.DataSource = ds; this.rptList1.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("action_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
/// <summary> /// 微汽车 /// </summary> /// <param name="id"></param> /// <param name="apiid"></param> /// <param name="openid"></param> /// <returns></returns> private IList <Model.ResponseContentEntity> WQCReponse(int id, int apiid, string openid) { IList <Model.ResponseContentEntity> responselist = new List <Model.ResponseContentEntity>(); Model.ResponseContentEntity responseEntity = new Model.ResponseContentEntity(); responseEntity.id = id; responseEntity.wid = apiid; BLL.wx_wq_fuhuiSys wqcBll = new BLL.wx_wq_fuhuiSys(); Model.wx_wq_fuhuiSys actModel = wqcBll.GetModel(id); if (actModel == null) { responseEntity.rcType = Model.ReponseContentType.text; responseEntity.rContent = "该汽车信息不存在"; } else { responseEntity.rcType = Model.ReponseContentType.txtpic; responseEntity.rContent = actModel.newstitle; // responseEntity.rContent2 = actModel.pSummary; responseEntity.rContent2 = ""; responseEntity.detailUrl = MyCommFun.getWebSite() + "/weixin/wqiche/index.aspx?wid=" + apiid; responseEntity.picUrl = actModel.titlepic; } responselist.Add(responseEntity); return(responselist); }
/// <summary> /// 模块功能回复【请求为‘事件’类型】 /// </summary> /// <param name="requestMessage"></param> /// <param name="modelFunctionName"></param> /// <param name="modelFunctionId"></param> /// <param name="apiid"></param> /// <returns></returns> public IResponseMessageBase GetModuleResponse(RequestMessageEventBase requestMessage, string modelFunctionName, int modelFunctionId, int apiid) { string openid = requestMessage.FromUserName; string token = ConvertDateTimeInt(DateTime.Now).ToString(); IList <Model.ResponseContentEntity> responselist = new List <Model.ResponseContentEntity>(); responselist = PanDuanMoudle(modelFunctionName, modelFunctionId, openid, apiid); if (responselist == null || responselist.Count <= 0) { var responseMessage = ResponseMessageBase.CreateFromRequestMessage <ResponseMessageText>(requestMessage); responseMessage.Content = "【" + modelFunctionName + "】功能模块未获得到数据"; return(responseMessage); } Model.ReponseContentType responseType = responselist[0].rcType; if (responseType == Model.ReponseContentType.text) { var responseMessage = ResponseMessageBase.CreateFromRequestMessage <ResponseMessageText>(requestMessage); responseMessage.Content = responselist[0].rContent.ToString(); return(responseMessage); } else if (responseType == Model.ReponseContentType.txtpic) { var responseMessage = ResponseMessageBase.CreateFromRequestMessage <ResponseMessageNews>(requestMessage); IList <Article> rArticlelist = new List <Article>(); Article article = new Article(); foreach (Model.ResponseContentEntity response in responselist) { article = new Article(); article.Title = response.rContent; article.Description = response.rContent2; article.Url = getWXApiUrl(response.detailUrl, token, openid) + getWxUrl_suffix(); if (response.picUrl == null || response.picUrl.ToString().Trim() == "") { article.PicUrl = ""; } else { if (!response.picUrl.Contains("http://")) { article.PicUrl = MyCommFun.getWebSite() + response.picUrl; } else { article.PicUrl = response.picUrl; } } rArticlelist.Add(article); } responseMessage.Articles.AddRange(rArticlelist); return(responseMessage); } else { return(null); } }
/// <summary> /// 电影院抢票 /// </summary> /// <param name="id"></param> /// <param name="apiid"></param> /// <param name="openid"></param> /// <returns></returns> private IList <Model.ResponseContentEntity> DDYQPReponse(int id, int apiid, string openid) { IList <Model.ResponseContentEntity> responselist = new List <Model.ResponseContentEntity>(); Model.ResponseContentEntity responseEntity = new Model.ResponseContentEntity(); responseEntity.id = id; responseEntity.wid = apiid; BLL.wx_qp_base ggkActBll = new BLL.wx_qp_base(); Model.wx_qp_base actModel = ggkActBll.GetModel(id); if (actModel.actBegin > DateTime.Now) { //活动尚未开始 responseEntity.rcType = Model.ReponseContentType.text; responseEntity.rContent = "活动【" + actModel.bName + "】将于" + actModel.actBegin + "开始。"; } else if (actModel.actEnd <= DateTime.Now) { //活动结束 responseEntity.rcType = Model.ReponseContentType.text; responseEntity.rContent = "活动已经结束了。"; } else { //活动正在进行中 responseEntity.rcType = Model.ReponseContentType.txtpic; responseEntity.rContent = actModel.bName; responseEntity.rContent2 = ""; responseEntity.detailUrl = MyCommFun.getWebSite() + "/weixin/qiangpiao/index.aspx?wid=" + apiid + "&aid=" + id; responseEntity.picUrl = actModel.beginPic; } responselist.Add(responseEntity); return(responselist); }
private void ShowInfo(int id) { Model.wx_userweixin weixin = GetWeiXinCode(); litUrl.Text = MyCommFun.getWebSite() + "/weixin/ucard/index.aspx?wid=" + weixin.id + "&id=" + id; hidid.Value = id.ToString(); Model.wx_ucard_store store = storeBll.GetModel(id); Model.wx_requestRule rule = rBll.GetModelList("modelFunctionName='会员卡' and modelFunctionId=" + id)[0]; txtKW.Text = rule.reqKeywords; if (store.hfPic != null && store.hfPic.Trim() != "/weixin/ucard/images/ucard_cover.jpg") { txtImgUrl.Text = store.hfPic; imgbeginPic.ImageUrl = store.hfPic; } txtstoreName.Text = store.storeName; if (store.logo != "") { txtLogo.Text = store.logo; } txtcardBrief.Value = store.cardBrief; ddlstoreCatagory.SelectedValue = store.storeCatagory; txttel.Text = store.tel; txtaddr.Text = store.addr; txtconsumePwd.Text = store.consumePwd; txtLatXPoint.Text = store.xPoint == null ? "" : store.xPoint.ToString(); txtLngYPoint.Text = store.yPoint == null ? "" : store.yPoint.ToString(); ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript'> $(\"#baiduframe\").attr(\"src\", \"../lbs/MapSelectPoint.aspx?yjindu=" + store.yPoint.Value.ToString() + "&xweidu=" + store.xPoint.Value.ToString() + "\");</script>"); }
/// <summary> /// 喜帖 /// </summary> /// <param name="id"></param> /// <param name="apiid"></param> /// <param name="openid"></param> /// <returns></returns> private IList <Model.ResponseContentEntity> xitieReponse(int id, int apiid, string openid) { IList <Model.ResponseContentEntity> responselist = new List <Model.ResponseContentEntity>(); Model.ResponseContentEntity responseEntity = new Model.ResponseContentEntity(); responseEntity.id = id; responseEntity.wid = apiid; BLL.wx_xt_base xtBll = new BLL.wx_xt_base(); Model.wx_xt_base actModel = xtBll.GetModel(id); if (actModel.statedate < DateTime.Now) { //活动尚未开始 responseEntity.rcType = Model.ReponseContentType.text; responseEntity.rContent = "【" + actModel.wxTitle + "】将于" + actModel.statedate + "举办,现已经结束"; } else { //活动正在进行中 responseEntity.rcType = Model.ReponseContentType.txtpic; responseEntity.rContent = actModel.wxTitle; responseEntity.rContent2 = actModel.word; responseEntity.detailUrl = MyCommFun.getWebSite() + "/weixin/xitie/index.aspx?wid=" + apiid + "&xid=" + id; responseEntity.picUrl = actModel.fengmian; } responselist.Add(responseEntity); return(responselist); }
private void RptBind(int _channel_id, int _category_id, string _strWhere, string _orderby) { Model.wx_userweixin weixin = GetWeiXinCode(); this.page = MXRequest.GetQueryInt("page", 1); this.txtKeywords.Text = this.keywords; //图表或列表显示 BLL.article bll = new BLL.article(); DataSet ds = bll.GetWCodeList(weixin.id, _channel_id, _category_id, this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { DataRow dr; int cout = ds.Tables[0].Rows.Count; for (int i = 0; i < cout; i++) { dr = ds.Tables[0].Rows[i]; dr["link_url"] = MyCommFun.getWebSite() + "/content.aspx?wid=" + MyCommFun.ObjToStr(dr["wid"]) + "&aid=" + dr["id"].ToString(); } ds.AcceptChanges(); } this.rptList1.DataSource = ds; this.rptList1.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("wx_article_page_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}", _channel_id.ToString(), _category_id.ToString(), this.keywords, this.property, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
protected void Page_Load(object sender, EventArgs e) { int wid = MyCommFun.RequestWid(); int actid = MyCommFun.RequestInt("aid"); string thisUrl = MyCommFun.getWebSite() + "/weixin/cashred/index.aspx?wid=" + wid + "&aid=" + actid; //授权 BLL.wx_userweixin bll = new BLL.wx_userweixin(); Model.wx_userweixin uWeiXinModel = bll.GetModel(wid); OAuth2BaseProc(uWeiXinModel, "index", thisUrl); //授权 end BLL.wx_xjhongbao_action actBll = new BLL.wx_xjhongbao_action(); act = actBll.GetPageHongBaoModel(actid, wid); if (act == null) { litActionRemark.Text = "该时间段没有该活动"; return; } //jssdk this.Title = act.act_name; fxModel.fxImg = MyCommFun.getWebSite() + "" + act.share_imgurl; fxModel.fxTitle = act.act_name; fxModel.fxContent = act.share_content; jssdkInit(uWeiXinModel); //jssdk end ActionBaseInfo(wid); }
private void ShowInfo(int id) { hidid.Value = id.ToString(); Model.wx_pano_jd pano = pBll.GetModel(id); hidid.Value = pano.id.ToString(); txtpName.Text = pano.jdName.ToString(); txtpContent.Value = pano.remark.ToString(); this.txtpName.Text = pano.jdName; this.txtImgBefore.Text = pano.pic_front; imgBefore.ImageUrl = pano.pic_front; this.txtImgRight.Text = pano.pic_right; imgRight.ImageUrl = pano.pic_right; this.txtImgBehond.Text = pano.pic_behind; imgBehond.ImageUrl = pano.pic_behind; this.txtImgLeft.Text = pano.pic_left; imgLeft.ImageUrl = pano.pic_left; this.txtImgTop.Text = pano.pic_top; imgTop.ImageUrl = pano.pic_top; this.txtImgBottom.Text = pano.pic_bottom; imgBottom.ImageUrl = pano.pic_bottom; this.txtpContent.Value = pano.remark; litwUrl.Text = MyCommFun.getWebSite() + "/weixin/pano360/pano.aspx?wid=" + pano.wid + "&id=" + id; }
/// <summary> /// 输出最终的html /// </summary> /// <param name="templateFileName"></param> /// <param name="tPath"></param> /// <param name="wid"></param> public void OutPutHtml(string templateFileName, int wid) { //注册一个自定义函数 this.Document.RegisterGlobalFunction(this.GetNewsUrl); //对VT模板里的config变量赋值 Model.wxcodeconfig wxconfig = tDal.GetModelByWid(wid, "/templates/index/" + templateFileName); //if (wxconfig == null || wxconfig.sitename.Trim() == "") //{1e2124dd04e11d01b9df2865f85944be // HttpContext.Current.Response.Write("请填写【微网站设置】相关信息"); //} //else if (wxconfig.wxstatus == 0) { HttpContext.Current.Response.Write("帐号已过期!请及时充值!"); } this.Document.Variables.SetValue("config", wxconfig); //获得幻灯片列表方法一:缺点无法从模版页面控制记录数量 this.Document.Variables.SetValue("photo", tDal.GetHDPByWid(wid, -1)); this.Document.SetValue("wid", wid); this.Document.SetValue("bottomtype", wxconfig.bmenuTid); this.Document.SetValue("ccright", ccRight); this.Document.SetValue("thisurl", MyCommFun.getTotalUrl()); this.Document.SetValue("yuming", MyCommFun.getWebSite()); string openid = MyCommFun.RequestOpenid(); this.Document.SetValue("openid", openid); this.Document.Variables.SetValue("this", this); if (tType == TemplateType.Index) { //如果为首页页面 this.Document.SetValue("fxTitle", wxconfig.sitename); this.Document.SetValue("fxDesc", wxconfig.wbrief); this.Document.SetValue("fxPic", MyCommFun.ImgAddHttp(wxconfig.bgpic)); } if (tType == TemplateType.Class) { //如果为列表页面 ArticleClassPage(); } if (tType == TemplateType.News) { ArticleDetailPage(); } if (tType == TemplateType.Channel) { CategoryPage(); } //输出最终呈现的数据 this.Document.Render(HttpContext.Current.Response.Output); }
private void ShowInfo() { Model.wx_userweixin weixin = GetWeiXinCode(); lblWSiteUrl.Text = MyCommFun.getWebSite() + "/index.aspx?wid=" + weixin.id; IList <XCWeiXin.Model.wx_wsite_setting> modellist = bll.GetModelList("wId=" + weixin.id); if (modellist == null || modellist.Count <= 0) { return; } XCWeiXin.Model.wx_wsite_setting model = modellist[0]; this.lblsiteId.Text = model.id.ToString(); this.txtwName.Text = model.wName; this.txtcompanyName.Text = model.companyName; this.txtbgMusic.Text = model.bgMusic; this.txtbgPic.Text = model.bgPic; this.txtbgDongHuaId.Text = model.bgDongHuaId.ToString(); this.txtwCopyright.Text = model.wCopyright; this.txtwBrief.Text = model.wBrief; this.txtphone.Text = model.phone; this.txtaddr.Text = model.addr; this.txtaddrUrl.Text = model.addrUrl; this.txtseo_title.Text = model.seo_title; this.txtseo_keywords.Text = model.seo_keywords; this.txtseo_desc.Text = model.seo_desc; //微信回复信息 DataSet ds = rBll.GetRuleContent(1, " modelFunctionName='微网站' and wId=" + weixin.id); if (ds == null || ds.Tables.Count <= 0 || ds.Tables[0].Rows.Count <= 0) { return; } DataRow dr = ds.Tables[0].Rows[0]; lblrId.Text = MyCommFun.ObjToStr(dr["id"], "0"); lblrcId.Text = MyCommFun.ObjToStr(dr["cid"], "0"); txtreqKeywords.Text = MyCommFun.ObjToStr(dr["reqKeywords"]); if (MyCommFun.ObjToStr(dr["isLikeSearch"]) != "") { if (dr["isLikeSearch"].ToString().ToLower() == "false") { this.rblisLikeSearch.SelectedValue = "0"; } else { this.rblisLikeSearch.SelectedValue = "1"; } } txtTitle.Value = MyCommFun.ObjToStr(dr["rContent"]); txtImgUrl.Text = MyCommFun.ObjToStr(dr["picUrl"]); txtContent.InnerText = MyCommFun.ObjToStr(dr["rContent2"]); //lblWSiteUrl.Text = MyCommFun.ObjToStr(dr[""], lblWSiteUrl.Text); }
private string urlRuleReplace(string url) { string newUrl = ""; Model.wx_userweixin weixin = GetWeiXinCode(); newUrl = url.Replace("{wid}", weixin.id.ToString()); newUrl = newUrl.Replace("{yuming}", MyCommFun.getWebSite()); return(newUrl); }
private void ShowInfo(int _id) { Model.wx_userweixin weixin = GetWeiXinCode(); this.lblCxxs.Text = MyCommFun.getWebSite() + "/weixin/wqiche/" + "cxXinshang.aspx?wid=" + weixin.id; this.lblCzgh.Text = MyCommFun.getWebSite() + "/weixin/wqiche/" + "czGuanhuai.aspx?wid=" + weixin.id; this.lblJxcx.Text = MyCommFun.getWebSite() + "/weixin/wqiche/" + "ppList.aspx?wid=" + weixin.id; this.lblSygj.Text = MyCommFun.getWebSite() + "/weixin/wqiche/" + "syGongju.aspx?wid=" + weixin.id; this.lblXsgw.Text = MyCommFun.getWebSite() + "/weixin/wqiche/" + "xiaoshouMgr.aspx?wid=" + weixin.id; this.lblZxyy.Text = MyCommFun.getWebSite() + "/weixin/wqiche/" + "yyBaoyang.aspx?wid=" + weixin.id + "&type=2"; this.lblQjkc.Text = MyCommFun.getWebSite() + "/weixin/wqiche/" + "qjtList.aspx?wid=" + weixin.id; }
protected void Page_Load(object sender, EventArgs e) { this.keywords = MXRequest.GetQueryString("keywords"); this.pageSize = GetPageSize(10); //每页数量 if (!Page.IsPostBack) { yuming = MyCommFun.getWebSite(); RptBind(CombSqlTxt(keywords), "createDate desc,id desc"); } }
protected void Page_Load(object sender, EventArgs e) { base.OnInit(e); if (errInitTemplates != "") { Response.Write(errInitTemplates); return; } //1获得模版基本信息 BLL.wx_module_templates tBll = new BLL.wx_module_templates(); templateFileName = tBll.GetTemplatesFileNameByWid("shop", wid); if (templateFileName == null || templateFileName.Trim() == "") { errInitTemplates = "不存在该帐号或者该帐号尚未设置模版!"; Response.Write(errInitTemplates); Response.End(); return; } //授权 int orderId = MyCommFun.RequestInt("orderid"); BLL.wx_userweixin bll = new BLL.wx_userweixin(); Model.wx_userweixin wxModel = bll.GetModel(wid); string thisUrl = MyCommFun.getWebSite() + "/shop/order_detail.aspx?wid=" + wid + "&orderid=" + orderId; OAuth2BaseProc(wxModel, "order_detail", thisUrl); //授权结束 BLL.wx_shop_user_addr uAddrBll = new BLL.wx_shop_user_addr(); IList <Model.wx_shop_user_addr> uaddrList = uAddrBll.GetOpenidAddr(openid, wid); if (uaddrList == null || uaddrList.Count <= 0 || uaddrList[0].id <= 0) { //该微信用户没有添加地址 Response.Redirect("/shop/editaddr.aspx?wid=" + wid + "&openid=" + openid + "&frompage=confirmOrder.aspx"); // MessageBox.ResponseScript(this, "window.location.href =/shop/editaddr.aspx?wid=" + wid + "&openid=" + openid + "&frompage=confirmOrder.aspx"); return; } serverPath = MyCommFun.GetRootPath() + "/shop/templates/" + templateFileName + "/order_detail.html"; ShopTemplateMgr template = new ShopTemplateMgr("/shop/templates/" + templateFileName, serverPath, wid); template.tType = TemplateType.orderDetail; template.openid = openid; template.OutPutHtml(wid); }
protected void Page_Load(object sender, EventArgs e) { this.keywords = MXRequest.GetQueryString("keywords"); this.pageSize = GetPageSize(10); //每页数量 if (!Page.IsPostBack) { Model.wx_userweixin weixin = GetWeiXinCode(); litUrl.Text = MyCommFun.getWebSite() + "/weixin/ucard/ucardlist.aspx?wid=" + weixin.id; RptBind(CombSqlTxt(keywords), "createDate desc,id desc"); } }
protected void Page_Load(object sender, EventArgs e) { var thisUrl = MyCommFun.getWebSite() + "/weixin/WeChatPay/getopenId.aspx" + Request.Url.Query; var widInt = MyCommFun.RequestWid(); var bll = new BLL.wx_userweixin(); var uWeiXinModel = bll.GetModel(widInt); if (uWeiXinModel == null) { throw new Exception("不合法的参数wid"); } OAuth2BaseProc(uWeiXinModel, "MyOrderCenter", thisUrl); }
protected void Page_Load(object sender, EventArgs e) { this.keywords = MXRequest.GetQueryString("keywords"); this.pageSize = GetPageSize(10); //每页数量 if (!Page.IsPostBack) { Model.wx_userweixin weixin = GetWeiXinCode(); wid = weixin.id; yuming = MyCommFun.getWebSite(); RptBind(CombSqlTxt(keywords), " id desc"); } }
protected void Page_Load(object sender, EventArgs e) { try { _appInfoService = new AppInfoService(); if (CurrentAction == MXEnums.ActionEnum.Edit) { if (!int.TryParse(Request.QueryString["id"] as string, out this.Id)) { JscriptMsg("传输参数不正确!", "back", "Error"); return; } if (!_appInfoService.Exists(this.Id)) { JscriptMsg("记录不存在或已被删除!", "back", "Error"); return; } } else { //添加,则需要判断可以添加的微信号数量 if (IsChaoGuoWxNum()) { return; } } if (!IsPostBack) { txtapiurl.Text = MyCommFun.getWebSite() + "/api/weixin/api.aspx"; // ChkAdminLevel("manager_list", MXEnums.ActionEnum.View.ToString()); //检查权限 //1e2124dd04e11d01b9df2865f85944be var model = GetAdminInfo(); //取得管理员信息 if (this.CurrentAction == MXEnums.ActionEnum.Edit) //修改 { ShowInfo(this.Id); } else { txtEncodingAESKey.Text = Utils.GetLetterOrNumberRandom(43); txtwxToken.Text = Utils.GetLetterOrNumberRandom(10); } } } catch (Exception exception) { JscriptMsg(exception.Message, "back", "Error"); } }
private void ShowInfo(int id) { Model.wx_userweixin weixin = GetWeiXinCode(); lblweixinUrl.Text = MyCommFun.getWebSite() + "/weixin/product/all.aspx?wid=" + weixin.id + "&pid=" + id; MxWeiXinPF.Model.wx_product_sys model = bll.GetModel(id); this.lblId.Text = model.id.ToString(); this.txthdTitle.Text = model.title; this.txtbgPic.Text = model.banner; imgBanner.ImageUrl = model.banner; txtwBrief.Text = model.remark; lblId.Text = id.ToString(); }