public static object GetBondMarketByFilter(SessionInfo sessionInfo, string label, int jtStartIndex, int jtPageSize, string jtSorting) { try { LookupBusiness _lookupbusiness = new LookupBusiness(); //Get data from database List <MA_BOND_MARKET> market = _lookupbusiness.GetBondMarketByFilter(sessionInfo, label, jtSorting); return(new { Result = "OK", Records = jtPageSize > 0 ? market.Skip(jtStartIndex).Take(jtPageSize).ToList() : market, TotalRecordCount = market.Count }); } catch (BusinessWorkflowsException bex) { return(new { Result = "ERROR", Message = bex.Message }); } catch (Exception ex) { return(new { Result = "ERROR", Message = ex.Message }); } }
public static object GetBondMarketByFilter(SessionInfo sessionInfo, string label, int jtStartIndex, int jtPageSize, string jtSorting) { try { LookupBusiness _lookupbusiness = new LookupBusiness(); //Get data from database List<MA_BOND_MARKET> market = _lookupbusiness.GetBondMarketByFilter(sessionInfo, label, jtSorting); return new { Result = "OK", Records = jtPageSize > 0 ? market.Skip(jtStartIndex).Take(jtPageSize).ToList() : market, TotalRecordCount = market.Count }; } catch (BusinessWorkflowsException bex) { return new { Result = "ERROR", Message = bex.Message }; } catch (Exception ex) { return new { Result = "ERROR", Message = ex.Message }; } }