private void BindProduct() { int currPage = WebUnitily.CheckInt(Request["p"]); //获取所请求页的索引 if (currPage == 0) { currPage = 1; } L_PageList p1 = new L_PageList(); p1.Currpage = currPage; p1.PageSize = 15; //获取分页的用户控件 pList8517.CurPage = currPage; p1.TableName = "Product"; p1.PKey = "productID"; p1.FieldList = "productID,productName,categoryName,productImage,currentPrice,menberPrice,danwei,productStore,remainDay,addTime,isPost,isCommend"; // p1.Conditon = " and isPost=1"; p1.OrderBy = " addTime Desc"; TableUpDateFieldsInfo tb = new TableUpDateFieldsInfo(); DataSet dsSet = tb.GetPageList(p1); if (dsSet.Tables.Count > 0) { if (dsSet.Tables[0].Rows.Count > 0) { gvProduct.DataSource = dsSet.Tables[0]; gvProduct.DataKeyNames = new string[] { "ProductID" }; gvProduct.DataBind(); pList8517.TotalPage = int.Parse(tb.PageCount.ToString()); } else { gvProduct.DataBind(); } } else { gvProduct.DataBind(); } }
private void BindIndexyifahuo() { StringBuilder sb = new StringBuilder(); int currPage = WebUnitily.CheckInt(Request["p"]); if (currPage == 0) { currPage = 1; } L_PageList pl = new L_PageList(); pl.Currpage = currPage; pl.PageSize = 15; plist8571.CurPage = currPage; pl.TableName = "(OrderList as a Left Join (Select orderID,sum(memberPrice*BugNum*DisCount) as PriceTotal,sum(freign) as freightTotal From OrderDeTail Group by orderID) as b on b.orderID=a.orderID) "; pl.PKey = "a.orderID "; pl.FieldList = "a.orderID,a.userID,isNew,orderState,acceptName,acceptAddr,handSet,tel,zipCode,orderTime,ISNULL(b.priceTotal,0) as priceTotal,ISNULL(b.freightTotal,0) as freightTotal "; pl.Conditon = "and orderState=30 "; pl.OrderBy = "orderTime Desc "; longyuan_TableUpDateFieldsInfo tb = new longyuan_TableUpDateFieldsInfo(); DataSet set = tb.GetPageList(pl); if (set.Tables.Count > 0) { if (set.Tables[0].Rows.Count > 0) { gvBindyifahuo.DataSource = set.Tables[0]; gvBindyifahuo.DataKeyNames = new string[] { "orderID" }; gvBindyifahuo.DataBind(); } else { gvBindyifahuo.DataBind(); } } else { gvBindyifahuo.DataBind(); } }
private void bindClassList() { StringBuilder sb = new StringBuilder(); int currpage = WebUnitily.CheckInt(Request["p"]); if (currpage == 0) { currpage = 1; } L_PageList pl = new L_PageList(); pl.Currpage = currpage; pl.PageSize = 10; plList8531.CurPage = currpage; pl.TableName = "Product "; pl.PKey = "productID "; pl.FieldList = "productID,ProductName,ProductImage,Price,CurrentPrice,MenberPrice,Danwei,RemainDay,AddTime,LinkQQId,LinkQQName "; pl.OrderBy = " AddTime Desc "; TableUpDateFieldsInfo tb = new TableUpDateFieldsInfo(); DataSet set = tb.GetPageList(pl); if (set.Tables.Count > 0) { if (set.Tables[0].Rows.Count > 0) { rpDataList.DataSource = set.Tables[0]; rpDataList.DataBind(); plList8531.TotalPage = int.Parse(tb.PageCount.ToString()); } else { rpDataList.DataBind(); } } else { rpDataList.DataBind(); } }
private void BindHelpInfo() { int currPage = WebUnitily.CheckInt(Request["p"]); if (currPage == 0) { currPage = 1; } L_PageList pl = new L_PageList(); pl.Currpage = currPage; pl.PageSize = 10; pList8517.CurPage = currPage; pl.TableName = "ShopHelp"; pl.PKey = "helpID"; pl.FieldList = "helpID,helpTitle,classID,className,helpContent,postTime,isPost"; pl.OrderBy = "postTime desc"; longyuan_TableUpDateFieldsInfo tb = new longyuan_TableUpDateFieldsInfo(); DataSet dsSet = tb.GetPageList(pl); if (dsSet.Tables.Count > 0) { if (dsSet.Tables[0].Rows.Count > 0) { gvHelpInfo.DataSource = dsSet.Tables[0]; gvHelpInfo.DataKeyNames = new string[] { "helpID" }; gvHelpInfo.DataBind(); pList8517.TotalPage = Int32.Parse(tb.PageCount.ToString()); } else { gvHelpInfo.DataBind(); } } else { gvHelpInfo.DataBind(); } }
public DataSet GetPageList(L_PageList pl) //获取分页信息 { SqlParameter[] para = new SqlParameter[11]; para[0] = new SqlParameter("@TableName", pl.TableName); para[1] = new SqlParameter("@PKey", pl.PKey); para[2] = new SqlParameter("@FieldList", pl.FieldList); para[3] = new SqlParameter("@Condition", pl.Conditon); para[4] = new SqlParameter("@OrderBy", pl.OrderBy); para[5] = new SqlParameter("@Sql", pl.Sql); para[6] = new SqlParameter("@SqlGetRC", pl.SqlGetRc); para[7] = new SqlParameter("@CurrPage", pl.Currpage); para[8] = new SqlParameter("@PageSize", pl.PageSize); para[9] = new SqlParameter("@RecordCount", pl.RecordCount); para[10] = new SqlParameter("@result", SqlDbType.Int); para[10].Direction = ParameterDirection.Output; DataSet set = SqlHelper.ExecuteDateSet(CommandType.StoredProcedure, "p_PageList", para); _recordcount = int.Parse(set.Tables[1].Rows[0]["RecordCount"].ToString()); _pagecount = int.Parse(set.Tables[1].Rows[0]["PageCount"].ToString()); return(set); }
private void BindBulletin() { int currPage = WebUnitily.CheckInt(Request["p"]); if (currPage == 0) { currPage = 1; } L_PageList pl = new L_PageList(); pl.Currpage = currPage; pl.PageSize = 2; pList8517.CurPage = currPage; pl.TableName = "Bulletin"; pl.PKey = "ID"; pl.FieldList = "ID,bulletinTitle,bulletinContent,isPost,orderNum,postTime"; pl.OrderBy = "postTime desc"; TableUpDateFieldsInfo tb = new TableUpDateFieldsInfo(); DataSet Dset = tb.GetPageList(pl); if (Dset.Tables.Count > 0) { if (Dset.Tables[0].Rows.Count > 0) { gvBulletin.DataSource = Dset.Tables[0]; gvBulletin.DataKeyNames = new string[] { "ID" }; gvBulletin.DataBind(); pList8517.TotalPage = int.Parse(tb.PageCount.ToString()); } else { gvBulletin.DataBind(); } } }
public DataSet GetPageList(L_PageList pl) { return(shop.GetPageList(pl)); }