}//GEN-LAST:event_btValidateMKB10ActionPerformed
private void btUnionPolisActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btUnionPolisActionPerformed
try {
ContractFactoryLocal cf = new ContractFactoryLocal(getAuditManager());
ContractFilter contractFilter = new ContractFilter();
contractFilter.index = "";
contractFilter.enterpriseId = -1;
contractFilter.lpuID = UserInfo.get().getCollaborator().getLpu().getID();
ArrayList<ContractLocal> contractList = cf.findContractList(contractFilter);
System.out.println("Найдено " + contractList.size() + " контрактов");
for (int i = 0; i < contractList.size(); i++) {
ContractLocal contractLocal = contractList.get(i);
System.out.println("Обработка контракта № " + (i+1) + " (" + contractLocal + ")");
contractLocal.unionPolises();