public SmartInvoiceDTO findSmartInvoiceByKey(Integer idKey) {
    SmartInvoice p1 = new SmartInvoice();
    p1.setId(idKey);
    SmartInvoiceDTO foundDto = (new SmartInvoiceDTO()).convertToDto(smartInvoiceDAO.findByKey(p1));
    if (foundDto != null) {
      return foundDto;
    }

    return null;
  }
 public boolean deleteSmartInvoiceByKey(Integer idKey) {
   SmartInvoice p1 = new SmartInvoice();
   p1.setId(idKey);
   return smartInvoiceDAO.delete(p1);
 }