Exemple #1
0
        /// <summary>
        /// Change ActivityTranslation informations.
        /// </summary>
        /// <param name="request">activityTranslation request.</param>
        /// <returns>ActivityTranslation message.</returns>
        public ActivityTranslationMessage UpdateActivityTranslation(ActivityTranslationRequest request)
        {
            ActivityTranslationMessage message = new ActivityTranslationMessage();

            try
            {
                request.FindActivityTranslationDto = FindActivityTranslationDto.ActivityTranslationId;
                ActivityTranslationResponsePivot response = _serviceActivityTranslation.FindActivityTranslations(request.ToPivot());
                if (response?.ActivityTranslationPivot == null)
                {
                    message.ErrorMessage     = ActivityMessageResource.NotFountTraslation;
                    message.OperationSuccess = false;
                }
                else
                {
                    _serviceActivityTranslation.UpdateActivityTranslation(request.ToPivot());
                    message.OperationSuccess = true;
                }
            }
            catch (Exception e)
            {
                message.ErrorType    = ErrorType.TechnicalError;
                message.ErrorMessage = e.Message;
            }
            return(message);
        }
Exemple #2
0
        /// <summary>
        /// Create new ActivityTranslation
        /// </summary>
        /// <param name="request">activityTranslation request.</param>
        /// <returns>ActivityTranslation message.</returns>
        public ActivityTranslationMessage CreateActivityTranslationRange(ActivityTranslationRequest request)
        {
            ActivityTranslationMessage message = new ActivityTranslationMessage();

            try
            {
                message = _serviceActivityTranslation.CreateActivityTranslationRange(request.ToPivot()).ToMessage();
                message.OperationSuccess = true;
            }
            catch (Exception e)
            {
                message.ErrorType    = ErrorType.TechnicalError;
                message.ErrorMessage = e.Message;
            }
            return(message);
        }