public static int vc_GetAllNewsByThreadIdTotalPage(int ThreadID) { string __CacheName = "vc_GetAllNewsByThreadId_" + ThreadID.ToString(); DataTable __result = (DataTable)HttpContext.Current.Cache[__CacheName]; ; if (__result == null) { using (Cafef_DAL.MainDB __db = new Cafef_DAL.MainDB()) { __result = __db.StoredProcedures.vc_GetAllNewsByThreadIdTotalPage(ThreadID); if (__result != null && __result.Rows.Count > 0) { int totalR = int.Parse(__result.Rows[0][0].ToString()); return (Int32)Math.Ceiling((Decimal)totalR / 15); } } } return 0; }
public static DataTable vc_GetAllNewsByThreadId_Paging(int ThreadID, int StartIndex, int PageSize) { string __CacheName = "vc_GetAllNewsByThreadId_" + ThreadID.ToString(); DataTable __result = (DataTable)HttpContext.Current.Cache[__CacheName]; ; if (__result == null) { using (Cafef_DAL.MainDB __db = new Cafef_DAL.MainDB()) { __result = __db.StoredProcedures.vc_GetAllNewsByThreadId_Paging(ThreadID, StartIndex, PageSize); } } return __result; }