Skip to content

Commit

Permalink
Auto Update bei Vor/zurück (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannMaierhofer authored Oct 1, 2024
1 parent 920b16e commit 4c5cb5d
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions src/de/jost_net/JVerein/gui/parts/VonBisPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public void handleAction(Object context) throws ApplicationException
calendar.add(Calendar.DAY_OF_MONTH, -1);
control.getSuchDatumbis().setValue(calendar.getTime());
}
refresh();
}
}, null, false, "go-previous.png");
buttons.addButton(zurueck);
Expand Down Expand Up @@ -135,6 +136,7 @@ public void handleAction(Object context) throws ApplicationException
calendar.add(Calendar.DAY_OF_MONTH, -1);
control.getSuchDatumbis().setValue(calendar.getTime());
}
refresh();
}
}, null, false, "go-next.png");
buttons.addButton(vor);
Expand All @@ -144,25 +146,30 @@ public void handleAction(Object context) throws ApplicationException
@Override
public void handleAction(Object context) throws ApplicationException
{
checkDate();
control.getDatumvon().setDate((Date) control.getSuchDatumvon().getValue());
control.getDatumbis().setDate((Date) control.getSuchDatumbis().getValue());
Integer year = control.isGeschaeftsjahr();
if (year != 0)
{
control.getGeschaeftsjahr().setValue(year.toString());
}
else
{
control.getGeschaeftsjahr().setValue("");
}
control.getSaldoList();
refresh();
}
}, null, true, "search.png");
buttons.addButton(suchen);
sgroup.addButtonArea(buttons);
}
}

private void refresh() throws ApplicationException
{
checkDate();
control.getDatumvon().setDate((Date) control.getSuchDatumvon().getValue());
control.getDatumbis().setDate((Date) control.getSuchDatumbis().getValue());
Integer year = control.isGeschaeftsjahr();
if (year != 0)
{
control.getGeschaeftsjahr().setValue(year.toString());
}
else
{
control.getGeschaeftsjahr().setValue("");
}
control.getSaldoList();
}

private void checkDate() throws ApplicationException
{
Expand Down

0 comments on commit 4c5cb5d

Please sign in to comment.