<%@ page import="ro.emid.common.constants.GlobalAppConstants" %>
<%@ page import="ro.emid.common.types.LucrareProgramata" %>
<%@ page import="ro.emid.common.types.binder.LucrareProgramataBinder" %>
<%@ page import="ro.emid.common.constants.*" %>

<%
    final LucrareProgramataBinder binder = (LucrareProgramataBinder) session.getAttribute(LucrareProgramataConstants.BINDER);
    final LucrareProgramata bean = (binder != null ? (LucrareProgramata) binder.getBean() : new LucrareProgramata());
    final int nrLfSelected = (bean.getInstalatiiAfectate() != null ? bean.getInstalatiiAfectate().size() : 0);
%>


<script type="text/javascript">
    window.parent.window.opener.setTotalEnergieNelivrata( <%=AppConstants.format2( bean.getEnergieNelivrata())%> );
    window.parent.window.opener.setTotalconsumatori( <%=AppConstants.format2( bean.getTotalUtilizatoriAfectati())%>);
    window.parent.window.opener.setConsumatoriPeNivelTensiune( <%=AppConstants.format2( bean.getUtilizatoriIT())%>, <%=AppConstants.format2( bean.getUtilizatoriMT())%>, <%=AppConstants.format2( bean.getUtilizatoriJT())%>, <%=nrLfSelected%>);
    window.parent.window.close();
</script>