Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Update bei Vor/zurück #342

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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