<% System.out.println(" *****WoStockButton.jsp***** "); %>
<%@page import = "java.util.*"%>
<%@page import ="ibase.webitm.utility.*"%>
<%@page import = "ibase.webitm.ejb.mfg.adv.*"%>
<%@page import = "java.sql.*"%>
<%@page import = "java.text.DecimalFormat"%>
<%@page import = "ibase.webitm.utility.GenericUtility"%>
<%@page import ="java.net.URLDecoder"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<jsp:useBean id="WoStockStatus" scope="session" class="ibase.webitm.ejb.mfg.WoStockStatus"/>
<html>
<head><head><title>getParameterNames() method of request object.</title>
<style type="text/css">
table
{
border-collapse:collapse;
}
table, td, th
{
border:1px solid black;
}
th
{
background-color:blue;
color:white;
}
</style>
</head>

<body>

<a style="position:absolute;top:10;left:0;height:50;width:1200;background:url(/ibase/webitm/images/title_bar_bg_blue.jpg);font-family:Verdana"></a>
<%
	 System.out.println("Inside WoStockStatus.jsp");    
	GenericUtility genericUtility = GenericUtility.getInstance(); 
	DecimalFormat df = new DecimalFormat( "##.000" );

		  String param = null;
		  String paramvalue = null, workOrder = null;
		  
		 Enumeration enum1 = request.getParameterNames();
		  while( enum1.hasMoreElements() )
		  {
			  param = (String)enum1.nextElement();
			  paramvalue = request.getParameter(param);
			 System.out.println("param ["+param+"] paramvalue ["+paramvalue+"]");    
		  } 
		String paramList[];
		if ( paramvalue.indexOf("~") != -1 )
		{
		  paramList = paramvalue.split("~");
		  workOrder = paramList[0];
		}
		else
		{
		  workOrder = paramvalue;
		}

		System.out.println("workOrder [" + workOrder + "]");
		String htmlString =  WoStockStatus.getStockStatus(workOrder);
		System.out.println("htmlString [" + htmlString + "]");
		
	%>
	<%=htmlString%>
</body>
</html>
