/// <summary> /// 绑定信息 /// </summary> private void BindInfo() { //搜索控件 MyTitle.Value = Request.QueryString["title"]; bll_adGroup.BindDropDownList(GroupId, Request.QueryString["gid"], "--广告组--"); WebUtility.BindHtmlSelectByBool(Enabled, "--状态--", "上线", "下线", Request.QueryString["enab"]); //组合查询条件 List <SqlWhere> sqlWhereList = new List <SqlWhere>(); sqlWhereList.Add(new SqlWhere(AdGroupModel.PKID, SqlWhere.Oper.Join, AdFixedModel.GROUPID)); sqlWhereList.Add(new SqlWhere(AdGroupModel.INBUILT, SqlWhere.Oper.Equal, true)); sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, Request.QueryString["gid"])); sqlWhereList.Add(new SqlWhere(AdFixedModel.TITLE, SqlWhere.Oper.Like, Request.QueryString["title"])); sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"])); //读取分页数据 int iRecordsTotal = bll_adFixed.DoCount(sqlWhereList); QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true); pagination.HAlign = QianZhu.Utility.Pagination.Align.Right; Paging.InnerHtml = pagination.Show(); List <AdFixedModel> adFixedList = bll_adFixed.GetList(pagination.PageIndex, iPageSize, sqlWhereList); //绑定 if (adFixedList.Count == 0) { NoDataRow.Visible = true; } Repeater1.DataSource = adFixedList; Repeater1.DataBind(); }
/// <summary> /// 绑定信息 /// </summary> private void BindInfo() { bll_adGroup.BindDropDownList(GroupId, adFixed.GroupId.ToString(), "--广告组--"); if (adFixed.Pkid > 0) { myhead = "编辑"; MyTitle.Value = adFixed.Title; URL.Value = adFixed.Url; Pic.Value = adFixed.Pic; Thumb.Value = adFixed.Thumb; Notes.Value = adFixed.Notes; Sort.Value = adFixed.ISort.ToString(); } else { myhead = "新增"; } }