/// <summary> /// 绑定挂牌项目信息 /// </summary> /// <param name="typeid">挂牌项目id</param> /// <param name="tops">前几条信息</param> /// <param name="rep">绑定控件</param> protected void BindGpRep(string typeid) { string strwhere = " 1=1 "; if (typeid == "114") { if (Session["xqstrwhere"] != null) { strwhere = Session["xqstrwhere"].ToString(); } } else { strwhere += " and SupplyOrDemand='" + typeid + "'"; } this.pg.RecordCount = int.Parse(DbHelper.Factory().ExecuteScalar("select count(1) FROM T_SupplyDemand where " + strwhere + "").ToString()); this.pg.PageSize = 20; if (!string.IsNullOrEmpty(hdpage.Value) && hdpage.Value != "1") { pg.CurrentPageIndex = int.Parse(hdpage.Value); } int sindex = (this.pg.CurrentPageIndex - 1) * this.pg.PageSize + 1; int eindex = this.pg.CurrentPageIndex * this.pg.PageSize; DataTable ds = GetListByPage.GetPage("T_SupplyDemand", "id", " " + strwhere + "", "", sindex, eindex); //DataSet ds = bll.GetList(this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, sb.ToString()); this.repxuqiu.DataSource = ds; this.repxuqiu.DataBind(); }
/// <summary> /// 绑定挂牌项目信息 /// </summary> /// <param name="typeid">挂牌项目id</param> /// <param name="tops">前几条信息</param> /// <param name="rep">绑定控件</param> protected void BindGpRep() { string strwhere = " 1=1 "; strwhere += " and ListingStatus='交易完成'"; this.pg.RecordCount = int.Parse(DbHelper.Factory().ExecuteScalar("select count(1) FROM T_ListedProject where " + strwhere + "").ToString()); this.pg.PageSize = 20; if (!string.IsNullOrEmpty(hdpage.Value) && hdpage.Value != "1") { pg.CurrentPageIndex = int.Parse(hdpage.Value); } int sindex = (this.pg.CurrentPageIndex - 1) * this.pg.PageSize + 1; int eindex = this.pg.CurrentPageIndex * this.pg.PageSize; DataTable ds = GetListByPage.GetPage("T_ListedProject", "id", " " + strwhere + "", "", sindex, eindex); //DataSet ds = bll.GetList(this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, sb.ToString()); this.rep1.DataSource = ds; this.rep1.DataBind(); }
protected void Bind() { DataTable dt = new DataTable(); dt = DbHelper.Factory().ExecuteDataTable("select * from T_BusinessConsulting where BusinessType='0'"); string strwhere = " BusinessType='0' and BusinsessState='1' "; this.pg.RecordCount = int.Parse(DbHelper.Factory().ExecuteScalar("select count(1) FROM T_BusinessConsulting where " + strwhere + "").ToString()); this.pg.PageSize = 5; if (!string.IsNullOrEmpty(hdpage.Value) && hdpage.Value != "1") { pg.CurrentPageIndex = int.Parse(hdpage.Value); } int sindex = (this.pg.CurrentPageIndex - 1) * this.pg.PageSize + 1; int eindex = this.pg.CurrentPageIndex * this.pg.PageSize; DataTable ds = GetListByPage.GetPage("T_BusinessConsulting", "id", " " + strwhere + "", "", sindex, eindex); this.repgongying.DataSource = ds; this.repgongying.DataBind(); }