private void LoadDocument() { categoryLogic = new CategoryModel(); dataPaging.CurrentPage = CurrentPage; dataPaging.TotalRecord = categoryLogic.CountDocumentInCategory(CategoryID); int StartRowIndex = (CurrentPage * dataPaging.PageSize) - (dataPaging.PageSize - 1) - 1; int Amount = dataPaging.PageSize; CacheProcess cacheProcess = new CacheProcess(); String CacheName = CategoryAlias + "_CacheData"; bool IsCurrentCategoryCached = Cache[String.Format("{0}_Part{1}", CacheName, CurrentPage)] != null; Hashtable lstCachedData = cacheProcess.FragmentDataCache("BusinessLogicLayer.DocumentModel", CacheName, 15, CurrentPage, StartRowIndex, Amount, dataPaging.TotalPage, "GetDocumentByCategoryID", new Object[] { CategoryID }, IsCurrentCategoryCached); lstDocument.DataSource = lstCachedData[String.Format("{0}_Part{1}", CacheName, CurrentPage)]; lstDocument.DataBind(); }
public int CategoryCount(int CategoryID) { categoryLogic = new CategoryModel(); return(categoryLogic.CountDocumentInCategory(CategoryID)); }