Ejemplo n.º 1
0
        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 });
            }
        }
Ejemplo n.º 2
0
        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 };
            }
        }