/// <summary>
 /// From SectionParagraphTraslation Request to SectionParagraphTraslation Request pivot.
 /// </summary>
 /// <param name="request"></param>
 /// <returns>SectionParagraphTraslation Request pivot result.</returns>
 public static SectionParagraphTranslationRequestPivot ToPivot(this SectionParagraphTranslationRequest request)
 {
     return(new SectionParagraphTranslationRequestPivot
     {
         FindSectionParagraphTranslationPivot = Utility.EnumToEnum <FindSectionParagraphTranslationDto, FindSectionParagraphTranslationPivot>(request.FindSectionParagraphTranslationDto),
         SectionParagraphTranslationPivotList = request.SectionParagraphTranslationDtoList?.ToPivotList(),
         SectionParagraphTranslationPivot = request.SectionParagraphTranslationDto?.ToPivot(),
     });
 }
示例#2
0
        /// <summary>
        /// Change SectionParagraphTraslation informations.
        /// </summary>
        /// <param name="request">sectionParagraphTraslation request.</param>
        /// <returns>SectionParagraphTraslation message.</returns>
        public SectionParagraphTranslationMessage UpdateSectionParagraphTranslation(SectionParagraphTranslationRequest request)
        {
            SectionParagraphTranslationMessage message = new SectionParagraphTranslationMessage();

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