private void ShowInfo(int id) { var model = bll.GetModel(id); this.id = model.id; this.txtwxName.Text = model.wxName; this.txtwxId.Text = model.wxId; this.txtweixinCode.Text = model.weixinCode; this.txtImgUrl.Text = model.headerpic; //this.txtapiurl.Text = model.apiurl; this.txtwxToken.Text = model.wxToken; this.txtAppId.Text = model.AppId; this.txtAppSecret.Text = model.AppSecret; txtapiurl.Text = MyCommFun.getWebSite() + "/api/weixin/api.aspx?apiid=" + model.id; //todo: 改地址 this.txtEncodingAESKey.Text = model.extStr; rblweixintype.SelectedValue = model.wxType == null ? "3" : model.wxType.Value.ToString(); }
public bool IsWeiXinCode() { //如果Session为Null if (Session["nowweixin"] != null) { return(true); } else { //检查Cookies string uweixinId = Utils.GetCookie("nowweixinId", "WeiXinPF"); if (uweixinId != "") { var service = new WXUserService(new WXUserRepository()); var model = service.GetModel(int.Parse(uweixinId)); if (model != null) { Session["nowweixin"] = model; return(true); } } } return(false); }
public bool IsWeiXinCode() { //如果Session为Null if (Session["nowweixin"] != null) { return true; } else { //检查Cookies string uweixinId = Utils.GetCookie("nowweixinId", "WeiXinPF"); if (uweixinId != "") { var service = new WXUserService(new WXUserRepository()); var model = service.GetModel(int.Parse(uweixinId)); if (model != null) { Session["nowweixin"] = model; return true; } } } return false; }