Exemplo n.º 1
0
 private void loadLieferant() {
   EntityManager em = Main.getEMF().createEntityManager();
   Query query = em.createQuery("SELECT l FROM Lieferanten l ORDER BY l.firma");
   try {
     java.util.List lieferant = query.getResultList();
     lieferant.add(0, "<html><i>Lieferant nicht &auml;ndern</i></html>");
     cmbLieferant.setModel(tools.Tools.newComboboxModel(new ArrayList<Lieferanten>(lieferant)));
   } catch (Exception e) { // nicht gefunden
     //
   } finally {
     em.close();
   }
 }
Exemplo n.º 2
0
  private void myInit() {
    cmbLager.setModel(tools.Tools.newComboboxModel(LagerTools.getAll()));
    cmbLager.setSelectedIndex(
        Integer.parseInt(Main.getProps().getProperty("touch" + MODULENUMBER + "lager")));
    loadLieferant();
    cmbLieferant.setSelectedIndex(0);
    ziel = (Lager) cmbLager.getSelectedItem();
    lieferant = null;
    txtSearch.requestFocus();
    btnSofortUmbuchen.setSelected(true);
    cbZombieRevive.setSelected(true);

    pageprinter = Main.printers.getPrinters().get("pageprinter");
    etiprinter1 = Main.printers.getPrinters().get(Main.getProps().getProperty("etitype1"));
    etiprinter2 = Main.printers.getPrinters().get(Main.getProps().getProperty("etitype2"));

    form1 = etiprinter1.getForms().get(Main.getProps().getProperty("etiform1"));
    form2 = etiprinter2.getForms().get(Main.getProps().getProperty("etiform2"));
  }