// GET: Product public ActionResult Index() { int total = 0; var q = logic.GetProductInfos("4", string.Empty, 1, out total); if (total < 10 && total > 0) { total = 1; } else if (total > 10) { int zc = total / 10; int cy = total % 10; total = zc + (cy > 0 ? 1 : 0); } else { total = 0; } ViewData["searchT"] = "4"; ViewData["searchV"] = string.Empty; ViewData["total"] = total; return(View(q)); }