コード例 #1
0
        public GetWorkOrderNumberForHeatResponseDto GetWorkOrderNumberHeat()
        {
            GetWorkOrderNumberForHeatResponseDto response = new GetWorkOrderNumberForHeatResponseDto();

            try
            {
                response = rWorkOrderProvider.GetWorkOrderNumberHeat();
                response.ServiceResponseStatus = 1;
            }
            catch (SSException applicationException)
            {
                response = new GetWorkOrderNumberForHeatResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorMessage          = applicationException.Message,
                    ErrorCode             = applicationException.ExceptionCode
                };
            }
            catch (Exception exception)
            {
                response = new GetWorkOrderNumberForHeatResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorCode             = ExceptionAttributes.ExceptionCodes.InternalServerError,
                    ErrorMessage          = exception.Message
                };
            }

            return(response);
        }
コード例 #2
0
        public GetWorkOrderNumberForHeatResponseDto GetWorkOrderNumberHeat()
        {
            var response = new GetWorkOrderNumberForHeatResponseDto()
            {
                getWorkOrderNumberHeatDetails = new List <GetWorkOrderNumberHeatResponseModel>()
            };
            var responseDto = new GetWorkOrderNumberForHeatResponseDto();
            var model       = workOrderTypeRepository.GetWorkOrderNumberHeat();

            if (model != null)
            {
                responseDto = WorkOrderNumberHeatMapper((List <GetWorkOrderNumberHeatModelQM>)model.getWorkOrderNumberHeatDetails, response);
            }
            return(response);
        }
コード例 #3
0
        private GetWorkOrderNumberForHeatResponseDto WorkOrderNumberHeatMapper(List <GetWorkOrderNumberHeatModelQM> list, GetWorkOrderNumberForHeatResponseDto response)
        {
            Mapper.CreateMap <GetWorkOrderNumberHeatModelQM, GetWorkOrderNumberHeatResponseModel>();
            response.getWorkOrderNumberHeatDetails =
                Mapper.Map <List <GetWorkOrderNumberHeatModelQM>, List <GetWorkOrderNumberHeatResponseModel> >(list);

            return(response);
        }