Commit 83e3fe76 authored by prumde's avatar prumde

Updated

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@211363 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b9f009c9
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
body{ body{
background-color: #efefef; background-color: #efefef;
padding: 0;
margin: 0;
} }
.input-field label{ .input-field label{
...@@ -46,6 +48,10 @@ body{ ...@@ -46,6 +48,10 @@ body{
.input-form{ .input-form{
padding: 10px; padding: 10px;
} }
.sales-container{
max-width: 1024px;
margin: auto;
}
</style> </style>
</head> </head>
<body> <body>
...@@ -92,10 +98,10 @@ body{ ...@@ -92,10 +98,10 @@ body{
} }
} }
%> %>
<div class="sales-container">
<div style="padding: 10px 0 10px 10px;"> <div style="padding: 10px 0 10px 10px;">
<div class="ang-dbtitle"> <div class="ang-dbtitle">
Current Sales Summary Sales Information
</div> </div>
</div> </div>
<form method="POST" action="executeSaleTrends.jsp"> <form method="POST" action="executeSaleTrends.jsp">
...@@ -115,5 +121,6 @@ body{ ...@@ -115,5 +121,6 @@ body{
<button class="view-button" type="submit">View Data</button> <button class="view-button" type="submit">View Data</button>
</div> </div>
</form> </form>
</div>
</body> </body>
</html> </html>
...@@ -6,94 +6,6 @@ ...@@ -6,94 +6,6 @@
<%@page import="ibase.utility.UserInfoBean"%> <%@page import="ibase.utility.UserInfoBean"%>
<%@page import="java.io.*,java.util.*,java.util.zip.*"%> <%@page import="java.io.*,java.util.*,java.util.zip.*"%>
<%@page import="java.text.SimpleDateFormat"%> <%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.*"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.SQLException"%>
<%@page import="ibase.system.config.ConnDriver"%>
<%!
public HashMap getSQLResultData(String sqlStr, String transDB)
{
HashMap sqlDataMap = null;
Connection con = null;
Statement stmt=null;;
ResultSet rs = null;
try
{
System.out.println("Inside SaleTrendsDetails::getSQLResultData transDB [" +transDB + "] SQL Exection done ! SQL => \n " + sqlStr);
ConnDriver mConnDriver = new ConnDriver();
con = mConnDriver.getConnectDB(transDB);
if( con == null ) {
System.out.println("Unable to get connection for [" + transDB + "]");
throw new Exception("Unable to get connection for [" + transDB + "]");
}
ArrayList<HashMap<String, String>> dataRows = new ArrayList<HashMap<String, String>>();
HashMap<Integer, String> dataCols = new HashMap<Integer, String>();
sqlDataMap = new HashMap();
int noOfRows = 0;
int noOfColumns = 0;
stmt = con.createStatement();
rs = stmt.executeQuery(sqlStr);
ResultSetMetaData rsmd = rs.getMetaData();
while(rs.next())
{
//System.out.println("Result iteration !");
HashMap<String, String> rowDataMap = new HashMap<String, String>();
noOfColumns = rsmd.getColumnCount();
//System.out.println("Result noOfColumns !" + noOfColumns);
for(int ctr = 1; ctr <= noOfColumns; ctr++)
{
if( noOfRows == 0 )
{
dataCols.put(ctr, rsmd.getColumnName(ctr));
}
rowDataMap.put(rsmd.getColumnName(ctr), rs.getString(ctr));
}
//System.out.println("Result dataMap !" + dataMap);
dataRows.add(rowDataMap);
noOfRows++;
}
//System.out.println("Result dataArray !" + dataArray);
sqlDataMap.put("COLS", dataCols);
sqlDataMap.put("ROWS", dataRows);
}
catch(Exception e)
{
sqlDataMap = null;
System.out.println("Inside SaleTrendsDetails::getSQLResultData Exception : " + e.getMessage());
e.printStackTrace();
}
finally
{
try
{
if( stmt != null )
{
stmt.close();
stmt = null;
}
if( con != null )
{
con.close();
con = null;
}
}
catch( Exception eI )
{
eI.printStackTrace();
}
}
return sqlDataMap;
}
%>
<html> <html>
<head> <head>
...@@ -272,9 +184,6 @@ public HashMap getSQLResultData(String sqlStr, String transDB) ...@@ -272,9 +184,6 @@ public HashMap getSQLResultData(String sqlStr, String transDB)
int totalRows = noOfRows > 100 ? 100 : noOfRows; int totalRows = noOfRows > 100 ? 100 : noOfRows;
int noOfColumns = dataCols.size(); int noOfColumns = dataCols.size();
htmlStrBuff.append("<TABLE id =\"dataTable\">"); htmlStrBuff.append("<TABLE id =\"dataTable\">");
htmlStrBuff.append("<tr>"); htmlStrBuff.append("<tr>");
for( int ctr = 1; ctr <= noOfColumns; ctr++ ) { for( int ctr = 1; ctr <= noOfColumns; ctr++ ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment