//public List<Goods> goodsList { get; set; } //GoodsService goodsService=new GoodsService(); protected void Page_Load(object sender, EventArgs e) { //sgname = Request.Form["sgname"]; BigClassService bigclassService = new BigClassService(); CarService addorderService = new CarService(); TagService tagService = new TagService(); BigClassList = bigclassService.GetModelList(""); CarList = addorderService.GetModelList(""); TagList = tagService.GetModelList(""); Car carer = new Car(); int?userid = carer.account; if (Session["userList"] == null) { count = addorderService.GetRecordCount("carstatus='" + 1 + "'"); } else { userid = ((User)Session["userList"]).uid; count = addorderService.GetRecordCount("carstatus='" + 1 + "' and account='" + userid + "'"); } if (count > 0) { count = count; } else { count = 0; } }
protected void show(object sender, EventArgs e) { int pageNumber = 1; if (!Int32.TryParse(Request["page"], out pageNumber)) { pageNumber = 1; } int maxPage = 0; int recordCount = smallclassService.GetRecordCount(""); if (recordCount % smallclassService.pageCount == 0) { maxPage = recordCount / smallclassService.pageCount; } else { maxPage = recordCount / smallclassService.pageCount + 1; } smallclassList = smallclassService.FindAllSmall(pageNumber); BigClass bigclass = new BigClass(); bigclassList = bigclassService.GetModelList(""); foreach (SmallClass smallclass in smallclassList) { smallclass.BigClassName = bigclassService.GetModel(smallclass.bigid).bigname; } pageCode = PageUtil.genPagination("/admin/SmallManger.aspx", recordCount, pageNumber, smallclassService.pageCount, ""); }
} //最近浏览 protected void Page_Load(object sender, EventArgs e) { BigClassService bigclassService = new BigClassService(); SmallClassService smallclassService = new SmallClassService(); GoodsService goodsService = new GoodsService(); BigClassList = bigclassService.GetModelList(""); foreach (BigClass bigclass in BigClassList) { bigclass.SmallClassList = smallclassService.GetModelList("bigid = " + bigclass.bigid); } }
protected void show(object sender, EventArgs e) { BigClass bigclass = new BigClass(); bigclassList = bigclassService.GetModelList(""); }