protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Model.wx_userweixin weixin = GetWeiXinCode(); int wid = weixin.id; BLL.wx_message_setting gbll = new BLL.wx_message_setting(); DataSet dr = gbll.GetList(wid); if (dr.Tables[0].Rows.Count > 0) { this.title.Text = dr.Tables[0].Rows[0]["title"].ToString(); // this.adminOpenid.Text = dr.Tables[0].Rows[0]["adminOpenid"].ToString(); this.picurl.Text = dr.Tables[0].Rows[0]["picUrl"].ToString(); this.needSH.SelectedValue = dr.Tables[0].Rows[0]["needSH"].ToString(); hidId.Value = dr.Tables[0].Rows[0]["id"].ToString(); } } }
private void RptBind(string _strWhere, string _orderby) { Model.wx_userweixin weixin = GetWeiXinCode(); //判断是否已经设置了微留言基本信息 BLL.wx_message_setting sbll = new BLL.wx_message_setting(); DataSet ds_s= sbll.GetList(weixin.id); if (ds_s.Tables[0].Rows.Count > 0) { litwUrl.Text = MyCommFun.getWebSite() + "/weixin/message/index.aspx?wid=" + weixin.id; } else { litwUrl.Text = "设置完基本信息后,就自动生成网址"; } _strWhere = "wId=" + weixin.id + " " + _strWhere; this.page = MXRequest.GetQueryInt("page", 1); txtKeywords.Text = this.keywords; DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); // DataSet ds = gbll.GetList( _strWhere); 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]; } ds.AcceptChanges(); } this.rptList.DataSource = ds; this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("message_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
private void RptBind(string _strWhere, string _orderby) { Model.wx_userweixin weixin = GetWeiXinCode(); //判断是否已经设置了微留言基本信息 BLL.wx_message_setting sbll = new BLL.wx_message_setting(); DataSet ds_s = sbll.GetList(weixin.id); if (ds_s.Tables[0].Rows.Count > 0) { litwUrl.Text = MyCommFun.getWebSite() + "/weixin/message/index.aspx?wid=" + weixin.id; } else { litwUrl.Text = "设置完基本信息后,就自动生成网址"; } _strWhere = "wId=" + weixin.id + " " + _strWhere; this.page = MXRequest.GetQueryInt("page", 1); txtKeywords.Text = this.keywords; DataSet ds = gbll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); // DataSet ds = gbll.GetList( _strWhere); 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]; } ds.AcceptChanges(); } this.rptList.DataSource = ds; this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("message_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Model.wx_userweixin weixin = GetWeiXinCode(); int wid = weixin.id; BLL.wx_message_setting gbll = new BLL.wx_message_setting(); DataSet dr= gbll.GetList(wid); if (dr.Tables[0].Rows.Count > 0) { this.title.Text = dr.Tables[0].Rows[0]["title"].ToString(); // this.adminOpenid.Text = dr.Tables[0].Rows[0]["adminOpenid"].ToString(); this.picurl.Text = dr.Tables[0].Rows[0]["picUrl"].ToString(); this.needSH.SelectedValue = dr.Tables[0].Rows[0]["needSH"].ToString(); hidId.Value = dr.Tables[0].Rows[0]["id"].ToString(); } } }