try {
operations = (Map<String, Operation>) system.query(new GetOperation());
if(typeOfFilter.equals("Todos")) {
for (Operation operation : operations.values()) {
if (operation.getPaymentType() instanceof PaymentCheck) {
PaymentCheck check = (PaymentCheck) operation.getPaymentType();
if ((condition(selectedLocalization, check)) && ((nameSearch.equals("")) ? true : match(check.getResponsable(), nameSearch))) {
TableItem item = new TableItem(checkTable, SWT.NONE | SWT.WRAP | SWT.MULTI);
item.setImage(0, new Image(null,check.isLocalization()?"img/icoCheckIn.png":"img/icoCheckOut.png"));
item.setText(1, operation.getId());
item.setText(2, operation.getDescription());
item.setText(3, check.getBank());
item.setText(4, check.getAgency());
item.setText(5, check.getBillnumber());
item.setText(6, check.getChecknumber());
item.setText(7, check.getResponsable());
item.setText(8, check.getPhone());
item.setText(9, operation.getDateTime().getFormatedDate());
item.setText(10, check.getDate().getFormatedDate());
item.setText(11, check.getReceivedValue().getFormatedValue());
item.setText(12, new Money(operation.getValue()).getFormatedValue());
item.setText(13, check.getObservation());
}
}
}
} else if(typeOfFilter.equals("Data de Emiss�o")) {
for (Operation operation : operations.values()) {
if (operation.getPaymentType() instanceof PaymentCheck) {
PaymentCheck check = (PaymentCheck) operation.getPaymentType();
if ((check.getDate().beforeOrEqualsDay(endDate)) && (check.getDate().afterOrEqualsDay(startDate)) && (condition(selectedLocalization, check)) && ((nameSearch.equals("")) ? true : match(check.getResponsable(), nameSearch))) {
TableItem item = new TableItem(checkTable, SWT.NONE | SWT.WRAP | SWT.MULTI);
item.setImage(0, new Image(null,check.isLocalization()?"img/icoCheckIn.png":"img/icoCheckOut.png"));
item.setText(1, operation.getId());
item.setText(2, operation.getDescription());
item.setText(3, check.getBank());
item.setText(4, check.getAgency());
item.setText(5, check.getBillnumber());
item.setText(6, check.getChecknumber());
item.setText(7, check.getResponsable());
item.setText(8, check.getPhone());
item.setText(9, operation.getDateTime().getFormatedDate());
item.setText(10, check.getDate().getFormatedDate());
item.setText(11, check.getReceivedValue().getFormatedValue());
item.setText(12, new Money(operation.getValue()).getFormatedValue());
item.setText(13, check.getObservation());
}
}
}
}
} catch (Exception e) {