Exemple #1
0
 @Override
 public void saveAlias(DistributorAlias alias) {
   if (alias != null && alias.getId() < 1) {
     // GenericListModel<DistributorAlias> model =
     // (GenericListModel<DistributorAlias>)aliasList.getModel();
     alias.setDistributor(distributor);
     model.addElement(alias);
   } else {
     model.repaintObjectInList(alias);
   }
 }
Exemple #2
0
  private void pushDataToProduct() {
    try {
      distributor.setName(txtName.getText());
      distributor.setColumnCount(Integer.valueOf(txtColumnCount.getText()));
      distributor.setColumnId(Integer.valueOf(txtColumnId.getText()));
      distributor.setColumnPrice(Integer.valueOf(txtColumnPrice.getText()));
      distributor.setColumnArtist(Integer.valueOf(txtArtist.getText()));
      distributor.setColumnTrack(Integer.valueOf(txtTrack.getText()));
      distributor.setColumnTrackType(Integer.valueOf(txtType.getText()));
      distributor.setColumnQuantity(Integer.valueOf(txtColumnquantity.getText()));

      Set<DistributorAlias> set = new HashSet<DistributorAlias>();
      set.addAll(model.getList());
      distributor.setAliasSet(set);
    } catch (Exception e) {

    }
  }