コード例 #1
0
 private void loadData() {
   currencys = new ArrayList<Currency>();
   try {
     currencys = LocaleModelManager.getInstance().getCurrencies();
     setModel(new DefaultComboBoxModel(currencys.toArray()));
   } catch (Exception e) {
   }
 }
コード例 #2
0
  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;
    }
  }