示例#1
0
        public GetSymbolMasterResponseDto GetSymbolMaster()
        {
            GetSymbolMasterResponseDto getSymbolMasterResponseDto;

            try
            {
                getSymbolMasterResponseDto = rSymbolMasterProvider.GetSymbolMaster();
                getSymbolMasterResponseDto.ServiceResponseStatus = 1;
            }
            catch (SSException applicationException)
            {
                getSymbolMasterResponseDto = new GetSymbolMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorMessage          = applicationException.Message,
                    ErrorCode             = applicationException.ExceptionCode
                };
            }
            catch (Exception exception)
            {
                getSymbolMasterResponseDto = new GetSymbolMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorCode             = ExceptionAttributes.ExceptionCodes.InternalServerError,
                    ErrorMessage          = exception.Message
                };
            }

            return(getSymbolMasterResponseDto);
        }
示例#2
0
        public GetSymbolMasterResponseDto GetSymbolMaster()
        {
            var response = new GetSymbolMasterResponseDto();

            var cModel = new GetSymbolMasterCM()
            {
                //PageIndex = getParameterMasterRequestDto.PageIndex,
                //PageSize = getParameterMasterRequestDto.PageSize,
                //ParameterCode = getParameterMasterRequestDto.ParameterCode
            };

            var model = symbolMasterRepository.GetSymbolMaster();

            if (model != null && model.GetSymbolMasterList.Any())
            {
                response             = OperationMasterMapper((List <SymbolMasterModel>)model.GetSymbolMasterList, response);
                response.RecordCount = model.RecordCount;
            }

            return(response);
        }
示例#3
0
        private static GetSymbolMasterResponseDto OperationMasterMapper(List <SymbolMasterModel> list, GetSymbolMasterResponseDto getSymbolMasterResponseDto)
        {
            Mapper.CreateMap <SymbolMasterModel, SymbolMaster>();
            getSymbolMasterResponseDto.SymbolMasterList =
                Mapper.Map <List <SymbolMasterModel>, List <SymbolMaster> >(list);

            return(getSymbolMasterResponseDto);
        }