public ActionResult List(string search, int limit, string sortname, int pageNumber, string order) { Paging <Product> _pagingCustomer = new Paging <Product>(); if (pageNumber > 0) { _pagingCustomer.PageIndex = (int)pageNumber; } else { _pagingCustomer.PageIndex = 1; } if (limit > 0) { _pagingCustomer.PageSize = (int)limit; } else { _pagingCustomer.PageSize = 10; } string listwhat = "list_except_unpub"; var _paging = _productmanager.FindPageList(_pagingCustomer, search, listwhat, _pagingCustomer.PageIndex, _pagingCustomer.PageSize, sortname, order); return(Json(new { total = _paging.TotalNumber, rows = _paging.Items })); }