public AddPartMasterResponseDto AddPartMaster(AddPartMasterRequestDto addPartMasterRequestDto) { AddPartMasterResponseDto addPartMasterResponseDto; try { addPartMasterResponseDto = bPartMasterProvider.AddPartMaster(addPartMasterRequestDto); addPartMasterResponseDto.ServiceResponseStatus = 1; } catch (SSException applicationException) { addPartMasterResponseDto = new AddPartMasterResponseDto { ServiceResponseStatus = 0, ErrorMessage = applicationException.Message, ErrorCode = applicationException.ExceptionCode }; } catch (Exception exception) { addPartMasterResponseDto = new AddPartMasterResponseDto { ServiceResponseStatus = 0, ErrorCode = ExceptionAttributes.ExceptionCodes.InternalServerError, ErrorMessage = exception.Message }; } return(addPartMasterResponseDto); }
public AddPartMasterResponseDto AddPartMaster(AddPartMasterRequestDto addPartMasterRequestDto) { var cModel = new AddPartMasterCM { Description = addPartMasterRequestDto.Description, DrawingNumber = addPartMasterRequestDto.DrawingNumber, DrawingUnit = addPartMasterRequestDto.DrawingUnit, DrawingNumberRevision = addPartMasterRequestDto.DrawingNumberRevision, FinishWeight = addPartMasterRequestDto.FinishWeight, ItemCode = addPartMasterRequestDto.ItemCode, MaterialCode = addPartMasterRequestDto.MaterialCode, RatePiece = addPartMasterRequestDto.RatePiece, RawWeight = addPartMasterRequestDto.RawWeight, VendorCode = addPartMasterRequestDto.VendorCode }; var response = partMasterRepository.AddPartMaster(cModel); return(new AddPartMasterResponseDto()); }