Skip to content

Commit

Permalink
Erweiterung Datenbank bereinigen (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannMaierhofer committed Aug 25, 2024
1 parent 1ff4425 commit 1f1a367
Show file tree
Hide file tree
Showing 5 changed files with 344 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,23 @@ public void handleAction(Object context) throws ApplicationException
{
throw new ApplicationException("Keinen Jahresabschluss ausgewählt");
}

try
{
Jahresabschluss a = (Jahresabschluss) context;
if (a.isNewObject())
{
return;
}
DBIterator<Jahresabschluss> it1 = Einstellungen.getDBService()
.createList(Jahresabschluss.class);
it1.addFilter("von > ?", new Object[] { a.getVon() });
if (it1.hasNext())
{
throw new ApplicationException(
"Jahresabschluss kann nicht gelöscht werden. Es existieren neuere Abschlüsse!");
}

YesNoDialog d = new YesNoDialog(YesNoDialog.POSITION_CENTER);
d.setTitle("Jahresabschluss löschen");
d.setText("Wollen Sie diesen Jahresabschluss wirklich löschen?");
Expand Down
Loading

0 comments on commit 1f1a367

Please sign in to comment.