public AddInstrumentMasterResponseDto AddInstrumentMaster(AddInstrumentMasterRequestDto addInstrumentMasterRequestDto) { AddInstrumentMasterResponseDto addInstrumentMasterResponseDto; try { addInstrumentMasterResponseDto = bInstrumentMasterProvider.AddInstrumentMaster(addInstrumentMasterRequestDto); addInstrumentMasterResponseDto.ServiceResponseStatus = 1; } catch (SSException applicationException) { addInstrumentMasterResponseDto = new AddInstrumentMasterResponseDto { ServiceResponseStatus = 0, ErrorMessage = applicationException.Message, ErrorCode = applicationException.ExceptionCode }; } catch (Exception exception) { addInstrumentMasterResponseDto = new AddInstrumentMasterResponseDto { ServiceResponseStatus = 0, ErrorCode = ExceptionAttributes.ExceptionCodes.InternalServerError, ErrorMessage = exception.Message }; } return(addInstrumentMasterResponseDto); }
public AddInstrumentMasterResponseDto AddInstrumentMaster(AddInstrumentMasterRequestDto addInstrumentMasterRequestDto) { var cModel = new AddInstrumentMasterCM() { InstrumentName = addInstrumentMasterRequestDto.InstrumentName, AddedDate = addInstrumentMasterRequestDto.AddedDate, Make = addInstrumentMasterRequestDto.Make, Range = addInstrumentMasterRequestDto.Range, Accuracy = addInstrumentMasterRequestDto.Accuracy, Serial = addInstrumentMasterRequestDto.Serial, CalibratedDate = addInstrumentMasterRequestDto.CalibratedDate, Frequency = addInstrumentMasterRequestDto.Frequency, CalibrationDueDate = addInstrumentMasterRequestDto.CalibrationDueDate, VendorCode = addInstrumentMasterRequestDto.VendorCode }; var response = instrumentMastersRepository.AddInstrumentMaster(cModel); return(new AddInstrumentMasterResponseDto()); }