}
@Override
public void updateApproval(Approval approval, Integer ApprovalID) {
//Integer approvalID = null;
Approval newForm = approval;
Approval oldForm = null;
//Start by looking at Application Table. Application -> Travel ID -> ID Conference
// List<Approval> allApprovlas = daoApproval.findAll();
// for (Application eachApproval : allApp) {
// if (eachApproval.getIdapplication().getIdaccount().equals(id)) {
// approvalID = eachApproval.getFinalcostingIdfinalcosting().getIdfinalcosting();
// }
// }
//Try and match conferenceID to passed id
List<Approval> allapprovals = daoApproval.findAll();
for (Approval eachapproval : allapprovals) {
if (eachapproval.getIdapproval().equals(ApprovalID)) {
oldForm = eachapproval;
//move conferenceID of old conference entry to new entry.
newForm.setIdapproval(oldForm.getIdapproval());
daoApproval.edit(newForm);
}
}
}