<%@ page import="ro.emid.common.constants.AppConstants" %>
<%@ page import="ro.emid.common.constants.IncidentConstants" %>
<%@ page import="ro.emid.common.types.Incident" %>
<%@ page import="ro.emid.incidente.obj.binder.IncidentBinder" %>

<%
    IncidentBinder binder = (IncidentBinder) session.getAttribute(IncidentConstants.BEAN);
    Incident bean = (binder != null ? (Incident) binder.getBean() : new Incident());
    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.getNrConsumatoriAfectati())%>);
    window.parent.window.opener.setConsumatoriPeNivelTensiune(
            <%=AppConstants.format2( bean.getUtilizatori_IT())%>,
            <%=AppConstants.format2( bean.getUtilizatori_MT())%>,
            <%=AppConstants.format2( bean.getUtilizatori_JT())%>,
            <%=nrLfSelected%>
    );
    window.parent.window.close();
</script>
