public static object GetTempLimitByFilter(SessionInfo sessioninfo, string strCountry, string strEffDateFrom, string strEffDateTo , string strExpDateFrom, string strExpDateTo, int jtStartIndex, int jtPageSize, string jtSorting) { try { CountryBusiness _countryBusiness = new CountryBusiness(); //Get data from database List <MA_COUNTRY_LIMIT> limits = _countryBusiness.GetTempLimitByFilter(sessioninfo, strCountry, strEffDateFrom, strEffDateTo , strExpDateFrom, strExpDateTo, jtSorting); //Return result to jTable return(new { Result = "OK", Records = jtPageSize > 0 ? limits.Skip(jtStartIndex).Take(jtPageSize).ToList() : limits, TotalRecordCount = limits.Count }); } catch (BusinessWorkflowsException bex) { return(new { Result = "ERROR", Message = bex.Message }); } catch (Exception ex) { return(new { Result = "ERROR", Message = ex.Message }); } }