예제 #1
0
  public AusfallRechnung(
      Point pt, String pat_intern, String rez_nr, String rnummer, String rdatum) {

    super();
    afrNummer = rnummer;
    afrDatum = rdatum;
    setTitle("Kopie Ausfallrechnung erstellen");

    setSize(350, 270);
    setPreferredSize(new Dimension(350, 270));

    this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);

    String test =
        SqlInfo.holeEinzelFeld("select id from verordn where rez_nr = '" + rez_nr + "' LIMIT 1");
    if (test.equals("")) {
      test = SqlInfo.holeEinzelFeld("select id from lza where rez_nr = '" + rez_nr + "' LIMIT 1");
      if (test.equals("")) {
        // this.dispose();
        // return;
      } else {
        vecaktrez =
            SqlInfo.holeSatz("lza", " * ", "id='" + test + "'", Arrays.asList(new String[] {}));
      }
    } else {
      vecaktrez =
          SqlInfo.holeSatz("verordn", " * ", "id='" + test + "'", Arrays.asList(new String[] {}));
    }

    patDaten =
        SqlInfo.holeSatz(
            "pat5", " * ", "pat_intern='" + pat_intern + "'", Arrays.asList(new String[] {}));
    InitHashMaps.constructPatHMap(patDaten);
    // content.add(getGebuehren(),BorderLayout.CENTER);
    // content.validate();
    // this.getContentPane().add(getGebuehren(),BorderLayout.CENTER);
    this.add(getGebuehren());

    setName("Kopie - AusfallRechnung");
    setModal(true);
    // Point lpt = new Point(pt.x-125,pt.y+30);
    Point lpt = new Point(pt.x - 150, pt.y + 30);
    // setLocation(lpt);
    this.setLocationRelativeTo(null);

    pack();
    // setVisible(true);

  }
예제 #2
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");
 }
예제 #3
0
 private void doKBErmitteln() {
   Vector<Vector<String>> vec = SqlInfo.holeFelder("show tables");
   datavec.clear();
   for (int i = 0; i < vec.size(); i++) {
     if (vec.get(i).get(0).startsWith("kb_")) {
       datavec.add(vec.get(i).get(0));
     }
   }
   kbvorhanden.setListData(datavec);
   eltern.tabellenAktualisieren();
 }
예제 #4
0
 private void testeSchluessel() {
   Vector<String> vec =
       SqlInfo.holeSatz(
           "anwesend", " * ", "schrank ='" + schluessel + "'", Arrays.asList(new String[] {}));
   if (vec.size() <= 0) {
     ausgabe = true;
   } else {
     ausgabe = false;
     tfs[0].setText(vec.get(1));
     tfs[1].setText(vec.get(10));
   }
   vec.clear();
   vec = null;
 }
예제 #5
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());
 }
예제 #6
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());
  }
예제 #7
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();
     }
   }
 }
예제 #8
0
 public String[] holeAbweichendeAdresse(String patid) {
   // "anrede,titel,nachname,vorname,strasse,plz,ort"
   String cmd =
       "select abwanrede,abwtitel,abwn_name,abwv_name,abwstrasse,abwplz,abwort from pat5 where id='"
           + patid
           + "' LIMIT 1";
   Vector<Vector<String>> abwvec = SqlInfo.holeFelder(cmd);
   Object[] obj = {
     (Object) abwvec.get(0).get(0),
     (Object) abwvec.get(0).get(1),
     (Object) abwvec.get(0).get(2),
     (Object) abwvec.get(0).get(3),
     (Object) abwvec.get(0).get(4),
     (Object) abwvec.get(0).get(5),
     (Object) abwvec.get(0).get(6)
   };
   return AdressTools.machePrivatAdresse(obj, true);
 }
예제 #9
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();
  }
예제 #10
0
 private void holeKalUser() {
   vecKalUser = SqlInfo.holeFelder("select kalzeile,matchcode from kollegen2 order by kalzeile");
 }