diff --git a/CitySunlight.v12.suo b/CitySunlight.v12.suo index 070edc1..083ccd6 100644 Binary files a/CitySunlight.v12.suo and b/CitySunlight.v12.suo differ diff --git a/CitySunlight/Admin.aspx.cs b/CitySunlight/Admin.aspx.cs index 5a42102..f0d84fa 100644 --- a/CitySunlight/Admin.aspx.cs +++ b/CitySunlight/Admin.aspx.cs @@ -13,7 +13,7 @@ namespace CitySunlight { int pages = HttpUtils.getQueryString("pages").ToInt(); public String user; - const int peritems = 5; + const decimal peritems = 5; protected void Page_Load(object sender, EventArgs e) { if (Session["username"] == null) @@ -26,7 +26,7 @@ namespace CitySunlight public String GetProductInfo() { String html = ""; - DataTable items = ProductManager.SearchProduct(user, "", "", "", "", pages, peritems); + DataTable items = ProductManager.SearchProduct(user, "", "", "", "", pages, peritems.ToString().ToInt()); if (items.Rows.Count == 0) return "数据库中未找到产品"; else @@ -45,8 +45,8 @@ namespace CitySunlight String delete = "删除"; html += HttpUtils.addTds(ProductManager.NameToUrl(id, name), picurl, price, amount, classname, edit, delete); } - decimal total = ProductManager.SearchProduct(user, "", "", "", "").Rows.Count / peritems; - int totalpages = (int)(Math.Ceiling(total)); + decimal allproduct = ProductManager.SearchProduct(user, "", "", "", "").Rows.Count; + decimal totalpages = Math.Ceiling(allproduct / peritems); String allpage = "