<%@ page import="ro.emid.common.types.DataObj" %>
<%@ page import="ro.emid.common.db.DataDB" %>
<%@ page import="ro.emid.common.constants.NomConstants" %>
<%@ page import="ro.emid.common.utils.ObjectUtils" %>
<%@ page import="ro.emid.common.types.LFInfo" %>
<%@ page import="ro.emid.common.db.LFInfoAccessDB" %>
<%@ page import="ro.emid.common.types.Incident" %>
<%@ page import="ro.emid.incidente.obj.binder.IncidentBinder" %>
<%@ page import="ro.emid.common.constants.AppConstants" %>
<%@ page import="ro.emid.common.constants.IncidentConstants" %>

<%
    final IncidentBinder binder = (IncidentBinder) session.getAttribute(IncidentConstants.BEAN);
    final Incident incident = (binder != null ? (Incident) binder.getBean() : new Incident());
%>
<respmesg>
<%try{
    final int durataIntrerupereIncident  = ObjectUtils.getIntValue(request.getParameter("durataIntrerupereIncident"));
    final Object[] result = incident.calculEnergieAndNumarConsumatori( durataIntrerupereIncident);

    final double energiaNelivrata = ((Double)result[0]).doubleValue();
%>
    <%=AppConstants.format2(energiaNelivrata)%>
<%}catch( Exception t){%>
    <%=t.getMessage()%>
<%}%>
</respmesg>