public AddMaterialMasterResponseDto AddMaterialMaster(AddMaterialMasterRequestDto addMaterialMasterRequestDto)
        {
            AddMaterialMasterResponseDto addMaterialMasterResponseDto;

            try
            {
                addMaterialMasterResponseDto = bMaterialMasterProvider.AddMaterialMaster(addMaterialMasterRequestDto);
                addMaterialMasterResponseDto.ServiceResponseStatus = 1;
            }
            catch (SSException applicationException)
            {
                addMaterialMasterResponseDto = new AddMaterialMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorMessage          = applicationException.Message,
                    ErrorCode             = applicationException.ExceptionCode
                };
            }
            catch (Exception exception)
            {
                addMaterialMasterResponseDto = new AddMaterialMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorCode             = ExceptionAttributes.ExceptionCodes.InternalServerError,
                    ErrorMessage          = exception.Message
                };
            }

            return(addMaterialMasterResponseDto);
        }
Example #2
0
        public AddMaterialMasterResponseDto AddMaterialMaster(AddMaterialMasterRequestDto addMaterialMasterRequestDto)
        {
            AddMaterialMasterResponseDto addMaterialMasterResponseDto = new AddMaterialMasterResponseDto();

            var cModel = new AddMaterialMasterCM
            {
                MaterialDescription      = addMaterialMasterRequestDto.MaterialDescription,
                MaterialShortDescription = addMaterialMasterRequestDto.MaterialShortDescription
            };

            var response = materialMasterRepository.AddMaterialMaster(cModel);

            return(new AddMaterialMasterResponseDto());
        }