public UpdateInstrumentMasterResponseDto UpdateInstrumentMaster(UpdateInstrumentMasterRequestDto updateInstrumentMasterRequestDto)
        {
            UpdateInstrumentMasterResponseDto updateInstrumentMasterResponseDto;

            try
            {
                updateInstrumentMasterResponseDto = bInstrumentMasterProvider.UpdateInstrumentMaster(updateInstrumentMasterRequestDto);
                updateInstrumentMasterResponseDto.ServiceResponseStatus = 1;
            }
            catch (SSException applicationException)
            {
                updateInstrumentMasterResponseDto = new UpdateInstrumentMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorMessage          = applicationException.Message,
                    ErrorCode             = applicationException.ExceptionCode
                };
            }
            catch (Exception exception)
            {
                updateInstrumentMasterResponseDto = new UpdateInstrumentMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorCode             = ExceptionAttributes.ExceptionCodes.InternalServerError,
                    ErrorMessage          = exception.Message
                };
            }

            return(updateInstrumentMasterResponseDto);
        }
예제 #2
0
        public UpdateInstrumentMasterResponseDto UpdateInstrumentMaster(UpdateInstrumentMasterRequestDto updateInstrumentMasterRequestDto)
        {
            var cModel = new UpdateInstrumentMasterCM()
            {
                InstrumentName     = updateInstrumentMasterRequestDto.InstrumentName,
                AddedDate          = updateInstrumentMasterRequestDto.AddedDate,
                Make               = updateInstrumentMasterRequestDto.Make,
                Range              = updateInstrumentMasterRequestDto.Range,
                Accuracy           = updateInstrumentMasterRequestDto.Accuracy,
                Serial             = updateInstrumentMasterRequestDto.Serial,
                CalibratedDate     = updateInstrumentMasterRequestDto.CalibratedDate,
                Frequency          = updateInstrumentMasterRequestDto.Frequency,
                CalibrationDueDate = updateInstrumentMasterRequestDto.CalibrationDueDate,
                VendorCode         = updateInstrumentMasterRequestDto.VendorCode,
                InstrumentCode     = updateInstrumentMasterRequestDto.InstrumentCode
            };

            var response = instrumentMastersRepository.UpdateInstrumentMaster(cModel);

            return(new UpdateInstrumentMasterResponseDto());
        }