public ActionResult Customers() { int count = CustomersBLL.GetAll().Count; ViewData["count"] = count; ViewData["MaxPageIndex"] = count % 10 == 0 ? count / 10 : count / 10 + 1; ViewData["PageIndex"] = 1; List <CustomerLevel> levelList = CustomerLevelBLL.GetAll(); ViewData["levelList"] = levelList; ViewData["slist"] = new SelectList(levelList, "CLID", "CLName"); if (TempData["tabIndex"] == null) { TempData["tabIndex"] = 1; } return(View()); }