Beispiel #1
0
        public static object GetBondMarketOptions(SessionInfo sessioninfo)
        {
            try
            {
                LookupBusiness _lookupBusiness = new LookupBusiness();
                //Get data from database
                var bondMarkets     = _lookupBusiness.GetBondMarketAll().Select(c => new { DisplayText = c.LABEL, Value = c.ID.ToString() }).OrderBy(p => p.DisplayText);
                var bondMarketsList = bondMarkets.ToList();

                bondMarketsList.Insert(0, new { DisplayText = "Please select...", Value = string.Empty });
                //Return result to jTable
                return(new { Result = "OK", Options = bondMarketsList });
            }
            catch (Exception ex)
            {
                return(new { Result = "ERROR", Message = ex.Message });
            }
        }
Beispiel #2
0
        public static object GetBondMarketOptions(SessionInfo sessioninfo)
        {
            try
            {
                LookupBusiness _lookupBusiness = new LookupBusiness();
                //Get data from database
                var bondMarkets = _lookupBusiness.GetBondMarketAll().Select(c => new { DisplayText = c.LABEL, Value = c.ID.ToString() }).OrderBy(p => p.DisplayText);
                var bondMarketsList = bondMarkets.ToList();

                bondMarketsList.Insert(0, new { DisplayText = "Please select...", Value = string.Empty });
                //Return result to jTable
                return new { Result = "OK", Options = bondMarketsList };
            }
            catch (Exception ex)
            {
                return new { Result = "ERROR", Message = ex.Message };
            }
        }