protected void Page_Load(object sender, EventArgs e) { string flag = Request["flag"]; voteList = voteService.GetModelList(""); NoticeList = noticeService.GetModelList(""); GoodsList = goodsService.GetModelList(""); if ("choice".Equals(flag)) { this.choice(sender, e); } }
protected void Page_Load(object sender, EventArgs e) { //占位标签 SearchBigId = Int32.Parse(Request["SearchBigId"]); BigClassService bigclassService = new BigClassService(); BigClass bigClass = new BigClass(); bigClass = bigclassService.GetModel(SearchBigId); nav = bigClass.bigname; SearchSmallId = Int32.Parse(Request["SearchSmallId"]); if (SearchSmallId > 0) { SmallClassService smallclassService = new SmallClassService(); SmallClass smallClass = new SmallClass(); smallClass = smallclassService.GetModel(SearchSmallId); Code = smallClass.smallname; NoticeService noticeService = new NoticeService(); NoticeList = noticeService.GetModelList(""); //分页 int pageNumber = 1; if (!Int32.TryParse(Request["page"], out pageNumber)) { pageNumber = 1; } GoodsService goodsService = new GoodsService(); //goodsList = goodsService.GetModelList("smallid=" +SearchSmallId); int maxPage = 0; int recordCount = goodsService.GetRecordCount("smallid=" + SearchSmallId); if (recordCount % goodsService.pageCount == 0) { maxPage = recordCount / goodsService.pageCount; } else { maxPage = recordCount / goodsService.pageCount + 1; } if (pageNumber > maxPage) { pageNumber = maxPage; } goodsList = goodsService.FindAllGoodsList(pageNumber, "smallid=" + SearchSmallId); pageCode = PageUtil.genPagination("/goods/GoodsList.aspx", recordCount, pageNumber, goodsService.pageCount, "SearchSmallId=" + SearchSmallId.ToString() + "&SearchBigId=" + SearchBigId); } else { } }
protected void Page_Load(object sender, EventArgs e) { NoticeService noticeService = new NoticeService(); NoticeList = noticeService.GetModelList(""); int pageNumber = 1; if (!Int32.TryParse(Request["page"], out pageNumber)) { pageNumber = 1; } sgname = Request.Form["sgname"]; ArrayList List = goodsService.Getsgname(pageNumber, sgname); goodsList = (List <Goods>)List[0]; pageCode = List[1].ToString(); }