/// <summary>
 /// Converts BusinessTaxStatusDto to BusinessTaxStatus
 /// </summary>
 /// <param name="businessTaxStatusDto">Business tax status to convert</param>
 /// <returns>BusinessTaxStatus</returns>
 public static BusinessTaxStatus ConvertBusinessTaxStatusDtoToModel(BusinessTaxStatusDto businessTaxStatusDto)
 {
     return new BusinessTaxStatus
     {
         BusinessId = businessTaxStatusDto.BusinessId,
         BusinessRegistrationNumber = businessTaxStatusDto.BusinessRegistrationNumber,
         TaxRegistrationNumber = businessTaxStatusDto.TaxRegistrationNumber,
         IsTaxRegistered = businessTaxStatusDto.IsTaxRegistered,
         DefaultTaxRate = businessTaxStatusDto.DefaultTaxRate
     };
 }
Exemple #2
0
        public bool ModifyBusinessTaxStatus(BusinessTaxStatusDto businessTaxStatusDto)
        {
            // Validate if business exists
            if (Cache.Business.TryGetValue(businessTaxStatusDto.BusinessId) == null)
            {
                throw new ValidationException(ErrorFactory.CreateAndLogError(Errors.SRVEX30001, "AdminService.ModifyBusinessTaxStatus",
                    additionalDescriptionParameters: (new object[] { businessTaxStatusDto.BusinessId })));
            }

            return businessManager.ModifyBusinessTaxStatus(DataTransferObjectsConverter.ConvertBusinessTaxStatusDtoToModel(businessTaxStatusDto));
        }