示例#1
0
  public static final AccountTypeWS getWS(AccountTypeDTO dto) {

    return getWS(
        dto.getId(),
        dto.getCompany().getId(),
        dto.getInvoiceDesign(),
        dto.getDateCreated(),
        dto.getCreditNotificationLimit1(),
        dto.getCreditNotificationLimit2(),
        dto.getCreditLimit(),
        dto.getInvoiceDeliveryMethod(),
        dto.getCurrencyId(),
        dto.getLanguageId(),
        dto.getDescription(),
        UserBL.convertMainSubscriptionToWS(dto.getBillingCycle()),
        dto.getInformationTypes(),
        dto.getPaymentMethodTypes(),
        dto.getPreferredNotificationAitId());
  }
示例#2
0
  public void update(AccountTypeDTO accountType) {

    AccountTypeDTO accountTypeDTO = accountTypeDAS.find(accountType.getId());

    accountTypeDTO.setCreditLimit(accountType.getCreditLimit());
    accountTypeDTO.setCreditNotificationLimit1(accountType.getCreditNotificationLimit1());
    accountTypeDTO.setCreditNotificationLimit2(accountType.getCreditNotificationLimit2());
    accountTypeDTO.setInvoiceDesign(accountType.getInvoiceDesign());
    accountTypeDTO.setBillingCycle(accountType.getBillingCycle());
    accountTypeDTO.setLanguage(new LanguageDAS().find(accountType.getLanguageId()));
    accountTypeDTO.setCurrency(new CurrencyDAS().find(accountType.getCurrencyId()));
    accountTypeDTO.setInvoiceDeliveryMethod(
        new InvoiceDeliveryMethodDAS().find(accountType.getInvoiceDeliveryMethod().getId()));
    accountTypeDTO.setPaymentMethodTypes(accountType.getPaymentMethodTypes());
    accountTypeDTO.setPreferredNotificationAitId(accountType.getPreferredNotificationAitId());
    accountTypeDAS.save(accountTypeDTO);

    accountTypeDAS.flush();
    accountTypeDAS.clear();
  }