コード例 #1
0
        public UpdatePartMasterResponseDto UpdatePartMaster(UpdatePartMasterRequestDto updatePartMasterRequestDto)
        {
            UpdatePartMasterResponseDto updatePartMasterResponseDto;

            try
            {
                updatePartMasterResponseDto = bPartMasterProvider.UpdatePartMaster(updatePartMasterRequestDto);
                updatePartMasterResponseDto.ServiceResponseStatus = 1;
            }
            catch (SSException applicationException)
            {
                updatePartMasterResponseDto = new UpdatePartMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorMessage          = applicationException.Message,
                    ErrorCode             = applicationException.ExceptionCode
                };
            }
            catch (Exception exception)
            {
                updatePartMasterResponseDto = new UpdatePartMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorCode             = ExceptionAttributes.ExceptionCodes.InternalServerError,
                    ErrorMessage          = exception.Message
                };
            }

            return(updatePartMasterResponseDto);
        }
コード例 #2
0
        public UpdatePartMasterResponseDto UpdatePartMaster(UpdatePartMasterRequestDto updatePartMasterRequestDto)
        {
            var cModel = new UpdatePartMasterCM
            {
                Description           = updatePartMasterRequestDto.Description,
                DrawingNumber         = updatePartMasterRequestDto.DrawingNumber,
                DrawingUnit           = updatePartMasterRequestDto.DrawingUnit,
                DrawingNumberRevision = updatePartMasterRequestDto.DrawingNumberRevision,
                FinishWeight          = updatePartMasterRequestDto.FinishWeight,
                ItemCode     = updatePartMasterRequestDto.ItemCode,
                MaterialCode = updatePartMasterRequestDto.MaterialCode,
                RatePiece    = updatePartMasterRequestDto.RatePiece,
                RawWeight    = updatePartMasterRequestDto.RawWeight,
                VendorCode   = updatePartMasterRequestDto.VendorCode,
                PartCode     = updatePartMasterRequestDto.PartCode
            };

            var response = partMasterRepository.UpdatePartMaster(cModel);

            return(new UpdatePartMasterResponseDto());
        }