/** ***************************************** */ private void doDelete() { if (jcmb.getSelectedIndex() == 0) { JOptionPane.showMessageDialog(null, "Depp!"); doEditsEinAus(false); regleButtons("1101000"); return; } if (jcmb.getSelectedItem().toString().trim().equals(Reha.aktUser)) { int anfrage = JOptionPane.showConfirmDialog( null, "Sie sind im Begriff sich selbst zu löschen!!!!\n\nWollen Sie das wirklich?\n\n", "Achtung wichtige Benutzeranfrage", JOptionPane.YES_NO_OPTION); if (anfrage == JOptionPane.YES_OPTION) { String id = (String) jcmb.getValueAt(4); String cmd = "delete from rehalogin where id='" + id + "' LIMIT 1"; SqlInfo.sqlAusfuehren(cmd); jcmb.removeVector(jcmb.getSelectedIndex()); jcmb.setSelectedIndex(0); doEditsEinAus(false); } } else if (!jcmb.getSelectedItem().toString().trim().equals(Reha.aktUser)) { String user = jcmb.getSelectedItem().toString(); int anfrage = JOptionPane.showConfirmDialog( null, "Sie sind im Begriff einen Thera-Pi-Benutzer zu löschen!!!!\n\nWollen Sie den Benutzer --> " + user + " <-- wirklich löschen?\n\n", "Achtung wichtige Benutzeranfrage", JOptionPane.YES_NO_OPTION); if (anfrage == JOptionPane.YES_OPTION) { String id = (String) jcmb.getValueAt(4); String cmd = "delete from rehalogin where id='" + id + "' LIMIT 1"; SqlInfo.sqlAusfuehren(cmd); jcmb.removeVector(jcmb.getSelectedIndex()); } jcmb.setSelectedIndex(0); doEditsEinAus(false); } }