private void loadData() { currencys = new ArrayList<Currency>(); try { currencys = LocaleModelManager.getInstance().getCurrencies(); setModel(new DefaultComboBoxModel(currencys.toArray())); } catch (Exception e) { } }
public ProductUnit getProductUnitByDefault() { try { ProductUnit pU = LocaleModelManager.getInstance().getProductUnitByCode("dv"); if (pU == null) { pU = new ProductUnit(); pU.setCode("dv"); pU.setName("Đơn vị"); pU.setDescription("dv"); pU.setRate(1); } return pU; } catch (Exception ex) { return null; } }