@Override public void onDelete(final EzeeProjectPayment payment) { int index = projectPaymentGrid.getIndex(payment); if (index != MINUS_ONE) { EzeeProjectItem item = project.getItem(projectItemGrid.getSelected().getGridId()); item.getPayments().remove(payment); projectPaymentGrid.removeEntity(payment); replaceItem(); modified(); } }
@Override public void onDelete(final EzeeProjectItemDetail detail) { int index = projectItemDetailGrid.getIndex(detail); if (index != MINUS_ONE) { EzeeProjectItem item = project.getItem(projectItemGrid.getSelected().getGridId()); item.getDetails().remove(detail); projectItemDetailGrid.removeEntity(detail); replaceItem(); modified(); } }
@Override public void onSave(final EzeeProjectPayment payment) { int index = projectPaymentGrid.getIndex(payment); if (index == MINUS_ONE) { EzeeProjectItem item = project.getItem(projectItemGrid.getSelected().getGridId()); item.addPayment(payment); projectPaymentGrid.addEntity(payment); } projectPaymentGrid.getGrid().redraw(); replaceItem(); modified(); }
@Override public void onSave(final EzeeProjectItemDetail detail) { int index = projectItemDetailGrid.getIndex(detail); if (index == MINUS_ONE) { EzeeProjectItem item = project.getItem(projectItemGrid.getSelected().getGridId()); item.addDetail(detail); projectItemDetailGrid.addEntity(detail); } projectItemDetailGrid.getGrid().redraw(); replaceItem(); modified(); }