コード例 #1
0
        public void SaveDocumentText(BusinessDocumentTextDto text)
        {
            if (text.BusinessId < 1)
            {
                throw new ValidationException(ErrorFactory.CreateAndLogError(Errors.SRVEX30123, GetMethodName(), additionalDescriptionParameters: new object[]{ text.BusinessId}));
            }

            var customText = DataTransferObjectsConverter.ConvertToBusinessCustomText(text);

            businessManager.SaveDocumentText(customText);
        }
コード例 #2
0
 /// <summary>
 /// Convert BusinessCustomTextDto to Business.BusinessCustomText
 /// </summary>
 /// <param name="text">BusinessCustomTextDto object</param>
 /// <returns>Business.BusinessCustomText object</returns>
 public static BusinessDocumentText ConvertToBusinessCustomText(BusinessDocumentTextDto text)
 {
     return text != null
                ? new BusinessDocumentText
                {
                    BusinessId = text.BusinessId,
                    Cancellation = text.Cancellation,
                    Confirmation = text.Confirmation,
                    GuestRegistration = text.GuestRegistration,
                    Invoice = text.Invoice,
                    CultureCode = text.CultureCode
                }
                : null;
 }