/* Automatically generated.
 * Copyright (c) 2000-2006 by SAP AG, Walldorf.,
 * http://www.sap.com
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of SAP AG, Walldorf. You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms
 * of the license agreement you entered into with SAP.
 * Do not edit.
 */

import ro.emid.common.types.DataObj;
import ro.emid.common.db.DataDB;
import ro.emid.common.constants.NomConstants;
import ro.emid.common.utils.ObjectUtils;
import ro.emid.common.types.LFInfo;
import ro.emid.common.db.LFInfoAccessDB;
import ro.emid.common.types.Incident;
import ro.emid.incidente.obj.binder.IncidentBinder;
import ro.emid.common.constants.AppConstants;
import ro.emid.common.constants.IncidentConstants;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public class JEE_jsp_WEB_2d_INF_pagelet_incidente_ajax_getEnergieNelivrataForIncident_1495030450073 extends com.sap.engine.services.servlets_jsp.lib.jspruntime.JspBase{

	public void _jspService(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
	{
		//isXml=false
		JspFactory  _jspFactory     = JspFactory.getDefaultFactory();
		PageContext pageContext = _jspFactory.getPageContext(this,request,response,null,true,32768,true);
		ServletConfig config = pageContext.getServletConfig();
		ServletContext application = pageContext.getServletContext();
		com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl _jspx_pageContext = (com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl) pageContext;
		com.sap.engine.services.servlets_jsp.server.application.InjectionWrapper _jspx_resourceInjector = ((com.sap.engine.services.servlets_jsp.server.application.ServletContextImpl)_jspx_pageContext.getServletContext()).getApplicationContext().getInjectionWrapper();
		HttpSession session = pageContext.getSession();
		if (!response.isCommitted()) {
		response.setContentType("text/html;charset=UTF-8");
		}
		JspWriter   out     = pageContext.getOut();
		java.lang.Object page = this;
		try {
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(1,49);to=(2,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(2,45);to=(3,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(3,58);to=(4,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(4,53);to=(5,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(5,48);to=(6,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(6,53);to=(7,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(7,50);to=(8,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(8,64);to=(9,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(9,58);to=(10,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(10,63);to=(12,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(12,0);to=(15,2)]
			
    final IncidentBinder binder = (IncidentBinder) session.getAttribute(IncidentConstants.BEAN);
    final Incident incident = (binder != null ? (Incident) binder.getBean() : new Incident());

// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(15,2);to=(17,0)]
			out.print("\r\n<respmesg>\r\n");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(17,0);to=(22,2)]
			try{
    final int durataIntrerupereIncident  = ObjectUtils.getIntValue(request.getParameter("durataIntrerupereIncident"));
    final Object[] result = incident.calculEnergieAndNumarConsumatori( durataIntrerupereIncident);

    final double energiaNelivrata = ((Double)result[0]).doubleValue();

// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(22,2);to=(23,4)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(23,4);to=(23,47)]
			out.print(AppConstants.format2(energiaNelivrata));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(23,47);to=(24,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(24,0);to=(24,25)]
			}catch( Exception t){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(24,25);to=(25,4)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(25,4);to=(25,23)]
			out.print(t.getMessage());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(25,23);to=(26,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(26,0);to=(26,5)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/ajax/getEnergieNelivrataForIncident.jsp";from=(26,5);to=(27,11)]
			out.print("\r\n</respmesg>");
// end
		} catch (ThreadDeath tde) { throw tde;
		} catch (OutOfMemoryError ome) { throw ome;
		} catch (Throwable t) {
			if (!(t instanceof SkipPageException)) {
				try {
					out.clear();
				} catch(java.io.IOException _jspioex) {}
				_jspx_pageContext.handlePageException(t);
			}
		}finally{
			_jspFactory.releasePageContext(pageContext);
		}
	}

}
