/// <summary> ///From SectionTranslation Request to SectionTranslation Request pivot. /// </summary> /// <param name="sectionTranslationRequest"></param> /// <returns>SectionTranslation Request pivot result.</returns> public static SectionTranslationRequestPivot ToPivot(this SectionTranslationRequest sectionTranslationRequest) { return(new SectionTranslationRequestPivot() { SectionTranslationPivot = sectionTranslationRequest.SectionTranslationDto?.ToPivot(), SectionTranslationPivotList = sectionTranslationRequest.SectionTranslationDtoList.ToPivotList(), FindSectionTranslationPivot = Utility.EnumToEnum <FindSectionTranslationDto, FindSectionTranslationPivot>(sectionTranslationRequest .FindSectionTranslationDto) }); }
/// <summary> /// Change SectionTranslation informations. /// </summary> /// <param name="request">sectionTranslation request.</param> /// <returns>SectionTranslation message.</returns> public SectionTranslationMessage UpdateSectionTranslation(SectionTranslationRequest request) { SectionTranslationMessage message = new SectionTranslationMessage(); try { _serviceSectionTranslation.UpdateSectionTranslation(request.ToPivot()); message.OperationSuccess = true; } catch (Exception e) { message.ErrorType = ErrorType.TechnicalError; message.ErrorMessage = e.Message; } return(message); }