/// <summary> /// set the skip record count, request id and maxfetch record /// </summary> /// <returns></returns> private SkipInfo SetSkipInfo(bool isFetchAll, int maxRecords) { int intMaxRecordPage = 0; /// Get the value from Userpreferences objSkipInfo = new SkipInfo(); objPreferences = new UserPreferences(); objPreferences = (UserPreferences)CommonUtility.GetSessionVariable(Page, enumSessionVariable.UserPreferences.ToString()); if(objPreferences != null) intMaxRecordPage = Convert.ToInt32(objPreferences.RecordsPerPage); if(string.Equals(SearchType.ToString().ToLowerInvariant(), TIMEDEPTHDETAIL) || string.Equals(SearchType.ToString().ToLowerInvariant(), DIRECTIONALSURVEYDETAIL)) { objSkipInfo.MaxFetch = maxRecords.ToString(); objSkipInfo.SkipRecord = "0"; } else { if(strCurrPageNumber.Length > 0) objSkipInfo.SkipRecord = Convert.ToString(Convert.ToInt32(strCurrPageNumber) * intMaxRecordPage); else objSkipInfo.SkipRecord = "0"; if(isFetchAll) { objSkipInfo.MaxFetch = maxRecords.ToString(); } else objSkipInfo.MaxFetch = objPreferences.RecordsPerPage; } return objSkipInfo; }
/// <summary> /// Sets the skip info. /// </summary> /// <param name="objEntity">The obj entity.</param> protected void SetSkipInfo(Entity objEntity) { //Dream 4.0 //start SetPagingParameter(); SkipInfo objSkipInfo = new SkipInfo(); objSkipInfo.SkipRecord = Convert.ToString(((Convert.ToInt32(strPageNumber) - 1) * intRecordsPerPage)); objSkipInfo.MaxFetch = Convert.ToString(intRecordsPerPage * Convert.ToInt32(MAXPAGEVALUE)); objEntity.SkipInfo = objSkipInfo; }
/// <summary> /// Sets the skip info. /// </summary> /// <returns></returns> private SkipInfo SetSkipInfo() { SkipInfo objSkipInfo = new SkipInfo(); objSkipInfo.SkipRecord = intSkipCount.ToString(); objSkipInfo.MaxFetch = intMaxRecord.ToString(); return objSkipInfo; }