Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\sales\enterprise\sectorsAjax.jsp
<%@page session="true" %><%@ page import="com.edeal.frontline.navigation.FlRequest" %><%@ page import="com.edeal.frontline.Utils" %><%@ page import="com.edeal.frontline.FlContext" %><%@ page import="java.util.Vector" %><%@ page import="com.edeal.frontline.BasicBean" %><%@ page import="com.edeal.frontline.FrontlineException" %><%@ page import="java.util.Hashtable" %><%@ page import="java.text.DecimalFormat" %><%@ page import="com.edeal.frontline.FlLocale" %><%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %><% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); String actID = flRequest.getParameter("actID"); StringBuffer sqlQuery = new StringBuffer(); sqlQuery.append("SELECT EntSector, sum(EntRelativeDelay) "); sqlQuery.append("FROM Enterprise "); sqlQuery.append("WHERE EntActID = " + Utils.formatToSQL(context, actID) + " "); sqlQuery.append("GROUP BY EntSector "); sqlQuery.append("ORDER BY 2 DESC"); Vector resp; try { resp = BasicBean.listSQL(context, new String[] { "EntSector", "EntSum" }, sqlQuery.toString()); } catch (FrontlineException e) { resp = new Vector(); } int size = resp.size(); String sansSector = Utils.getMessage(session, "L6023", "Sans secteur"); DecimalFormat df = FlLocale.getInstance(flRequest.getSession()).getDecimalFormat("#,##0.##;- #,##0.##"); %> var option; var sectors = document.getElementById('sectors'); while (sectors.length > 0) { sectors.remove(0); } option = document.createElement('OPTION'); option.text = ''; option.value = ''; sectors.options.add(option); <% for (int i = 0; i < size; ++i) { Hashtable row = (Hashtable)resp.elementAt(i); Number entSum = (Number)row.get("EntSum"); String entSector = (String)row.get("EntSector"); %> option = document.createElement("OPTION"); option.text = '<%= entSector == null ? sansSector : row.get("EntSector") %> (<%= entSum == null ? "0.00" : df.format(entSum.doubleValue()) %>)'; option.value = '<%= entSector == null ? sansSector : row.get("EntSector") %>'; sectors.options.add(option); <% } %> document.getElementById('sectors_label').style.visibility = 'inherit'; sectors.style.visibility = 'inherit';
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de