Example #1
0
 private void doKBFuellen(String tabelle, String von, String bis) {
   // String cmd = "insert intoselect * into '"+tabelle+"' from kasse where datum >= '"+von+"' and
   // datum <= '"+bis+"'";
   String cmd2 =
       "CREATE TABLE "
           + tabelle
           + " SELECT * FROM kasse where datum >= '"
           + von
           + "' and datum <= '"
           + bis
           + "'";
   System.out.println(cmd2);
   SqlInfo.sqlAusfuehren(cmd2);
   SqlInfo.sqlAusfuehren("ALTER TABLE " + tabelle + " ADD PRIMARY KEY (ID)");
   SqlInfo.sqlAusfuehren(
       "ALTER TABLE " + tabelle + " CHANGE ID ID INT( 11 ) NOT NULL AUTO_INCREMENT");
   SqlInfo.sqlAusfuehren(
       "ALTER TABLE " + tabelle + " CHANGE KTEXT KTEXT VARCHAR(50) NULL DEFAULT NULL");
 }
Example #2
0
 private void doBuchen() {
   StringBuffer buf = new StringBuffer();
   buf.append("insert into rgaffaktura set ");
   buf.append("rnr='" + afrNummer + "', ");
   buf.append("reznr='" + (String) vecaktrez.get(1) + "', ");
   buf.append("pat_intern='" + (String) vecaktrez.get(0) + "', ");
   buf.append(
       "rgesamt='"
           + (String) InitHashMaps.hmAdrAFRDaten.get("<AFRgesamt>").replace(",", ".")
           + "', ");
   buf.append(
       "roffen='"
           + (String) InitHashMaps.hmAdrAFRDaten.get("<AFRgesamt>").replace(",", ".")
           + "', ");
   buf.append("rdatum='" + DatFunk.sDatInSQL(DatFunk.sHeute()) + "'");
   SqlInfo.sqlAusfuehren(buf.toString());
 }
Example #3
0
  public void doKBErzeugen(String tabelle) {
    StringBuffer buf = new StringBuffer();

    buf.append("CREATE TABLE IF NOT EXISTS " + tabelle + " (");
    buf.append("EINNAHME decimal(12,2) DEFAULT NULL,");
    buf.append("AUSGABE decimal(12,2) DEFAULT NULL,");
    buf.append("DATUM date DEFAULT NULL,");
    buf.append("KTEXT varchar(50) DEFAULT NULL,");
    buf.append("KTO varchar(20) DEFAULT NULL,");
    buf.append("KSTAND decimal(12,2) DEFAULT NULL,");
    buf.append("id int(11) NOT NULL AUTO_INCREMENT,");
    buf.append("PAT_INTERN int(11) NOT NULL DEFAULT '0',");
    buf.append("REZ_NR varchar(25) DEFAULT NULL,");
    buf.append("PRIMARY KEY (id),");
    buf.append("KEY REZ_NR (REZ_NR)");
    buf.append(") ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=41552");
    SqlInfo.sqlAusfuehren(buf.toString());
  }
Example #4
0
 private void doDelete() {
   int item = kbvorhanden.getSelectedIndex();
   if (item >= 0) {
     int anfrage =
         JOptionPane.showConfirmDialog(
             null,
             "Wollen Sie das Kassenbuch --> "
                 + kbvorhanden.getSelectedValue().toString()
                 + " <-- wirklich löschen?",
             "Achtung wichtige Benutzeranfrage",
             JOptionPane.YES_NO_OPTION);
     if (anfrage == JOptionPane.YES_OPTION) {
       String cmd = "drop table " + kbvorhanden.getSelectedValue().toString();
       SqlInfo.sqlAusfuehren(cmd);
       doKBErmitteln();
     }
   }
 }
Example #5
0
  public RehaUrlaubTab() {
    super();
    setLayout(new BorderLayout());

    String cmd = UrlaubFunktionen.getUrlaubTableDef("");
    SqlInfo.sqlAusfuehren(cmd);

    billEditTab = new JTabbedPane();
    billEditTab.setUI(new WindowsTabbedPaneUI());

    urlaubPanel = new RehaUrlaubPanel(this);
    billEditTab.add("Stundenerfassung", urlaubPanel);

    /*
    altimportPanel = new AltImport(this);
    billEditTab.add("alten RTA-Urlaub importieren",altimportPanel);
    */

    urlaubTabelle = new RehaUrlaubTabelle(this);
    billEditTab.add("Urlaubtabelle", urlaubTabelle);

    jxh = new JXHeader();
    ((JLabel) jxh.getComponent(1)).setVerticalAlignment(JLabel.NORTH);
    add(jxh, BorderLayout.NORTH);
    add(billEditTab, BorderLayout.CENTER);

    jxh.validate();
    billEditTab.validate();
    validate();
    new SwingWorker() {
      @Override
      protected Object doInBackground() throws Exception {
        holeKalUser();
        return null;
      }
    }.execute();
  }