You are on page 1of 188

ECS

ELECTRONIC CIVIL SUPPLY SYSTEM

GROUP :10

ECS

ACKNOWLEDGEMENT

We are extremely glad to present our project report a soft ware for 'Electronic Civil Supply(ECS) System'.This is apart our curriculum of the sixth semester Diplpma in Computer Engineering.This project is theoutcome of jointed effort put in by the Computer Engineering studentof Model Polytechnic,Mala. We make use of this opportunity to express our sincere gratitude to those who have helped us to bringing out this project work.Firstly,with great pleasure we acknowledge our sincere thanks to our principal Sri. C.P Unnikrishnan for his extensive support and encouragement thought out the course in this institution. We express our deep gratitude for Sri.Nithin and Other teachers who has our project guide.Theygave us valuable guidance,constant encouragement,and help through project.We also like extend our grateful gratitude to Mrs.Mini Jacob and Head of Department Sri.Siddigue for their valuable support during the entire project. We are deeply indebted to our friends with whom we have worked and all our teachers who assisted us to move the project forward.

CONTENT
1. ACKNOWELDGEMENT 2. CONTENTS 3. INTRODUCTION 4. SYSTEM STUDY a. Existing system

b. Proposed system 5. SYSTEM ANALYSIS a. Feasibility Study b. Software Requirements c. Hardware Requirements 6. SYSTEM DESIGN a. Database Design b. Dataflow Diagram c. Screen Design 7. SYSTEM DEVELOPMENT & IMPLEMENTATION a. Source Code b. System Testing c. Implementation 8. REPORT 9. CONCLUSION

INTRODUCTION
The projecct 'ELECTRONIC CIVIL SUPPLY SYSTEM' is used to manage activities in a ration shop. The proposed system is designed to increase the effeciency and speed of the service and will reduce the workload to staff. The advantage of new system is easy to because no prior knowledge of computers necessary to operate this interface of this generic in nature and more users friendly ,can login using username and password. It is glogally belief that the computers are able to provide useful information properly fed with a reasonable input or it will result in.Garbage to garbage.The world as global village has become so computerized that the use computers is inevitable therefore makes them very important in all aspects of human life especially on the accounting field. In the E-civil supply system is a system intended to fully automated rationshop our state.It helps us to easy the operatio and it gives a permission to the correct users that customer,retaier and administrator.This gives the security for the stored data. The OBJECTIVES of this application is to keep track of the various purchasing and selling activities in a ration shop.Administrator is the prime person who is a government authority has the provision to allocate available commodities according to the crowd of that locality or need of people retailor can't made any modification to items.It automates the calculation of bill of each customer and retailor and also keep the stock fpr each retaierthus reduce the corruption. The application should also facilitate the registration of new customer or retailer with the permission of the admin,add bill,issue monthly report.To search for every individual customer account to particular retailer and search every details about every retailer to the admin and show the details.

SYSTEM STUDY Study phase is the first life cycle phase use in the creation of a computer based information system,either a new system or modification of an existing system. The study phase is a process in whoch a problem is identified stages.Detailed analysis include an in-depth look at what is wanted and contain more refined cost and benefit studies.Inthe preliminary report,the analyst defines the problem,summarizes interviewes and meeting with user and society and presents reviews of relevant documents.Detailed analysis may lead to a formation of a synthetically outlook. EXISTING SYSTEM The existing system works manually.All reports ,recrds are kept in paper files and the chances for mistakes are more.Ration shop owner keep all records and submit a report to the superior officer. Due to manual entry,the data in the record may duplicate or may be take.Because of these the customer can not able to get reasonable quantity of essential products.Some shop owners are selling subsidised products in market rate and make a large profit. Common people have know their authorized product.misunderstanding ,black marketing,manual accounting etc are cause many curruption in the field of ration shops. These drawbacks are overcome in the proposed system"The E-Civil Supply System" . PROPOSED SYSTEM The proposed system has a good way of configuring all tasks through a systematic way.Here the use of paper work is minimal so that we do not have to account time delay in reconstructing the whole things.The proposed system is computerised one.The advantages are capacity to store large data,speed and accuracy,avoid corruption and computerised billing and monthly report. features of the proposed system The project aims to develop a well-organised system deal with various activities done in ration shop. The administrator will be able to approve a retailor,provide products,give instructions etc.The admin can view or update main stock ad also can view all reatailer personal ans stock deatails Retailer can add acustomer,provide products in currect manner and provide bill. customer registration is possible in the main page and he can buy products in the given ratio ,if any mistakes directly complaint to the officers with proof and stock details. SYSTEM ANALYSIS

FEASIBILITY STUDY

A feasibility study is carried out to select the best system that meets performance requirements. The main aim of the feasibility study activity is to determine whether it would be financially and technically feasible to develop the product. The feasibility study activity involves the analysis of the problem and collection of all relevant information relating to the product such as the different data items which would be input to the system, the processing required to be carried out on these data, the output data required to be produced by the system as well as various constraints on the behavior of the system. The collected data are analyzed to arrive at the following:

An abstract problem definition. An abstract problem definition is a rough description of the problem which considers only the important requirements and ignores the rest.

Formulation of the different solution strategies.

Analysis of alternative solution strategies to compare their benefits and shortcomings. This analysis usually requires making approximate estimates of the options. These estimates are used as the basis for comparing the different solutions. Ones the best solution is identified, all later faces of development are carried out as per this solution. Thus, during the feasibility, study most of the high level architectural design decisions are made. There for, feasibility study is considered to be a very important stage. During this study, it may come to light that none of

the solutions is feasible due to high cost, resource constraints, or some technical reasons. This scenario would of course require the project to be abandoned.

SYSTEM REQUIREMENTS

HARDWARE SPECIFICATION

Processor

: Pentium IV and above

Main memory

: 1 GB RAM

Cache memory

: 512 KB

CPU speed

: 1.9GHZ or above

Hard disk capacity : 20 GB or above

CD Rom drive

: 52X

Monitor

: SVGA color

SOFTWARE SPECIFICATION

Front End

: JAVA/J2EE

Back End

: SQL Server 2005

Operating system

: Windows XP/VISTA or later

IDE

: Net Beans

Software details FRONT END Feactures of languages

The proposed system is developed using my sql as back end and java/j2ee as front end tools With javatm platform, enterprise edition ( java ee), development of java enterprise application have never been easier or faster. The aim of the java ee 5 platform to provide developers a power full set of APIs while reducing development time, reducing application complexity, and improving model. With java ee 5 technology, XML development descriptors are now optional. Instead, a developer can simply enter the information as an annotation directly into a java source file, and java EE sever will configure the component at deployment and run time. These a notation are generally used tio embed in program data that would otherwise be furnished in a deployment descriptor. With a annotation, the specification information is put directly in your code next to the program element that it effect In the java ee platform, dependency injection can be applied to all resources that a component needs, effectively hiding the creation and lookup of resource from application code. Dependency injection allows the java ee container to automatically insert reference to other require components or resource using annotations. The java persistence API is new to the java EE 5 platform. The java persistence API provides an object/relational mapping for managing relational data in enterprise beans, web components, and application clients. It can also be used in java SE application, outside of the java EE environment.

This tutorial uses examples to describe the features and functionalities available in the java EE 5 platform for developing enterprise applications. Whether you are a new or experienced enterprise developer, you should find the examples and accompanying text a valuable and accessible knowledge base for creating your own solutions. If you are new to java EE enterprise application development, this chapter is good place to start. Here you will review development basic, learn about the java EE architecture and APIs, become acquainted with import terms and concepts, and find out how to approach java EE application programming, assembling, and develoyment.

Java script Java script is simple programming language that can be written directly into HTML documents to allow for increased interactive with the user. Java script is an easy-to-use programming language that can be embed in the header of your web pages. It can enhance the dynamics and interactive features of your page by allowing you to perform calculations, check forms, write interactive games, add special effects, customize graphics selections, create security passwords and more. Difference between java script and java actually, the 2 languages have almost nothing in common except for the name. Although java is technically and interpreted programming language, it is coded in a similar fashion to c++, with separate header and class file, completed together prior to execution. It is power full write major applications and insert them in a web page as special object called an applet . Java has been generating a lot of excitement because of its unique ability run the same program on IBM, Mac, and Unix computers. Java is not conceded as easy-t- use language for non-programmers. Java script is much simpler to use than java. With java script, if I want check a form for errors, I just type an if-then statement at the top of my page. No compiling, no applets, just a simple sequence. SYSTEM DESIGN Module design 1)customer management Any application that issecurity will have some kind of method to track and maintained the user activities.In this module we will begin to build a user management system that will give us control over who has access to which part of our application.It involves: * authentication The user will log into the system through the home page.This module will then check to see if the user ewist in the database and authenticate

accordingly.user can register through home page with the approval of particular retailer. 2)Retailer management This module involves recording the customer deatils,individual customer stock,provide bill, and issue monthly report etc. * Update customer stock It involves the stock that each customer has reasonable for each month.this module keep stock deatils. Column Name Data type Description

3)Administrator management This module involves recording the retailer deatils,individual retailer stock,provide bill, add mainstock and issue monthly report etc. * Update retailer stock It involves the stock that each retailer has reasonable for each month.this module keep stock deatils.

Database design

1) Tbl_cusomer

Customer_id Taluk District Card no Licenceno Type Name Housename Place Typeofarea Wardno Houseno Memberno Adults Child Providingunit Monthlyincome Date status

Int(20) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30)

Primary key, store customer id Taluk of customer District of customer Card number of customer Retailer license number Account is BPL or APL Customer name Customer housename Place of customer Area is panchayath or municipality or corporation ward number of customer Customers housenumber Total number of members Number of adults Number of child Providing unit of customer Monthly income in a family Issued date Customer request is pending or accept

2) Tbl_customerbill Column Name Customerbill_id Customerid Item1 Quantity1 Price1 Item2 Quantity2 Price2 Item3 Quantity3 Price3 Item4 Quantity4 Price4 Item5 Quantity5 Price5 Total date Cardno Licenceno Data type Int(20) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) varchar(30) Description Primary key, customer bill id Customer id number sugar Quantity of sugar Price of product sugar rice Quantity of rice Price of product rice wheat Quantity of wheat Price of product wheat kerosene Quantity of kerosene Price of product kerosene Raw rice Quantity of Raw rice Price of product raw rice Total price Purchasing date Customer card number Retailer license number

3) customer individual stock Column Name Customerstock_id Item1 Quantity1 Price1 Unitprovide1 Item2 Quantity2 Price2 Unitprovide2 Item3 Quantity3 Price3 Unitprovide3 Item4 Quantity4 Price4 Unitprovide4 Item5 Quantity5 Price5 Unitprovide5 Date Data type Int(20) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Date Description Primary key Sugar Quantity of sugar Price of sugar Unit provide for sugar rice Quantity of rice Price of rice Unit provide for rice Wheat Quantity of wheat Price of wheat Unit provide for wheat Kerosene Quantity of kerosene Price of kerosene Unit provide for kerosene Raw rice Quantity of raw rice Price of raw rice Unit provide for raw rice Issued date

4)Tbl_main stock

Column Name main_id Sugar Rice Wheat kerosene Raw rice date

Data type Int(20) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) date

Description Primary key Main stock of sugar Main stock of rice Main stock of wheat Main stock of kerosene Main stock of raw rice Issued date

5) monthly report

Column Name Report_id Date Licenceno Snet Sold P1 Rnet sold2 p2 Wnet Sold3 P3 Knet sold4 p4 Rwnet Sold5 P5

Data type Int(20) Date Int(30) Int(30) Int(30) Int(30) Int(30) Int(30) Int(30) Int(30) Int(30) Int(30) Int(30) Int(30) Int(30) Int(30) Int(30) Int(30)

Description Primary key Issued date Retailer license number Net amount of sugar Sold quantity Price of sugar Net amount of rice Sold quantity Price of rice Net amount of wheat Sold quantity Price of wheat Net amount of kerosene Sold quantity Price of kerosene Net amount of raw rice Sold quantity Price of raw rice

6)tbl_retailer Column Name retailer_id Name Licenceno Hosename Place District Pinno Phoneno Noofapl Noofbpl status Data type Int(20) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Description Primary key Name of retailer License no of retailer House name of retailer Place of retailer District Pin number Phone number Total number of APL Total number of BPL Request is pending or accept

7) tbl_retailer main stock

Column Name Rms_id Licenceno Item1 Quantity1 Price1 Item2 Quantity2 Price2 Item3 Quantity3 Price3 Item4 Quantity4 Price4 Item5 Quantity5 Price5

Data type Int(20) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30) Varchar(30)

Description Primary key Retailer license number Sugar Quantity of sugar Price of sugar Rice Quantity of rice Price of rice Wheat Quantity of wheat Price of wheat Kerosene Quantity of kerosene Price of kerosene Raw rice Quantity of raw rice Price of raw rice

8)Retailer stock details

Column Name Rmd_id Licenceno Date Item1 Quantity1 Sold1 P1 Item2 Quantity2 Sold2 P2 Item3 Quantity3 Sold3 P3 Item4 Quantity4 Sold4

Data type Int(20) Varchar(30) Date Varchar(30) Varchar(30) Varchar(30) Int(20) Varchar(30) Varchar(30) Varchar(30) Int(20) Varchar(30) Varchar(30) Varchar(30) Int(20) Varchar(30) Varchar(30) Varchar(30)

Description Primary key Retailer license number Issued date Sugar Quantity of sugar Sold quantity Price of Sugar Rice Quantity of rice Sold quantity Price of rice Wheat Quantity of wheat Sold quantity Price of wheat Kerosene Quantity of kerosene Sold quantity

1.

LOGIN
MAIN PAGE

LOGIN

REGISTRATION

CUSTOMER

RETAILER

ADMIN

CUSTOMER

RETAILER

tbl_customer

tbl_retailer

tbl_customer

tbl_retailer

1.1. ADMIN DIAGRAM


ADMIN PAGE

mainstock

tbl_retailer STOCK mainstock

tbl_retailer

tbl_monthly tbl_retailer DETAILS report stockdetails

REPORT

LOG OUT

MAIN

REQUEST

OVIDE

STOCK PROVIDE

RETAILER

RETAILER STOCK

MONTHLY REPORT

1.3 CUSTOMER PROCESS


CUSTOMER PAGE

HOME

tbl_customer
ACCOUNT

tbl_Customer individual stock

LOG OUT

CUSTOMER

STOCK VIEW

SCREEN SHOT INDEX

MEMBER REGISTRATION

RETAILER REQUEST

RETAILER REGISTER VIEW

RETAILER REGISTER

ADMIN ADMIN MAIN STOCK

ADMIN PAGE

REPORT

RETAILER REQUEST

RETAILER INFORMATION

RETAILER REQUEST INFORMATION

RETAILER STOCK INFORMATION

STOCK PROVIDE

RETAILER CUSTOMER DETAILS

CUSTOMER BILL REQUEST VIEW

CUSTOMER BILL VIEW

INDIVIDUDAL CUSTOMER STOCK VIEW

RETAILER FORM

CUSTOMER REQUEST

REQUEST RETAILER VIEW

STOCK PROVIDE

CUSTOMER PROCESS

STOCK VIEW

SYSTEM DEVELOPMENT & IMPLEMENTATION Source Code


1.Admin form <div id='cssmenu'> <ul>

<li class='active'><a href="adminform.jsp"><span>Home</span></a></li> <li class='has-sub'><a href='#'><span>Stock</span></a> <ul> <li><a href="adminmainstock.jsp"><span>Main Provide</span></a></li> <li><a href="requestadmin.jsp"><span>Request</span></a></li> <li><a href="adminstockprovide.jsp"><span>Stock Provide</span></a></li> </ul> </li> <li class='has-sub'><a href='#'><span>Details</span></a> <ul> <li><a href="retailerdetails.jsp"><span>Retailer</span></a></li> <li><a href="retailerstock.jsp"><span>Retailer Stock</span></a></li> </ul> </li> <li class='last'><a href="monthlyreport.jsp"><span>Report</span></a></li> <li class='last'><a href="index.jsp"><span>Logout</span></a></li> </ul> </div>

2.Admin main stock </script> <script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> <div id="templatemo_content_wrapper"> <div id="content"> <h2>Main Stock provide</h2> <form id="form1" name="form1" method="post" action="adminmainstockprovidefunc.jsp"> <table width="531" height="392" border="0"> <tr> <td>Date</td> </tr> </tr> </div> </div>

<td><input type="text" name="date" value="<%out.println(today);%>"/></td> <tr> <tr> <td>ITEM</td> <td width="171">QUANTITY</td

<td><input type="text" name="item1" value="Sugar"/></td> </tr>

<td><input type="text" name="qt1" /></td> <tr>

<td><input type="text" name="item2" value="Rice"/></td> </tr>

<td><input type="text" name="qt2" /></td> <tr>

<td><input type="text" name="item3" value="Wheat"/></td>

<td><input type="text" name="qt3" /></td> <tr>

</tr>

<td><input type="text" name="item4" value="Kerosine"/></td> <td><input type="text" name="qt4" /></td> <tr> <td><input type="text" name="item5" value="Raw Rice"/></td> <td><input type="text" name="qt5" /></td> <tr> <td>&nbsp;</td> </tr> <td><label> </label></td> </tr>

<input type="submit" name="Submit" value="Submit" /> 3.Admin main stock provide func <%@page import="javax.swing.JOptionPane"%> <%@page import="java.sql.Statement"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Connection"%> <% String sugar = ""; String rice = ""; String wheat = ""; String kerosine = "";

String rawrice = ""; String date =""; try { try { try { try { try { try { try { sugar = request.getParameter("qt1"); rice = request.getParameter("qt2"); wheat = request.getParameter("qt3"); kerosine = request.getParameter("qt4"); rawrice = request.getParameter("qt5"); date = request.getParameter("date"); Connection con = null; } catch (Exception e) { } } } } } }

} catch (Exception e) { } catch (Exception e) { } catch (Exception e) { } catch (Exception e) { } catch (Exception e) {

String query = "";

Class.forName("com.mysql.jdbc.Driver"); con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); try{ query = "insert into tbl_mainstock(sugar,rice,wheat,kerosine,rawrice,date) values('" + sugar + "','" + rice + "','" + wheat + "','" + kerosine + "','" + rawrice + "','"+ date +"')"; smt.executeUpdate(query); } %> response.sendRedirect("adminform.jsp"); }catch(Exception exe){ } } catch (Exception

ex) {

4.Admin stock provide </script>

<script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> <div id="templatemo_content_wrapper"> <% var = " "; String name1 = " "; String place = " "; String apl = " "; try { String license = " "; String pinno = " "; String bpl = " "; String housename = " "; String phoneno = " "; String retailerid = request.getParameter("retailer_id"); String var = " "; </div> </div>

var = request.getParameter("retailer_id"); try {

if (!var.equalsIgnoreCase(" ")) { Class.forName("com.mysql.jdbc.Driver");

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact ResultSet r = smt.executeQuery("select * from tbl_retailer where(retailer_id='" + var + "');"); while (r.next()) { license = r.getString("licenceno"); housename = r.getString("housename"); name1 = r.getString("Name");

place = r.getString("place"); phoneno = r.getString("phoneno"); bpl = r.getString("noofBPL"); // JOptionPane.showMessageDialog(null, retailerid); } catch (Exception e) { // JOptionPane.showMessageDialog(null,e); } catch (Exception e) { <div id="content"> <% String qt1="",qt2="",qt3="",qt4="",qt5=""; try { Class.forName("com.mysql.jdbc.Driver"); e.printStackTrace(); }

pinno = r.getString("pinno"); apl = r.getString("noofAPL");

e.printStackTrace(); } } } %>

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact ResultSet r = smt.executeQuery("select * from tbl_mainstock;"); while (r.next()) { qt1 = r.getString("sugar"); qt3 = r.getString("wheat"); qt5 = r.getString("rawrice"); } qt2 = r.getString("rice"); qt4 = r.getString("kerosine");

// JOptionPane.showMessageDialog(null, retailerid); } catch (Exception e) { e.printStackTrace(); } %>

// JOptionPane.showMessageDialog(null,e);

<form id="form1" name="form1" method="post" action="mainstockfunc.jsp"> <table width="578" height="359" border="0"> <tr> <label> <td colspan="3">Licence Number <select name="name" id="name" onchange="jspcall();">

<option value="">Select License No</option> <% String number = ""; String comboitem = ""; String name = ""; try { DatabaseAccess db = new DatabaseAccess(); String query = "";

// JOptionPane.showMessageDialog(null, hello ); query = "SELECT DISTINCT retailer_id FROM tbl_retailer ORDER BY `tbl_retailer`.`retailer_id` DESC"; ResultSet rs1 = null; rs1 = db.dataRetrieve(query); while (rs1.next()) { ResultSet rs2 = null;

number = rs1.getString("retailer_id"); // JOptionPane.showMessageDialog(null, number); query = "select licenceno from tbl_retailer where retailer_id = '" + number + "'"; rs2 = null; rs2 = db.dataRetrieve(query); if (rs2.next()) { name = rs2.getString("licenceno"); comboitem = name; out.println("<option value='" + number + "'>" + comboitem + "</option>"); } } catch (Exception ex) { // JOptionPane.showMessageDialog(null, ex); </label></td> } </tr> %> </select> }

<tr><td><label>License No</label></td> <td><input type="text" name="license" value="<%out.println(license);%>"/> <tr><td><label>Date</label></td> <td><input type="text" name="date" value="<%out.println(today);%>" readonly="true"/> </td> </tr> <tr> </td> </tr>

<td width="173">ITEM</td> <td width="195">QUANTITY</td> <tr>

<td width="173">AVAILABLE</td> </tr>

<td><input type="text" name="i1" value="Sugar" readonly="true"/></td>

<td><input type="text" name="qt1" id="qt1" value="<%out.println(qt1);%>" readonly="true"/></td> <td><input type="text" name="q1" id="q1" onblur="valid()"/></td> <tr> </tr>

<td><input type="text" name="i2" value="Rice" readonly="true"/></td>

<td><input type="text" name="qt2" id="qt2" value="<%out.println(qt2);%>" readonly="true"/></td> <td><input type="text" name="q2" id="q2" onblur="valid()"/></td> <tr> <td><input type="text" name="i3" value="Wheat" readonly="true"/></td> <td><input type="text" name="qt3" id="qt3" value="<%out.println(qt3);%>" readonly="true"/></td> <td><input type="text" name="q3" id="q3" onblur="valid()"/></td> <tr> <td><input type="text" name="i4" value="Kerosine" readonly="true"/></td> </tr> </tr>

<td><input type="text" name="qt4" id="qt4" value="<%out.println(qt4);%>" readonly="true"/></td> <td><input type="text" name="q4" id="q4" onblur="valid()"/></td> <tr> <td><input type="text" name="i5" value="Rawrice" readonly="true"/></td> </tr>

<td><input type="text" name="qt5" id="qt5" value="<%out.println(qt5);%>" readonly="true"/></td> <td><input type="text" name="q5" id="q5" onblur="valid()"/></td> </tr>

<tr> <td><label> </label></td> 5.Bill

<td>&nbsp;</td>

<td>&nbsp;</td>

<input type="submit" name="Submit" value="Provide" /> </tr> </table> </form>

<form id="form1" name="form1" method="post" action=""> <table width="590" height="417" border="0"> <tr> <td width="135">Date</td> <td width="176"><label> </label></td> <td width="157"><label> </label></td> </tr>

<input type="text" name="textfield" /> <td width="104">Card Number </td> <input type="text" name="textfield2" /> <tr> </tr> <tr> <td>Rice</td> <td>ITEM</td>

<td>QUANTITY</td>

<td colspan="2">PRICE</td>

<td><input type="text" name="textfield3" /></td> <td colspan="2"><input type="text" name="textfield8" /></td> <tr> <td>Sugar</td> </tr>

<td><input type="text" name="textfield4" /></td> </tr>

<td colspan="2"><input type="text" name="textfield9" /></td>

<tr> <td>Wheat</td> <td><input type="text" name="textfield5" /></td> </tr> <tr>

<td colspan="2"><input type="text" name="textfield10" /></td> <td>Kerosine</td>

<td><input type="text" name="textfield6" /></td> </tr>

<td colspan="2"><input type="text" name="textfield11" /></td> <tr> <td>Atta</td>

<td><input type="text" name="textfield7" /></td> </tr>

<td colspan="2"><input type="text" name="textfield12" /></td> <tr> <td>&nbsp;</td> <td> TOTAL </td>

<td colspan="2"><input type="text" name="textfield13" /></td> <tr> <td>&nbsp;</td> <td>&nbsp;</td>

</tr> <td colspan="2"><label>

<input type="submit" name="Submit" value="PRINT" onclick="window.print()"/> </label></td> 6.Customer bill back func <%@page import="javax.swing.JOptionPane"%> <%@page import="java.sql.Statement"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Connection"%> <%@page import="java.sql.ResultSet"%> </tr> </table>

<%

String query = ""; String customerbill_id = request.getParameter("billno"); String licenseno = request.getParameter("licenseno"); Connection con = null; Class.forName("com.mysql.jdbc.Driver"); con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement();

try{

query = "update tbl_customerbill set bill_status='paid' where customerbill_id='"+ customerbill_id +"'"; smt.executeUpdate(query); response.sendRedirect("customerbillviewretailer1.jsp?customerbill_id="+customerbill_id+""); }catch(Exception e){ } %>

7.Customer bill view <h4>Customer Bills</h4> <% Connection con = null; String username = request.getParameter("username"); String password = request.getParameter("password"); String licenseno = request.getParameter("password"); String retailerid = ""; String query = ""; int count = 0;

String customerbill_id = " "; String cardno = ""; int i = 0;

String date = "";

// DatabaseAccess db = new DatabaseAccess(); Class.forName("com.mysql.jdbc.Driver"); con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); try { query = "select * from tbl_customerbill where bill_status='unpaid' and licenseno='" + licenseno + "'"; ResultSet r = null; Statement st = (Statement) con.createStatement(); r = (ResultSet) st.executeQuery(query); //r = db.dataRetrieve(query); while (r.next()) { //url = r.getString("url");

customerbill_id = r.getString("customerbill_id"); // JOptionPane.showMessageDialog(null, customerbill_id); date = r.getString("date"); i++; 8.Customer billview retailer <form id="form1" name="form1" method="post" action="customerbillbackfunc.jsp"> count++; cardno = r.getString("cardno"); %>

<table width="597" height="414" border="0"> <tr> <td width="137">Bill No</td> </tr>

<td width="137"><input type="text" name="billno" value="<% out.println(customerbill_id);%>" readonly="true"/></td> <tr> <td colspan="4">Card Number <label> <input type="text" name="cardno" value="<% out.println(cardno);%>" readonly="true"/></label></td> <td colspan="5">Retailer License Number<label> <input type="text" name="textfield2" value="<% out.println(licenseno);%>" readonly="true"/> </label></td> <td width="137">Date</td> <td width="137"><input type="text" name="date" value="<% out.println(date);%>" readonly="true"/></td> <tr> <td width="137">ITEM</td> <td width="250">PRICE</td> <td><label> </tr> Sugar</label></td> <td width="196">QUANTITY</td> <tr> </tr> </tr> <tr>

<td><input type="text" name="q1" value="<% out.println(quantity1);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<% out.println(price1);%>" readonly="true"/></td> </tr> <tr> <td><label> Rice</label></td>

<td><input type="text" name="q2" value="<% out.println(quantity2);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<% out.println(price2);%>" readonly="true"/></td> </tr> <tr> <td><label> Wheat</label></td>

<td><input type="text" name="q3" value="<% out.println(quantity3);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<% out.println(price3);%>" readonly="true"/></td> </tr> <tr> <td><label> Kerosine</label></td>

<td><input type="text" name="q4" value="<% out.println(quantity4);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<% out.println(price4);%>" readonly="true"/></td> </tr> <tr> <td><label> Raw rice</label></td>

<td><input type="text" name="q5" value="<% out.println(quantity5);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<% out.println(price5);%>" readonly="true"/></td> </tr> <tr> <td>&nbsp;</td>

<td><div align="center">Total</div></td> <td><input type="text" name="textfield3" value="<% out.println(total);%>" readonly="true"/></td> </tr> <td><label> </form> 9.Customer billview ret 1 <% Connection con = null; int count = 0; String query = ""; String customerbill_id = " "; <tr> <td>&nbsp;</td> <td>&nbsp;</td> </label></td></tr> </table>

<input type="submit" name="Submit" value="BACK" />

int i = 0; String customer_id = ""; // DatabaseAccess db = new DatabaseAccess(); Class.forName("com.mysql.jdbc.Driver"); con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); try { Statement smt1 = con.createStatement(); ResultSet r2 = smt1.executeQuery("select * from tbl_retailer where name='" + u + "'"); while (r2.next()) { licenseno = r2.getString("licenceno"); } query = "select * from tbl_customerbill where bill_status ='unpaid' and licenseno='" + licenseno + "'"; ResultSet r = null; Statement st = (Statement) con.createStatement(); r = (ResultSet) st.executeQuery(query); //r = db.dataRetrieve(query); while (r.next()) { //url = r.getString("url");

customerbill_id = r.getString("customerbill_id"); customer_id = r.getString("customer_id"); i++; 10.Customer details <form id="form1" name="form1" method="post" action=""> <table width="616" height="458" border="0"> <tr> <td width="142"> Customer Name</td> count++; %>

<td width="149"><label> <select name="name" id="name" onchange="jspcall();"> <option value="">Select Customer</option> <% String number = ""; String name = ""; try { DatabaseAccess db = new DatabaseAccess(); // JOptionPane.showMessageDialog(null, hello ); query = "SELECT DISTINCT customer_id FROM tbl_customer ORDER BY `tbl_customer`.`customer_id` DESC"; ResultSet rs1 = null; String query = ""; String comboitem = "";

ResultSet rs2 = null; rs1 = db.dataRetrieve(query); while (rs1.next()) { number = rs1.getString("customer_id"); // JOptionPane.showMessageDialog(null, number); query = "select Name from tbl_customer where customer_id = '" + number + "'"; rs2 = null; if (rs2.next()) { name = rs2.getString("Name"); comboitem = name; out.println("<option value='" + number + "'>" + comboitem + "</option>"); } catch (Exception ex) { // JOptionPane.showMessageDialog(null, ex); <td width="139">Card No </td> } %> </select> </label></td> <td width="168"><label> } } rs2 = db.dataRetrieve(query);

<input type="text" name="cardno" value="<%out.print(cardno);%>" readonly="true"/> </label></td> <tr> </tr> <td>Name </td>

<td><input type="text" name="name" value="<%out.print(name1);%>" readonly="true"/></td> <td>&nbsp;</td> <td>&nbsp;</td> </tr>

<tr>

<td>House name </td>

<td><input type="text" name="housename" value="<%out.print(housename);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>Place</td> <td>&nbsp;</td> </tr>

<td><input type="text" name="place" value="<%out.print(place);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>Type of Area </td> <td><input type="text" name="typeofarea" value="<%out.print(typeofarea);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>Taluk</td> </tr> <td>&nbsp;</td> </tr>

<td><input type="text" name="taluk" value="<%out.print(taluk);%>" readonly="true"/></td> <td>&nbsp;</td> <td>District</td> <td><input type="text" name="district" value="<%out.print(district);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>Ward no </td> </tr> <td>&nbsp;</td> </tr> <tr>

<td><input type="text" name="wardno" value="<%out.print(wardno);%>" readonly="true"/></td>

<td>&nbsp;</td> <tr>

<td>&nbsp;</td> <td>House no </td>

</tr>

<td><input type="text" name="houseno" value="<%out.print(houseno);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>Monthly income </td> </tr>

<td><input type="text" name="mincome" value="<%out.print(mincome);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>Type of account </td> </tr>

<td><input type="text" name="type" value="<%out.print(type);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>providing unit </td> </tr>

<td><input type="text" name="prounit" value="<%out.print(prounit);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr>

<td><input type="hidden" name="username" id="username" value="<%out.print(username);%>" readonly="hidden"/></td> <td>&nbsp;</td> <td><input type="hidden" name="licenseno" value="<%out.print(licenseno);%>" readonly="hidden"/></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td>

<td><label> </label></td> 11.Decadmin <%@page import="javax.swing.JOptionPane"%> <%@page import="java.sql.Statement"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Connection"%> <%

<input type="submit" name="Submit" value="BACK" /> <td>&nbsp;</td> </tr> </table> </form>

String retailerid = request.getParameter("retailerid"); //JOptionPane.showMessageDialog(null, retailerid); String query = ""; Class.forName("com.mysql.jdbc.Driver"); Connection con = null; con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); try { Statement st = (Statement) con.createStatement(); query = "update tbl_retailer set status ='Accepted' where retailer_id='"+ retailerid +"'"; st.executeUpdate(query); response.sendRedirect("requestadmin.jsp");

} catch(Exception ex) { 12.Decretailer

%>

<%@page import="javax.swing.JOptionPane"%> <%@page import="java.sql.Statement"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Connection"%> <% String customerid = request.getParameter("customer_id"); // JOptionPane.showMessageDialog(null, customerid); String query = ""; Class.forName("com.mysql.jdbc.Driver"); Connection con = null; con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); try { Statement st = (Statement) con.createStatement();

query = "update tbl_customer set status ='Accepted' where customer_id='"+ customerid +"'"; st.executeUpdate(query); response.sendRedirect("requestretailer.jsp"); 13.Index <%@page import="javax.swing.JOptionPane"%> } catch(Exception ex){ } %>

<%@page import="Rationshop.StaticClassLogin"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>ECS | INDIA</title> <meta name="keywords" content="glossy box, web design, colorful background, free templates, website templates, CSS, HTML" /> <meta name="description" content="Glossy Box | free website template with a colorful background" /> <link href="templatemo_style.css" rel="stylesheet" type="text/css" /> <link href="menu_assets/styles.css" rel="stylesheet" type="text/css" /> <link href="css/jquery.ennui.contentslider.css" rel="stylesheet" type="text/css" media="screen,projection" /> </head> <body> <div id="templatemo_wrapper_outer"> <div id="templatemo_wrapper">

<div id="templatemo_header">

<div id="site_title">

<h1><a href="http://www.templatemo.com"><strong>ECS</strong>India<span>E-Civil Supplies System</span></a></h1> </div> <!-- end of site_title --> <%@include file="menu.jsp" %> <div id="templatemo_slider"> <div class="cleaner"></div> </div>

<div id="templatemo_slider_wrapper"> <div id="one" class="contentslider">

<div class="cs_wrapper"> <div class="cs_article"> <div class="slider_image">

<div class="cs_slider"> <div class="slider_content_wrapper">

<img src="images/slider/templatemo_slide01.jpg" alt="Sugar" /> <div class="slider_content"> <h2>Latest News</h2>

</div>

<p>Civil supply minister announced implementation of E-Ration Shop</p> <div class="btn_more"><a href="#">More...</a></div> </div><!-- End cs_article --> <div class="slider_content_wrapper"> </div> </div>

<div class="cs_article"> <div class="slider_image">

<img src="images/slider/templatemo_slide02.jpg" alt="Cras porta porta turpis" /> </div> <h2>Latest News</h2> <p>Civil supply minister announced implementation of E-Ration Shop</p> <div class="btn_more"><a href="#">More...</a></div> </div><!-- End cs_article --> <div class="cs_article"> <div class="slider_image"> <img src="images/slider/templatemo_slide03.jpg" alt="Nullam ac mi id massa consectetur" /> </div> <div class="slider_content_wrapper"> </div> </div> <div class="slider_content">

<div class="slider_content"> <h2>Latest News</h2> <p>Civil supply minister announced implementation of E-Ration Shop</p> <div class="btn_more"><a href="#">More...</a></div> </div><!-- End cs_article --> <div class="cs_article"> <div class="slider_image"> <img src="images/slider/templatemo_slide04.jpg" alt="Maecenas venenatis viverra nisi" /> <div class="slider_content"> <h2>Latest News</h2> </div> <div class="slider_content_wrapper"> </div> </div>

<p>Civil supply minister announced implementation of E-Ration Shop</p> <div class="btn_more"><a href="#">More...</a></div> </div><!-- End cs_article --> </div><!-- End cs_wrapper --> <!-- Site JavaScript --> <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script> <script type="text/javascript"> </div> </div>

</div><!-- End cs_slider --> </div><!-- End contentslider -->

$(function() { height : '240px', }); });

$('#one').ContentSlider({ speed : 400, </script>

width : '940px', easing : 'easeOutSine'

<script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> <div id="templatemo_content_wrapper"> <div id="contact_form"> </div> </div> <div id="content"> <h4>Please Login</h4>

<form method="post" name="login" action="loginaction.jsp"> <ul> User Name: <input type="text" name="username"/>

<div class="cleaner_h10"></div> Password : <input type="password" name="password" /> <div class="cleaner_h10"></div> <input type="submit" class="submit_btn float_l" name="submit" value="LOGIN" /> <input type="reset" class="submit_btn float_r" name="reset" value="RESET" /> </form> </div> </div> <div class="cleaner"></div> </div> </ul>

<div class="cleaner"></div>

<div id="templatemo_content_wrapper_bottm"></div>

<div id="templatemo_footer"> Copyright 2013<a href="#">MPTC Mala</a> | Designed by <a href="http://www.templatemo.com" target="_parent">Free CSS Templates</a> </div> </div> <!-- end of wrapper --> </div> <!-- end of wrapper_outer --> </body></html>

14.Individual customer stock <form id="form1" name="form1" method="post" action=""> <table width="660" height="429" border="0"> <tr> <td width="98">Card no. </td> <td width="181"><label> <select name="name" id="name" onchange="jspcall();"> <option value="">Select Card No</option> <% String number = ""; String name = ""; try { DatabaseAccess db = new DatabaseAccess(); // JOptionPane.showMessageDialog(null, hello ); query = "SELECT DISTINCT customer_id FROM tbl_customer ORDER BY `tbl_customer`.`customer_id` DESC"; String query = ""; String comboitem = "";

ResultSet rs1 = null; ResultSet rs2 = null; rs1 = db.dataRetrieve(query); while (rs1.next()) { number = rs1.getString("customer_id"); // JOptionPane.showMessageDialog(null, number); query = "select cardno from tbl_customer where customer_id = '" + number + "'"; rs2 = null; rs2 = db.dataRetrieve(query); if (rs2.next()) { name = rs2.getString("cardno"); comboitem = name; out.println("<option value='" + number + "'>" + comboitem + "</option>"); } } } catch (Exception ex) { } %> </select>

// JOptionPane.showMessageDialog(null, ex); </label></td> <td width="171">Date</td>

<td width="192"><label>

<input type="text" name="textfield2" value="<%out.println(today);%>" readonly="true"/>

</label></td> <tr> <td>&nbsp;</td>

</tr> <td>&nbsp;</td> <td>Card no.</td>

<td><input type="text" name="textfield2" value="<%out.println(cardno);%>" readonly="true"/></td> <td></td> <tr> <td>QUANTITY</td> </tr> <tr> </tr> <td>No</td> <td>ITEM</td> <td>PRICE</td> <td><label> <td>Unit Provide</td>

<input type="text" name="textfield4" value="1" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield5" value="Sugar" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield6" value="<%out.println(qty1);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield7" value="<%out.println(pr1);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield24" value="<%out.println(un1);%>" size="6" readonly="true"/> </label></td> </tr>

<tr>

<td><label> <input type="text" name="textfield8" value="2" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield9" value="Rice" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield10" value="<%out.println(qty2);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield11" value="<%out.println(pr2);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield24" value="<%out.println(un2);%>" size="6" readonly="true"/> </label></td> <tr> </tr> <td><label> <input type="text" name="textfield12" value="3" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield13" value="Wheat" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield14" value="<%out.println(qty3);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield15" value="<%out.println(pr3);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield24" value="<%out.println(un3);%>" size="6" readonly="true"/> </label></td> <tr> </tr> <td><label> <input type="text" name="textfield16" value="4" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield17" value="Kerosine" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield18" value="<%out.println(qty4);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield19" value="<%out.println(pr4);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield24" value="<%out.println(un4);%>" size="6" readonly="true"/> </label></td> <td><label> <input type="text" name="textfield20" value="5" size="6" readonly="true"/> </label></td> <td><label> </tr> <tr>

<input type="text" name="textfield21" value="Raw rice" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield22" value="<%out.println(qty5);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield23" value="<%out.println(pr5);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield24" value="<%out.println(un5);%>" size="6" readonly="true"/> </label></td> <td>&nbsp;</td> <td><label> <input type="submit" name="Submit" value="BACK" /> </label></td> 15.Individual customer stock1 <form id="form1" name="form1" method="post" action=""> <table width="660" height="429" border="0"> <tr> <td width="98">Card no. </td> <select name="name" id="name" onchange="jspcall();"> <option value="">Select Card No</option> <td width="181"><label> </tr> </table> </form> </tr> <td>&nbsp;</td> <tr> <td>&nbsp;</td>

<% String number = ""; String name = "";

String query = ""; String comboitem = ""; try {

DatabaseAccess db = new DatabaseAccess(); // JOptionPane.showMessageDialog(null, hello ); query = "SELECT DISTINCT customer_id FROM tbl_customer ORDER BY `tbl_customer`.`customer_id` DESC"; ResultSet rs1 = null; ResultSet rs2 = null; rs1 = db.dataRetrieve(query); while (rs1.next()) { number = rs1.getString("customer_id"); // JOptionPane.showMessageDialog(null, number); query = "select cardno from tbl_customer where customer_id = '" + number + "'"; rs2 = null; rs2 = db.dataRetrieve(query); if (rs2.next()) { name = rs2.getString("cardno"); comboitem = name;

out.println("<option value='" + number + "'>" + comboitem + "</option>"); } } } catch (Exception ex) { } %>

// JOptionPane.showMessageDialog(null, ex); </select> </label></td> <td width="192"><label>

<td width="171">Date</td>

<input type="text" name="textfield2" value="<%out.println(today);%>" readonly="true"/> </label></td> <td>&nbsp;</td> </tr> <td>Card no.</td> <tr> <td>&nbsp;</td>

<td><input type="text" name="textfield2" value="<%out.println(cardno);%>" readonly="true"/></td> <td></td> <tr> <td>QUANTITY</td> </tr> <tr> </tr> <td>No</td> <td>ITEM</td> <td>PRICE</td> <td><label> <td>Unit Provide</td>

<input type="text" name="textfield4" value="1" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield5" value="Sugar" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield6" value="<%out.println(qty1);%>" size="6" readonly="true"/>

</label></td>

<td><label>

<input type="text" name="textfield7" value="<%out.println(pr1);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield24" value="<%out.println(un1);%>" size="6" readonly="true"/> </label></td> <tr> </tr> <td><label> </label></td>

<input type="text" name="textfield8" value="2" size="6" readonly="true"/> <td><label>

<input type="text" name="textfield9" value="Rice" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield10" value="<%out.println(qty2);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield11" value="<%out.println(pr2);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield24" value="<%out.println(un2);%>" size="6" readonly="true"/> </label></td> <tr> </tr> <td><label> <input type="text" name="textfield12" value="3" size="6" readonly="true"/>

</label></td>

<td><label>

<input type="text" name="textfield13" value="Wheat" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield14" value="<%out.println(qty3);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield15" value="<%out.println(pr3);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield24" value="<%out.println(un3);%>" size="6" readonly="true"/> </label></td> <tr> </tr> <td><label> <input type="text" name="textfield16" value="4" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield17" value="Kerosine" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield18" value="<%out.println(qty4);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield19" value="<%out.println(pr4);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield24" value="<%out.println(un4);%>" size="6" readonly="true"/> </label></td> <tr> </tr> <td><label> <input type="text" name="textfield20" value="5" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield21" value="Raw rice" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield22" value="<%out.println(qty5);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield23" value="<%out.println(pr5);%>" size="6" readonly="true"/> </label></td> <td><label>

<input type="text" name="textfield24" value="<%out.println(un5);%>" size="6" readonly="true"/> </label></td> <tr> <td>&nbsp;</td> <td><label> <input type="submit" name="Submit" value="BACK" /> </label></td> </tr> </table> </form> </tr> <td>&nbsp;</td> <td>&nbsp;</td>

16.Item bill <form id="form1" name="form1" method="post" action=""> <table width="597" height="414" border="0"> <tr> <td colspan="3">Card Number <label>

<input type="text" name="cardno" value="<% out.println(cardno);%>" readonly="true"/></label></td> <td colspan="3">Retailer License Number<label> <input type="text" name="textfield2" value="<% out.println(licenseno);%>" readonly="true"/> </label></td> <tr> </tr> <td width="137">Date</td>

<td width="137"><input type="text" name="date" value="<% out.println(date);%>" readonly="true"/></td> </tr> <tr> <td width="137">ITEM</td> <td width="250">PRICE</td> <td><label> Sugar</label></td>

<td width="196">QUANTITY</td> </tr> <tr>

<td><input type="text" name="q1" value="<% out.println(quantity1);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<% out.println(price1);%>" readonly="true"/></td> </tr> <tr> <td><label> Rice</label></td>

<td><input type="text" name="q2" value="<% out.println(quantity2);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<% out.println(price2);%>" readonly="true"/></td>

</tr>

<tr>

<td><label>

Wheat</label></td>

<td><input type="text" name="q3" value="<% out.println(quantity3);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<% out.println(price3);%>" readonly="true"/></td> </tr> <tr> <td><label> Kerosine</label></td>

<td><input type="text" name="q4" value="<% out.println(quantity4);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<% out.println(price4);%>" readonly="true"/></td> </tr> <tr> <td><label> Raw rice</label></td>

<td><input type="text" name="q5" value="<% out.println(quantity5);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<% out.println(price5);%>" readonly="true"/></td> </tr> <tr> <td>&nbsp;</td>

<td><div align="center">Total</div></td> <td><input type="text" name="textfield3" value="<% out.println(total);%>" readonly="true"/></td> </tr> <td><label> <input type="submit" name="Submit" value="SEND" /> </label></td> 17.Item stock <form id="form1" name="form1" method="post" action="itemstockfunc.jsp?username=<%=username%>&type=<%=type%>"> </tr> </table> </form> <tr> <td>&nbsp;</td> <td>&nbsp;</td>

<table width="597" height="414" border="0"> <td colspan="3">Card Number

<tr> <label>

<input type="text" name="cardno" value="<% out.println(cardno);%>" readonly="true"/></label></td> <td colspan="3">Retailer License Number<label> <input type="text" name="licenseno" value="<% out.println(licenseno);%>" readonly="true"/> </label></td> <td width="137">Date</td> <td width="137"><input type="text" name="date" value="<% out.println(today);%>" readonly="true"/></td> </tr> <tr> </tr> <tr>

<td width="137">ITEM</td> <td width="137">UNIT PROVIDED</td> <td width="196">QUANTITY</td> <%-- <td width="250">PRICE</td> --%> </tr> <td><label> <tr> <input type="checkbox" name="checkbox1" value="sugar" /> Sugar</label></td> <td><input type="text" name="unit1" id="unit1" value="<% out.println(unit1);%>"/></td> <td><input type="text" name="q1" id="q1" value="0" onblur="valid()"/></td>

<%-- <td><input type="text" name="textfield37" /></td> --%> </tr> <td><label> Rice</label></td> <td><input type="text" name="unit2" id="unit2" value="<% out.println(unit2);%>"/></td> <td><input type="text" name="q2" id="q2" value="0" onblur="valid()"/></td> </tr> <tr> <td><label> <input type="checkbox" name="checkbox3" value="wheat" /> Wheat</label></td> <td><input type="text" name="unit3" id="unit3" value="<% out.println(unit3);%>"/></td> <td><input type="text" name="q3" id="q3" value="0" onblur="valid()"/></td> </tr> <tr> <td><label> <tr> <input type="checkbox" name="checkbox2" value="rice" />

<input type="checkbox" name="checkbox4" value="kerosine" /> Kerosine</label></td> <td><input type="text" name="unit4" id="unit4" value="<% out.println(unit4);%>"/></td> <td><input type="text" name="q4" id="q4" value="0" onblur="valid()"/></td> </tr> <tr> <td><label>

<input type="checkbox" name="checkbox5" value="rawrice" /> Raw rice</label></td> <td><input type="text" name="unit5" id="unit5" value="<% out.println(unit5);%>"/></td> <td><input type="text" name="q5" id="q5" value="0" onblur="valid()"/></td> </tr> <%-<tr> <td>&nbsp;</td>

<td><div align="center">Total</div></td> <td><input type="text" name="textfield3" /></td> </tr>--%> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><label>

<input type="submit" name="Submit" value="SEND" /> </label></td> 18.Item stock func <%@page import="java.sql.ResultSet"%> <%@page import="dao.DatabaseAccess"%> <%@page import="javax.swing.JOptionPane"%> <% String username = request.getParameter("username"); String type = request.getParameter("type"); String cardno = request.getParameter("cardno"); </tr> </table> </form>

String date = request.getParameter("date"); String licenseno = request.getParameter("licenseno"); String customerid = ""; String check4 = ""; String q3 = ""; String check1 = ""; String check5 = ""; String q4 = ""; String q5 = ""; String check2 = ""; String q1 = ""; String check3 = ""; String q2 = "";

String unit1 = "", unit2 = "", unit3 = "", unit4 = "", unit5 = ""; int sugarapl = 30, sugarbpl = 25, riceapl = 20, ricebpl = 5, wheatapl = 22, wheatbpl = 15, kapl = 20, kbpl = 15, rawapl = 22, rawbpl = 16; int total = 0, c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0, p1 = 0, p2 = 0, p3 = 0, p4 = 0, p5 = 0; int u1 = 0, u2 = 0, u3 = 0, u4 = 0, u5 = 0, n1 = 0, n2 = 0, n3 = 0, n4 = 0, n5 = 0; int r1 = 0, r2 = 0, r3 = 0, r4 = 0, r5 = 0, ba1=0, ba2=0, ba3=0, ba4=0, ba5=0, pr1=0, pr2=0, pr3=0, pr4=0, pr5=0, total1=0; try { try { check1 = request.getParameter("checkbox1"); } } catch (Exception e) { } catch (Exception e) { } catch (Exception e) { } catch (Exception e) { } } } } } }

} catch (Exception e) { try { try { try { try { try { try {

check2 = request.getParameter("checkbox2"); check3 = request.getParameter("checkbox3"); check4 = request.getParameter("checkbox4"); check5 = request.getParameter("checkbox5"); q1 = request.getParameter("q1"); q2 = request.getParameter("q2");

c1 = Integer.parseInt(q1); c2 = Integer.parseInt(q2);

} catch (Exception e) { } catch (Exception e) {

try { try { try {

q3 = request.getParameter("q3"); q4 = request.getParameter("q4"); q5 = request.getParameter("q5");

c3 = Integer.parseInt(q3); c4 = Integer.parseInt(q4); c5 = Integer.parseInt(q5);

} catch (Exception e) { } catch (Exception e) { }

} catch (Exception e) { }

String query = ""; String query2 = ""; String query6 = "";

DatabaseAccess db = new DatabaseAccess(); String query3 = ""; String query7 = ""; String query4 = ""; String query8 = "";

String query1 = ""; String query5 = ""; ResultSet rs1 = null;

query = "select customer_id from tbl_customer where Name='" + username + "'"; rs1 = db.dataRetrieve(query); while (rs1.next()) { customerid = rs1.getString("customer_id"); }

query3 = "select * from tbl_customerindividualstock where customer_id='" + customerid + "'"; rs1 = db.dataRetrieve(query3); unit2 = rs1.getString("unitprovide2"); unit4 = rs1.getString("unitprovide4"); while (rs1.next()) { unit1 = rs1.getString("unitprovide1");

unit3 = rs1.getString("unitprovide3"); unit5 = rs1.getString("unitprovide5"); }

query = "select * from tbl_retailerstockdetails where licenceno = '" + licenseno + "'"; rs1 = db.dataRetrieve(query); while (rs1.next()) { r1 = Integer.parseInt(rs1.getString("sold1")); r3 = Integer.parseInt(rs1.getString("sold3")); r5 = Integer.parseInt(rs1.getString("sold5")); r2 = Integer.parseInt(rs1.getString("sold2")); r4 = Integer.parseInt(rs1.getString("sold4")); ba1 = Integer.parseInt(rs1.getString("quantity1"));

ba2 = Integer.parseInt(rs1.getString("quantity2")); ba4 = Integer.parseInt(rs1.getString("quantity4")); pr1 = Integer.parseInt(rs1.getString("p1")); pr3 = Integer.parseInt(rs1.getString("p3")); pr5 = Integer.parseInt(rs1.getString("p5"));

ba3 = Integer.parseInt(rs1.getString("quantity3")); ba5 = Integer.parseInt(rs1.getString("quantity5")); pr2 = Integer.parseInt(rs1.getString("p2")); pr4 = Integer.parseInt(rs1.getString("p4")); total1 = Integer.parseInt(rs1.getString("mtotal")); }

// JOptionPane.showMessageDialog(null, "total1{i}="+total1); u1 = Integer.parseInt(unit1); u4 = Integer.parseInt(unit4); n1 = u1 - c1; n5 = u5 - c5; p4 = c4 * kapl; u2 = Integer.parseInt(unit2); u5 = Integer.parseInt(unit5); n3 = u3 - c3; p2 = c2 * riceapl; u3 = Integer.parseInt(unit3); if (type.equals("APL")) { n4 = u4 - c4; p3 = c3 * wheatapl;

n2 = u2 - c2; p1 = c1 * sugarapl; p5 = c5 * rawapl;

total = p1 + p2 + p3 + p4 + p5;

query1 = "insert into tbl_customerbill(customer_id,item1,quantity1,price1,item2,quantity2,price2,item3,quantity3,price3,item4,quantity4,price4,item5,quantity5,price5,total,date,ca rdno,licenseno,bill_status) values('" + customerid + "','" + check1 + "','" + c1 + "','" + p1 + "','" + check2 + "','" + c2 + "','" + p2 + "','" + check3 + "','" + c3 + "','" + p3 + "','" + check4 + "','" + c4 + "','" + p4 + "','" + check5 + "','" + c5 + "','" + p5 + "','" + total + "','" + date + "','" + cardno + "','" + licenseno + "','unpaid')"; db.dataUpdate(query1); // JOptionPane.showMessageDialog(null, query1); r1 = r1 + c1; ba1 = ba1 - c1; ba5 = ba5 - c5; r2 = r2 + c2; ba2 = ba2 - c2; pr1 = pr1 + p1; r3 = r3 + c3; ba3 = ba3 - c3; pr2 = pr2 + p2; // JOptionPane.showMessageDialog(null, total); r4 = r4 + c4; ba4 = ba4 - c4; pr3 = pr3 + p3; r5 = r5 + c5;

pr4 = pr4 + p4;

pr5 = pr5 + p5;

total1 = pr1 + pr2 + pr3 + pr4 + pr5;

// JOptionPane.showMessageDialog(null, "total1{ii}="+total1); query4 = " update tbl_customerindividualstock set unitprovide1='" + n1 + "',unitprovide2='" + n2 + "',unitprovide3='" + n3 + "',unitprovide4='" + n4 + "',unitprovide5='" + n5 + "' where customer_id='" + customerid + "'"; db.dataUpdate(query4); query5 = " update tbl_retailerstockdetails set quantity1='"+ ba1 +"',sold1='" + r1 + "',p1='"+ pr1 +"',quantity2='"+ ba2 +"',sold2='" + r2 + "',p2='"+ pr2 +"',quantity3='"+ ba3 +"',sold3='" + r3 + "',p3='"+ pr3 +"',quantity4='"+ ba4 +"',sold4='" + r4 + "',p4='"+ pr4 +"',quantity5='"+ ba5 +"',sold5='" + r5 + "',p5='"+ pr5 +"',mtotal='"+ total1 +"' where licenceno='" + licenseno + "'"; db.dataUpdate(query5); query7 = "insert into tbl_monthlyreport(date,licenceno,snet,sold1,p1,rnet,sold2,p2,wnet,sold3,p3,knet,sold4,p4,rwnet,sold5,p5,totalprice) values('"+ date +"','"+ licenseno +"','"+ ba1 +"','" + r1 + "','"+ pr1 +"','"+ ba2 +"','" + r2 + "','"+ pr2 +"','"+ ba3 +"','" + r3 + "','"+ pr3 +"','"+ ba4 +"','" + r4 + "','"+ pr4 +"','"+ ba5 +"','" + r5 + "','"+ pr5 +"','"+ total1+"')"; db.dataUpdate(query7); response.sendRedirect("itemsbill.jsp?username=" + username + "&cardno=" + cardno + "&customer_id=" + customerid + ""); } else if (type.equals("BPL")) { n2 = u2 - c2; n3 = u3 - c3; p2 = c2 * ricebpl; n1 = u1 - c1; // JOptionPane.showMessageDialog(null, n1);

// JOptionPane.showMessageDialog(null, n2); n4 = u4 - c4; n5 = u5 - c5; p1 = c1 * sugarbpl; p5 = c5 * rawbpl;

p3 = c3 * wheatbpl;

p4 = c4 * kbpl;

total = p1 + p2 + p3 + p4 + p5; query2 = "insert into tbl_customerbill(customer_id,item1,quantity1,price1,item2,quantity2,price2,item3,quantity3,price3,item4,quantity4,price4,item5,quantity5,price5,total,date,ca

rdno,licenseno,bill_status) values('" + customerid + "','" + check1 + "','" + c1 + "','" + p1 + "','" + check2 + "','" + c2 + "','" + p2 + "','" + check3 + "','" + c3 + "','" + p3 + "','" + check4 + "','" + c4 + "','" + p4 + "','" + check5 + "','" + c5 + "','" + p5 + "','" + total + "','" + date + "','" + cardno + "','" + licenseno + "','unpaid')"; db.dataUpdate(query2); r1 = r1 + c1; ba1 = ba1 - c1; ba5 = ba5 - c5; pr4 = pr4 + p4; r2 = r2 + c2; ba2 = ba2 - c2; pr1 = pr1 + p1; pr5 = pr5 + p5; r3 = r3 + c3; ba3 = ba3 - c3; pr2 = pr2 + p2; r4 = r4 + c4; ba4 = ba4 - c4; pr3 = pr3 + p3; r5 = r5 + c5;

total1 = pr1 + pr2 + pr3 + pr4 + pr5;

// JOptionPane.showMessageDialog(null, "total1{ii}="+total1); query1 = " update tbl_customerindividualstock set unitprovide1='" + n1 + "',unitprovide2='" + n2 + "',unitprovide3='" + n3 + "',unitprovide4='" + n4 + "',unitprovide5='" + n5 + "' where customer_id='" + customerid + "'"; db.dataUpdate(query1); query6 = " update tbl_retailerstockdetails set quantity1='"+ ba1 +"',sold1='" + r1 + "',p1='"+ pr1 +"',quantity2='"+ ba2 +"',sold2='" + r2 + "',p2='"+ pr2 +"',quantity3='"+ ba3 +"',sold3='" + r3 + "',p3='"+ pr3 +"',quantity4='"+ ba4 +"',sold4='" + r4 + "',p4='"+ pr4 +"',quantity5='"+ ba5 +"',sold5='" + r5 + "',p5='"+ pr5 +"',mtotal='"+ total1 +"' where licenceno='" + licenseno + "'"; db.dataUpdate(query6); query8 = "insert into tbl_monthlyreport(date,licenceno,snet,sold1,p1,rnet,sold2,p2,wnet,sold3,p3,knet,sold4,p4,rwnet,sold5,p5,totalprice) values('"+ date +"','"+ licenseno +"','"+ ba1 +"','" + r1 + "','"+ pr1 +"','"+ ba2 +"','" + r2 + "','"+ pr2 +"','"+ ba3 +"','" + r3 + "','"+ pr3 +"','"+ ba4 +"','" + r4 + "','"+ pr4 +"','"+ ba5 +"','" + r5 + "','"+ pr5 +"','"+ total1+"')"; // JOptionPane.showMessageDialog(null, date); db.dataUpdate(query8); response.sendRedirect("itemsbill.jsp?username=" + username + "&cardno=" + cardno + "&customer_id=" + customerid + ""); // JOptionPane.showMessageDialog(null, query8);

} } catch (Exception ex) { // JOptionPane.showMessageDialog(null, ex); }

/* JOptionPane.showMessageDialog(null, username); JOptionPane.showMessageDialog(null, cardno); 19.Logination <%@page import="dao.DatabaseAccess"%> <%@page import="java.sql.ResultSet"%> <%@page import="javax.swing.JOptionPane"%> <% String name = " "; String name2 = " "; String password = " "; String password2 = " ";

JOptionPane.showMessageDialog(null, check1); JOptionPane.showMessageDialog(null, c1);*/ %>

String name1 = " "; String type = "";

String password1 = " "; String retailerid= "";

DatabaseAccess db = new DatabaseAccess(); String query = ""; try { try { String query1 = ""; ResultSet rs = null; ResultSet rs1 = null; } }

name = request.getParameter("username"); password = request.getParameter("password");

} catch (Exception e) { } catch (Exception e) {

String username = name; try {

//session.setAttribute("username", username);

query = "select * from tbl_customer where Name='" + name + "' and cardno='" + password + "'";

rs = db.dataRetrieve(query); int count = 0; while (rs.next()) { name1 = rs.getString("Name"); } } catch (Exception e) { }

password1 = rs.getString("cardno"); try {

type = rs.getString("type");

query = "select * from tbl_retailer where name='" + name + "' and licenceno='" + password + "' and status='Accepted'"; rs = db.dataRetrieve(query); while (rs.next()) { int count = 0; retailerid = rs.getString("retailer_id"); } name2 = rs.getString("name"); }

password2 = rs.getString("licenceno");

} catch (Exception e) {

// JOptionPane.showMessageDialog(null, name + " "+password); if (name == null || password == null) {

// JOptionPane.showMessageDialog(null,"Invalid paramters "); response.sendRedirect("index.jsp"); } // Here you put the check on the username and password

else if (name.equals("admin") && password.equals("admin")) { session.setAttribute("username", "admin"); session.setAttribute("usertype", "admin"); response.sendRedirect("adminform.jsp");

} else if (name.equals(name1) && password.equals(password1)) { // JOptionPane.showMessageDialog(null, username); session.setAttribute("username",name1); session.setAttribute("usertype", "customer"); response.sendRedirect("itemstock.jsp?username=" + name + ""); }else if (name.equals(name2) && password.equals(password2)) { // JOptionPane.showMessageDialog(null, username); session.setAttribute("username",name2); session.setAttribute("usertype", "retailer"); response.sendRedirect("retailerform.jsp?username=" + name2 + ""); }else { response.sendRedirect("index.jsp"); JOptionPane.showMessageDialog(null,"please enter the correct Username and Password"); 20.Main stock func <%@page import="java.text.SimpleDateFormat"%> <%@page import="javax.swing.JOptionPane"%> <%@page import="java.sql.ResultSet"%> <%@page import="dao.DatabaseAccess"%> } %>

<% String license = request.getParameter("license"); String retailerid = ""; String date = ""; String i1 = "", i2 = "", i3 = "", i4 = "", i5 = ""; String p1 = "", p2 = "", p3 = "", p4 = "", p5 = "";

String q1 = "", q2 = "", q3 = "", q4 = "", q5 = ""; String t = "";

int total = 0, c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0, u1 = 0, u2 = 0, u3 = 0, u4 = 0, u5 = 0; int sugar = 20,rice = 4,wheat = 10,k = 10,raw = 12,m1=0,m2=0,m3=0,m4=0,m5=0; int qu1=0,qu2=0,qu3=0,qu4=0,qu5=0,pr1=0,pr2=0,pr3=0,pr4=0,pr5=0; DatabaseAccess db = new DatabaseAccess(); try { try { date = request.getParameter("date");

// JOptionPane.showMessageDialog(null, date); } catch (Exception e) { try { }

i1 = request.getParameter("i1"); } catch (Exception e) { }

// JOptionPane.showMessageDialog(null, i1); try { i2 = request.getParameter("i2");

// JOptionPane.showMessageDialog(null, i2); } catch (Exception e) { try { } // JOptionPane.showMessageDialog(null, i3);

i3 = request.getParameter("i3");

} catch (Exception e) { try {

i4 = request.getParameter("i4"); } catch (Exception e) { }

// JOptionPane.showMessageDialog(null, i4); try { i5 = request.getParameter("i5"); }

// JOptionPane.showMessageDialog(null, i5);

} catch (Exception e) { try {

q1 = request.getParameter("q1");

c1 = Integer.parseInt(q1); } catch (Exception e) { c2 = Integer.parseInt(q2); } catch (Exception e) { c3 = Integer.parseInt(q3); } catch (Exception e) { c4 = Integer.parseInt(q4); } catch (Exception e) { c5 = Integer.parseInt(q5); } catch (Exception e) { } } } } }

// JOptionPane.showMessageDialog(null, c1); try { q2 = request.getParameter("q2");

// JOptionPane.showMessageDialog(null, c2); try { q3 = request.getParameter("q3");

// JOptionPane.showMessageDialog(null, c3); try { q4 = request.getParameter("q4");

// JOptionPane.showMessageDialog(null, c4); try { q5 = request.getParameter("q5");

// JOptionPane.showMessageDialog(null, c5); u1 = c1 * sugar; u5 = c5 * raw; String query2 = ""; u2 = c2 * rice;

u3 = c3 * wheat;

u4 = c4 * k; String query1 = ""; String query4 = "";

total = u1 + u2 + u3 + u4 + u5; String query3 = "";

String query = ""; String query5 = "";

ResultSet rs2 = null; while(rs2.next()){

query4 = "select * from tbl_mainstock";

rs2 = db.dataRetrieve(query4);

m1 = Integer.parseInt(rs2.getString("sugar")); m3 = Integer.parseInt(rs2.getString("wheat")); m5 = Integer.parseInt(rs2.getString("rawrice")); ResultSet rs1 = null; ResultSet rs = null;

m2 = Integer.parseInt(rs2.getString("rice")); m4 = Integer.parseInt(rs2.getString("kerosine")); }

query3 = "select * from tbl_retailerstockdetails where licenceno='"+ license +"'"; rs = db.dataRetrieve(query3); while(rs.next()){ qu1 = Integer.parseInt(rs.getString("quantity1")); qu3 = Integer.parseInt(rs.getString("quantity3")); qu5 = Integer.parseInt(rs.getString("quantity5")); pr2 = Integer.parseInt(rs.getString("price2")); pr4 = Integer.parseInt(rs.getString("price4")); //date1 = rs.getString("date"); } qu2 = Integer.parseInt(rs.getString("quantity2")); qu4 = Integer.parseInt(rs.getString("quantity4")); /* pr1 = Integer.parseInt(rs.getString("price1")); pr3 = Integer.parseInt(rs.getString("price3")); pr5 = Integer.parseInt(rs.getString("price5"));*/

// JOptionPane.showMessageDialog(null, qu1); qu1 = qu1 + c1; qu5 = qu5 + c5; qu2 = qu2 + c2; m1 = m1 - c1; qu3 = qu3 + c3; m2 = m2 - c2; qu4 = qu4 + c4; m3 = m3 - c3;

m4 = m4 - c4;

m5 = m5 - c5;

//

JOptionPane.showMessageDialog(null, qu1);

query = "insert into tbl_retailermainstock(licenceno,item1,quantity1,price1,item2,quantity2,price2,item3,quantity3,price3,item4,quantity4,price4,item5,quantity5,price5,date,total) values('"+ license +"','sugar','"+ c1 +"','"+ u1 +"','rice','"+ c2 +"','"+ u2 +"','wheat','"+ c3 +"','"+ u3 +"','kerosine','"+ c4 +"','"+ u4+"','rawrice','"+ c5 +"','"+ u5 +"','"+ date +"','"+ total +"')"; db.dataUpdate(query); query2 = "update tbl_retailerstockdetails set date='"+ date +"',quantity1='"+ qu1 +"',quantity2='"+ qu1 +"',quantity3='"+ qu1 +"',quantity4='"+ qu1 +"',quantity5='"+ qu1 +"' where licenceno ='"+ license +"'"; db.dataUpdate(query2); // JOptionPane.showMessageDialog(null, query2); query5 = "update tbl_mainstock set sugar='"+ m1 +"',rice='"+ m2 +"',wheat='"+ m3 +"',kerosine='"+ m4 +"',rawrice='"+ m5 +"'"; db.dataUpdate(query5); query1 = "select retailer_id from tbl_retailer where licenceno='"+ license +"'"; rs1 = db.dataRetrieve(query1); while(rs1.next()){ retailerid = rs1.getString("retailer_id"); }

response.sendRedirect("mainstockview.jsp?retailer_id="+ retailerid +"&licenseno="+ license +""); } catch (Exception ex) { 21.Mainstock view <form id="form1" name="form1" method="post" action="mainstockfunc.jsp"> // JOptionPane.showMessageDialog(null, ex); } %>

<table width="578" height="359" border="0"> <tr><label>License No <td><input type="text" name="license" value="<%out.println(license);%>"/> </label> <tr> </tr> <td width="173">ITEM</td> <td width="196">PRICE</td> </tr> </td>

<td width="195">QUANTITY</td> <tr>

<td><input type="text" name="i1" value="Sugar" readonly="true"/></td>

<td><input type="text" name="q1" value="<%out.println(q1);%>" readonly="true"/></td> <td><input type="text" name="p1" value="<%out.println(p1);%>" readonly="true"/></td> </tr> <tr> <td><input type="text" name="i2" value="Rice" readonly="true"/></td>

<td><input type="text" name="q2" value="<%out.println(q2);%>" readonly="true"/></td> <td><input type="text" name="p2" value="<%out.println(p2);%>" readonly="true"/></td></tr> <tr> <td><input type="text" name="i3" value="Wheat" readonly="true"/></td>

<td><input type="text" name="q3" value="<%out.println(q3);%>" readonly="true"/></td> <td><input type="text" name="p3" value="<%out.println(p3);%>" readonly="true"/></td></tr> <tr> <td><input type="text" name="i4" value="Kerosine" readonly="true"/></td> <td><input type="text" name="q4" value="<%out.println(q4);%>" readonly="true"/></td> <td><input type="text" name="p4" value="<%out.println(p4);%>" readonly="true"/></td></tr>

<tr>

<td><input type="text" name="i5" value="Rawrice" readonly="true"/></td> <td><input type="text" name="q5" value="<%out.println(q5);%>" readonly="true"/></td> <td><input type="text" name="p5" value="<%out.println(p5);%>" readonly="true"/></td></tr> <tr> <td>&nbsp;</td> <td><b>Total</b></td>

<td><input type="text" name="total" value="<%out.println(total);%>" readonly="true"/></td></tr> <tr> <td><label> </label></td> 22.Memberreg <form id="form1" name="form1" method="post" action="memberregsave.jsp" onsubmit="validateForm()"> <table width="642" height="514" border="0"> <tr> <td width="98"> Retailer License No. </td> <td width="185"><label> <select name="name" id="name" onchange="jspcall();"> <option value="">Select License no</option> <% String number = ""; String query = ""; <td>&nbsp;</td> <td>&nbsp;</td>

<input type="submit" name="Submit" value="Provide" /> </tr> </table> </form>

String comboitem = ""; String license = ""; try { DatabaseAccess db = new DatabaseAccess();

// JOptionPane.showMessageDialog(null, hello ); query = "SELECT DISTINCT retailer_id FROM tbl_retailer ORDER BY `tbl_retailer`.`retailer_id` DESC"; ResultSet rs1 = null; ResultSet rs2 = null; rs1 = db.dataRetrieve(query); while (rs1.next()) { number = rs1.getString("retailer_id"); // JOptionPane.showMessageDialog(null, number);

query = "select licenceno from tbl_retailer where retailer_id = '" + number + "'"; rs2 = null; rs2 = db.dataRetrieve(query); if (rs2.next()) { license = rs2.getString("licenceno"); comboitem = license; out.println("<option value='" + number + "'>" + comboitem + "</option>");

} } catch (Exception ex) {

} %>

// JOptionPane.showMessageDialog(null, ex);} </select> </label></td>

<td width="132">Taluk</td>

<td width="209"><label> </label></td> <td width="185"><label> </label></td> </tr>

<input type="text" name="taluk" id="taluk"/> <td width="98"> Card No. </td>

<input type="text" name="cardno" id="cardno"/> <tr> <td>Retailer License no</td>

<td><input type="text" name="licenseno" id="licenseno" value="<% out.println(licenseno);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>District</td> </tr>

<td><input type="text" name="district" id="district"/></td> <td>Type</td> <td><label> APL </tr>

<input name="type" type="radio" id="type" value="APL" /> <input name="type" type="radio" id="type" value="BPL" /> <tr> <td>Name</td> BPL</label></td>

<td><input type="text" name="custname" id="custname"/></td> <td>&nbsp;</td> <td>&nbsp;</td> </tr>

<tr>

<td>House Name </td>

<td><input type="text" name="housename" id="housename"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>Place</td> </tr>

<td><input type="text" name="place" id="place"/></td> <td>&nbsp;</td> <tr> <td>Area</td> <td>&nbsp;</td> </tr>

<td colspan="3"> <label> Panchayath<input name="radioarea" type="radio" id="radioarea" value="Panchayath" /> Corperation <input name="radioarea" type="radio" id="radioarea" value="Corporation" /> Muncipality<input name="radioarea" type="radio" id="radioarea" value="Municipality" /> </label></td> <tr> </tr> <td>Ward No </td> <select name="wardno" id="wardno"> <option>1</option> <option>3</option> <option>5</option> <option>7</option> <td><label> <option>Select</option> <option>2</option> <option>4</option> <option>6</option> <option>8</option>

<option>9</option> <td>&nbsp;</td> <tr>

</select> <td>&nbsp;</td> </tr> <td><label>

</label></td>

<td>House No </td> <input type="text" name="houseno" id="houseno"/> </label></td> <td>&nbsp;</td> <td>No.of members </td>

<td>&nbsp;</td> <td><label>

</tr>

<tr>

<input type="text" name="memberno" id="memberno"/> </label></td> <tr> <td>&nbsp;</td> <td>Adults</td> <input type="text" name="adult" id="adults"/> <td>Child</td> <td><label> <td>&nbsp;</td> <td><label> </label></td> </tr>

<input type="text" name="child" id="child"/> </label></td> </tr> <tr> <td>Providing Unit </td> <td><label> <input type="text" name="prounit" id="prounit"/>

</label></td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>Monthly Income </td> <td><label> <input type="text" name="mincome" id="mincome"/> </label></td> <td>&nbsp;</td> <td>&nbsp;</td> <tr> <td><label> </label></td> <td>&nbsp;</td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> </tr> <td>&nbsp;</td> </tr> <td>Issued Date </td> <input type="text" name="isdate" id="isdate"/>

<td>&nbsp;</td> <td><label> <input type="submit" name="Submit" value="SUBMIT" /> </label></td> 23.Memberregsave <%@page import="java.util.Calendar"%> <%@page import="java.util.GregorianCalendar"%> <%@page import="dao.DatabaseAccess"%> <%@page import="java.sql.ResultSet"%> <%@page import="javax.swing.JOptionPane"%> <% String taluk = ""; String name = ""; String wardno = ""; String child = ""; String customerid = ""; String cardno = ""; String housename = ""; String houseno = ""; String prounit = ""; String district = ""; String place = ""; String memberno = ""; String mincome = ""; String type = ""; String radioarea = ""; String adults = ""; String isdate = ""; </tr> </table> </form>

String licenseno = "";

DatabaseAccess db = new DatabaseAccess(); try { try { taluk = request.getParameter("taluk"); } catch (Exception e) { }

try { try { try {

district = request.getParameter("district"); cardno = request.getParameter("cardno"); licenseno = request.getParameter("licenseno");

} catch (Exception e) { } catch (Exception e) {

} }

// JOptionPane.showMessageDialog(null, licenseno); try { try { type = request.getParameter("type"); name = request.getParameter("custname");

} catch (Exception e) { } catch (Exception e) { }

// JOptionPane.showMessageDialog(null, name); try { try { try { try { try { try { try { try { try { try { try {

} catch (Exception e) {

} }

housename = request.getParameter("housename"); place = request.getParameter("place"); radioarea = request.getParameter("radioarea"); wardno = request.getParameter("wardno"); houseno = request.getParameter("houseno"); memberno = request.getParameter("memberno"); adults = request.getParameter("adults"); child = request.getParameter("child"); prounit = request.getParameter("prounit"); mincome = request.getParameter("mincome"); isdate = request.getParameter("isdate");

} catch (Exception e) { } } } } }

} catch (Exception e) { } catch (Exception e) { } catch (Exception e) { } catch (Exception e) {

} catch (Exception e) { } } } }

} catch (Exception e) { } catch (Exception e) { } catch (Exception e) { } catch (Exception e) {

// JOptionPane.showMessageDialog(null, isdate); String query = ""; ResultSet rs1 = null; String query1 = ""; String apl = "APL";

} catch (Exception e) { String query2 = ""; String bpl = "BPL";

String query3 = ""; int day, month, year;

GregorianCalendar g = new GregorianCalendar(); day = g.get(Calendar.DAY_OF_MONTH); year = g.get(Calendar.YEAR); try { query = "INSERT INTO tbl_customer(taluk,district,cardno,licenseno,type,Name,housename,place,typeofarea,wardno,houseno,memberno,adults,child,providingunit,monthlyincome,da te) VALUES ('" + taluk + "','" + district + "','" + cardno + "','"+ licenseno +"','" + type + "','" + name + "','" + housename + "','" + place + "','" + radioarea + "','" + wardno + "','" + houseno + "','" + memberno + "','" + adults + "','" + child + "','" + prounit + "','" + mincome + "','" + isdate + "')"; //JOptionPane.showMessageDialog(null, query); db.dataUpdate(query); query1 = "select customer_id,type,cardno from tbl_customer where Name='" + name + "'"; //JOptionPane.showMessageDialog(null, query1); rs1 = db.dataRetrieve(query1); while (rs1.next()) { customerid = rs1.getString("customer_id"); type = rs1.getString("type"); cardno = rs1.getString("cardno"); month = g.get(Calendar.MONTH);

String d1 = day + "/" + month + "/" + year;

} // JOptionPane.showMessageDialog(null, customerid); // JOptionPane.showMessageDialog(null, type); if (type.equals(apl)) { // JOptionPane.showMessageDialog(null, "APL"); query2 = "INSERT INTO tbl_customerindividualstock(customer_id,item1,quantity1,price1,unitprovide1,item2,quantity2,price2,unitprovide2,item3,quantity3,price3,unitprovide3,item4,q uantity4,price4,unitprovide4,item5,quantity5,price5,unitprovide5,date,cardno,licenseno,type) VALUES ('" + customerid + "','sugar','1','30','2','rice','1','20','20','wheat','1','22','10','kerosine','1','20','2','rawrice','1','22','10','" + d1 + "','" + cardno + "','"+ licenseno +"','" + type + "')"; db.dataUpdate(query2); } else if (type.equals(bpl)) { // JOptionPane.showMessageDialog(null, "BPL"); query3 = "INSERT INTO tbl_customerindividualstock(customer_id,item1,quantity1,price1,unitprovide1,item2,quantity2,price2,unitprovide2,item3,quantity3,price3,unitprovide3,item4,q uantity4,price4,unitprovide4,item5,quantity5,price5,unitprovide5,date,cardno,licenseno,type) VALUES ('" + customerid + "','sugar','1','25','3','rice','1','5','30','wheat','1','15','20','kerosine','1','15','3','rawrice','1','16','15','" + d1 + "','" + cardno + "','"+ licenseno +"','" + type + "')"; db.dataUpdate(query3); } response.sendRedirect("memberreg.jsp"); } catch (Exception e) { // JOptionPane.showMessageDialog(null, e);

} } catch (Exception ex) { // 24.Menu <div id='cssmenu'> <ul> <li class='active'><a href='index.jsp'><span>Home</span></a></li> JOptionPane.showMessageDialog(null, ex); } %>

<li class='has-sub'><a href='#'><span>Registration</span></a> <ul> <li><a href="retailerreg.jsp"><span>Retailer</span></a></li> </ul> </li> </ul></div>

<li class='last'><a href="memberreg.jsp"><span>Customer</span></a></li> 25.Menu admin <div id='cssmenu'> <ul> <li class='active'><a href="adminform.jsp"><span>Home</span></a></li>

<li class='has-sub'><a href='#'><span>Stock</span></a> <ul> <li><a href="adminmainstock.jsp"><span>Main Provide</span></a></li>

<li><a href="requestadmin.jsp"><span>Request</span></a></li> <li><a href="adminstockprovide.jsp"><span>Stock Provide</span></a></li> <li class='has-sub'><a href='#'><span>Details</span></a> <ul> <li><a href="retailerdetails.jsp"><span>Retailer</span></a></li> </ul> </li>

<li><a href="retailerstock.jsp"><span>Retailer Stock</span></a></li> <li class='last'><a href="monthlyreport.jsp"><span>Report</span></a></li> <li class='last'><a href="index.jsp"><span>Logout</span></a></li> </ul></div> 26.Menu retailer <div id='cssmenu'> <ul>

</ul>

</li>

<li class='active'><a href="retailerform.jsp?username=<%=username%>"><span>Home</span></a></li>

<li class='has-sub'><a href='#'><span>Account</span></a> <ul> <li><a href="customerbillviewretailer1.jsp?username=<%=username%>"><span>Bills</span></a></li> </ul> </li>

<li class='last'><a href="customerdetails.jsp"><span>Customer</span></a></li> <li class='last'><a href="index.jsp"><span>Logout</span></a></li> </ul></div> 27.Monthly report <form id="form1" name="form1" method="post" action=""> <table width="610" height="401" border="0"> <tr> <td width="168">Retailer License</td>

<td width="161"><label>

<select name="name" id="name" onchange="jspcall();">

<option value="">Select License No</option> <% String number = ""; String query = ""; String comboitem = "";

String name = ""; DatabaseAccess db = new DatabaseAccess();

try {

// JOptionPane.showMessageDialog(null, hello ); query = "SELECT DISTINCT licenceno FROM tbl_retailer ORDER BY `tbl_retailer`.`licenceno` DESC"; ResultSet rs1 = null; ResultSet rs2 = null; rs1 = db.dataRetrieve(query); while (rs1.next()) { number = rs1.getString("licenceno"); // JOptionPane.showMessageDialog(null, number); query = "select name from tbl_retailer where licenceno = '" + number + "'"; rs2 = null; rs2 = db.dataRetrieve(query); if (rs2.next()) { name = rs2.getString("name"); comboitem = name; out.println("<option value='" + number + "'>" + comboitem + "</option>"); }

} } catch (Exception ex) { // JOptionPane.showMessageDialog(null, ex); </select> <tr> </label></td> <td>License no</td> } </tr> %>

<td><input type="text" name="license" value="<%out.println(var);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>BALANCE</td> </tr> <% try { int i = 0, j = 0; var = request.getParameter("licenseno"); <td>&nbsp;</td> <td>&nbsp;</td> <td>SOLD</td> </tr> <td>&nbsp;</td> <td>SOLD PRICE</td>

if (!var.equalsIgnoreCase(" ")) { try { Class.forName("com.mysql.jdbc.Driver");

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact ResultSet r1 = smt.executeQuery("select * from tbl_monthlyreport where(licenceno='" + var + "' and month(date) = 3);"); while (r1.next()) {

sold1 = r1.getInt("sold1"); sold3 = r1.getInt("sold3"); sold5 = r1.getInt("sold5"); rem2 = r1.getInt("rnet"); rem4 = r1.getInt("knet"); // JOptionPane.showMessageDialog(null, rem1); p1 = r1.getInt("p1"); p3 = r1.getInt("p3"); p5 = r1.getInt("p5"); mtotal = r1.getInt("totalprice"); /* p1 = 20 * Integer.parseInt(rem1);

sold2 = r1.getInt("sold2"); sold4 = r1.getInt("sold4"); rem1 = r1.getInt("snet"); rem3 = r1.getInt("wnet"); rem5 = r1.getInt("rwnet");

p2 = r1.getInt("p2"); p4 = r1.getInt("p4"); date = r1.getString("date");

p2 = 4 * Integer.parseInt(rem2); p4 = 10 * Integer.parseInt(rem4); mtotal = p1 + p2 + p3 + p4 + p5;*/ sd2 = sd2 + sold2; sd4 = sd4 + sold4; pr1 = pr1 + p1; pr3 = pr3 + p3; pr5 = pr5 + p5;

p3 = 10 * Integer.parseInt(rem3); p5 = 12 * Integer.parseInt(rem5); sd1 = sd1 + sold1; sd3 = sd3 + sold3; sd5 = sd5 + sold5; pr2 = pr2 + p2; pr4 = pr4 + p4;

TOTAL = TOTAL + mtotal; } catch (Exception e) { // JOptionPane.showMessageDialog(null,e); } catch (Exception e) { <tr>

i++; e.printStackTrace(); } } } %>

e.printStackTrace();

<td width="105">Date</td>

<td width="158"><label> <input type="text" name="date" value="<%out.println(date);%>" readonly="true"/> </label></td> <tr> <td>Sugar</td> <td>&nbsp;</td> <td><input type="text" name="q1" value="<%out.println(rem1);%>"/></td> <td><input type="text" name="rem1" value="<%out.println(sd1);%>"/></td> <td><input type="text" name="p1" value="<%out.println(pr1);%>"/></td> <tr> <td>Rice</td> <td>&nbsp;</td> </tr> </tr>

<td><input type="text" name="q2" value="<%out.println(rem2);%>"/></td> <td><input type="text" name="rem2" value="<%out.println(sd2);%>"/></td>

<td><input type="text" name="p2" value="<%out.println(pr2);%>"/></td> <tr> <td>&nbsp;</td> <td>Wheat</td>

</tr>

<td><input type="text" name="q3" value="<%out.println(rem3);%>"/></td> <td><input type="text" name="rem3" value="<%out.println(sd3);%>"/></td> <td><input type="text" name="p3" value="<%out.println(pr3);%>"/></td> <tr> <td>&nbsp;</td> <td><input type="text" name="q4" value="<%out.println(rem4);%>"/></td> <td><input type="text" name="rem4" value="<%out.println(sd4);%>"/></td> <td><input type="text" name="p4" value="<%out.println(pr4);%>"/></td> <tr> <td>Rawrice</td> <td>&nbsp;</td> <td><input type="text" name="q5" value="<%out.println(rem5);%>"/></td> <td><input type="text" name="rem5" value="<%out.println(sd5);%>"/></td> <td><input type="text" name="p5" value="<%out.println(pr5);%>"/></td> <tr> <td>&nbsp;</td> </tr> </tr> <td>Kerosine</td> </tr>

<td>&nbsp;</td> <td>&nbsp;</td> <td>Total Price</td> <td><input type="text" name="textfield3" value="<%out.println(TOTAL);%>"/></td> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><label> <a href="monthlyreport.jsp"><input type="button" name="Submit" value="BACK" /></a> </label></td> 28.Request admin <form id="form1" name="form1" method="post" action=""> <table width="610" height="401" border="0"> <tr> <td width="168">Retailer License</td> </tr> </table> </form> <td>&nbsp;</td> </tr>

<td width="161"><label> <select name="name" id="name" onchange="jspcall();"> <option value="">Select License No</option> <% String query = "";

String number = ""; String comboitem = ""; String name = ""; try { DatabaseAccess db = new DatabaseAccess();

// JOptionPane.showMessageDialog(null, hello ); query = "SELECT DISTINCT licenceno FROM tbl_retailer ORDER BY `tbl_retailer`.`licenceno` DESC"; ResultSet rs1 = null; rs1 = db.dataRetrieve(query); while (rs1.next()) { number = rs1.getString("licenceno"); // JOptionPane.showMessageDialog(null, number); query = "select name from tbl_retailer where licenceno = '" + number + "'"; rs2 = null; if (rs2.next()) { comboitem = name; out.println("<option value='" + number + "'>" + comboitem + "</option>"); } } } catch (Exception ex) { } %> </select> rs2 = db.dataRetrieve(query); name = rs2.getString("name"); ResultSet rs2 = null;

// JOptionPane.showMessageDialog(null, ex);

</label></td> <tr>

</tr> <td>License no</td>

<td><input type="text" name="license" value="<%out.println(var);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>SOLD</td> <% try { var = request.getParameter("licenseno"); if (!var.equalsIgnoreCase(" ")) { try { Class.forName("com.mysql.jdbc.Driver"); <td>&nbsp;</td> <td>&nbsp;</td> <td>BALANCE</td> <td>SOLD PRICE</td> int i = 0, j = 0; </tr> </tr>

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact ResultSet r1 = smt.executeQuery("select * from tbl_monthlyreport where(licenceno='" + var + "' and month(date) = 3);"); while (r1.next()) { sold1 = r1.getInt("sold1"); sold3 = r1.getInt("sold3"); sold2 = r1.getInt("sold2"); sold4 = r1.getInt("sold4");

sold5 = r1.getInt("sold5"); rem2 = r1.getInt("rnet"); rem4 = r1.getInt("knet"); // JOptionPane.showMessageDialog(null, rem1); p1 = r1.getInt("p1"); p3 = r1.getInt("p3"); p5 = r1.getInt("p5"); date = r1.getString("date"); /* p1 = 20 * Integer.parseInt(rem1);

rem1 = r1.getInt("snet"); rem3 = r1.getInt("wnet"); rem5 = r1.getInt("rwnet");

p2 = r1.getInt("p2"); p4 = r1.getInt("p4");

mtotal = r1.getInt("totalprice");

p2 = 4 * Integer.parseInt(rem2); p4 = 10 * Integer.parseInt(rem4); mtotal = p1 + p2 + p3 + p4 + p5;*/ sd2 = sd2 + sold2; sd4 = sd4 + sold4; pr1 = pr1 + p1; pr3 = pr3 + p3; pr5 = pr5 + p5; i++; }

p3 = 10 * Integer.parseInt(rem3); p5 = 12 * Integer.parseInt(rem5); sd1 = sd1 + sold1; sd3 = sd3 + sold3; sd5 = sd5 + sold5; pr2 = pr2 + p2; pr4 = pr4 + p4; TOTAL = TOTAL + mtotal;

} catch (Exception e) {

e.printStackTrace(); } e.printStackTrace(); <tr> <td width="105">Date</td> } }

// JOptionPane.showMessageDialog(null,e); } catch (Exception e) { %>

<td width="158"><label> <input type="text" name="date" value="<%out.println(date);%>" readonly="true"/> </label></td> <tr> <td>&nbsp;</td> <td><input type="text" name="q1" value="<%out.println(rem1);%>"/></td> <td><input type="text" name="rem1" value="<%out.println(sd1);%>"/></td> <td><input type="text" name="p1" value="<%out.println(pr1);%>"/></td> <tr> <td>Rice</td> <td>&nbsp;</td> </tr> </tr> <td>Sugar</td>

<td><input type="text" name="q2" value="<%out.println(rem2);%>"/></td> <td><input type="text" name="rem2" value="<%out.println(sd2);%>"/></td> <td><input type="text" name="p2" value="<%out.println(pr2);%>"/></td> <tr> </tr>

<td>Wheat</td> <td>&nbsp;</td> <td><input type="text" name="q3" value="<%out.println(rem3);%>"/></td> <td><input type="text" name="rem3" value="<%out.println(sd3);%>"/></td> <td><input type="text" name="p3" value="<%out.println(pr3);%>"/></td> <tr> <td>Kerosine</td> <td>&nbsp;</td> </tr>

<td><input type="text" name="q4" value="<%out.println(rem4);%>"/></td> <td><input type="text" name="rem4" value="<%out.println(sd4);%>"/></td> <td><input type="text" name="p4" value="<%out.println(pr4);%>"/></td> </tr> <tr> <td>&nbsp;</td> <td><input type="text" name="q5" value="<%out.println(rem5);%>"/></td> <td><input type="text" name="rem5" value="<%out.println(sd5);%>"/></td> <td><input type="text" name="p5" value="<%out.println(pr5);%>"/></td> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <td>Rawrice</td>

<td>Total Price</td> <td><input type="text" name="textfield3" value="<%out.println(TOTAL);%>"/></td> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><label> <td>&nbsp;</td> </tr>

<a href="monthlyreport.jsp"><input type="button" name="Submit" value="BACK" /></a> </label></td> 29.Request admin view <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script> <script type="text/javascript"> $(function() { height : '240px', }); }); $('#one').ContentSlider({ speed : 400, </script> width : '940px', easing : 'easeOutSine' </tr> </table> </form>

<script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> <% String var = " "; </div> var = " "; </div> String name1 = " ";

String license = " "; String pinno = " "; String bpl = " "; try {

String housename = " "; String phoneno = " ";

String place = " "; String apl = " ";

String retailerid = request.getParameter("retailer_id"); var = request.getParameter("retailer_id");

if (!var.equalsIgnoreCase(" ")) { try { Class.forName("com.mysql.jdbc.Driver");

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact ResultSet r = smt.executeQuery("select * from tbl_retailer where(retailer_id='" + var + "');"); while (r.next()) { name1 = r.getString("Name"); housename = r.getString("housename"); pinno = r.getString("pinno"); apl = r.getString("noofAPL"); } } catch (Exception e) { license = r.getString("licenceno"); place = r.getString("place"); phoneno = r.getString("phoneno"); bpl = r.getString("noofBPL");

// JOptionPane.showMessageDialog(null, retailerid); e.printStackTrace(); } } %> }

// JOptionPane.showMessageDialog(null,e); } catch (Exception e) { e.printStackTrace();

<div id="templatemo_content_wrapper"> <div id="content"> <form id="form1" name="form1" method="post" action="decadmin.jsp?retailerid=<%=retailerid%>"> <table width="452" height="405" border="0"> <tr> <td width="125">Name</td>

<td width="150"><label> <input type="text" name="name1" value="<%out.print(name1);%>"/> <td width="163">&nbsp;</td> <tr> <td>License No </td> <td><input type="text" name="license" value="<%out.print(license);%>"/></td> <td>&nbsp;</td> <tr> </tr> <td>House Name </td> </tr> </label></td>

<td><input type="text" name="housename" value="<%out.print(housename);%>"/></td> <td>&nbsp;</td> <tr> </tr> <td>Place</td>

<td><input type="text" name="place" value="<%out.print(place);%>"/></td> <td>&nbsp;</td> </tr>

<tr>

<td>Pin No </td>

<td><input type="text" name="pinno" value="<%out.print(pinno);%>"/></td> <td>&nbsp;</td> <tr> </tr> <td>Phone Number </td>

<td><input type="text" name="phoneno" value="<%out.print(phoneno);%>"/></td> <td>&nbsp;</td> <tr> <td> APL </tr> <td>No. of Customers </td> <label>

<input name="apl" type="text" size="8" value="<%out.print(apl);%>"/> </label></td> <td>BPL </tr> <td>&nbsp;</td>

<input name="bpl" type="text" size="8" value="<%out.print(bpl);%>"/></td> <tr> <td><label> </label></td> 30.Request retailer <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script> <td>&nbsp;</td>

<input type="submit" name="Submit" value="SUBMIT" /> </tr> </table> </form>

<script type="text/javascript"> $(function() { $('#one').ContentSlider({ width : '940px', easing : 'easeOutSine' height : '240px', }); }); speed : 400, </script>

<script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> <div id="templatemo_content_wrapper"> <div id="content"> <% Connection con = null; String query1 = ""; String cardno = ""; int count = 0; int i = 0; String license = ""; String customer_id = ""; </div> </div>

String query = ""; String name = "";

// DatabaseAccess db = new DatabaseAccess(); Class.forName("com.mysql.jdbc.Driver"); con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", "");

try {

query1 = "select * from tbl_retailer where name = '"+ u +"'";

ResultSet r1 = null; Statement st1 = (Statement) con.createStatement(); r1 = (ResultSet) st1.executeQuery(query1); while(r1.next()){ license = r1.getString("licenceno"); }

query = "select * from tbl_customer where status ='pending' and licenseno ='"+ license +"'"; ResultSet r = null; Statement st = (Statement) con.createStatement(); r = (ResultSet) st.executeQuery(query); //r = db.dataRetrieve(query); while (r.next()) { customer_id = r.getString("customer_id"); cardno = r.getString("cardno"); i++; name = r.getString("Name"); count++; %> " + cardno);%></a><br/>

<a href="requestretailerview.jsp?customer_id=<%out.print(customer_id);%>"><%out.print(name +" <% } //JOptionPane.showMessageDialog(null, url); } catch (Exception e) { // JOptionPane.showMessageDialog(null, e); } %>

31.Request retailer view <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script> <script type="text/javascript"> $(function() { width : '940px', easing : 'easeOutSine' $('#one').ContentSlider({ height : '240px', }); }); speed : 400, </script>

<script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> </div> </div>

<%

String var = " "; String cardno = " "; String place = " "; String taluk = " "; String wardno = " "; String mincome = " ";

var = " "; String housename = " "; String typeofarea = " "; String district = " "; String houseno = " "; String type = " ";

String name1 = " ";

String prounit = " ";

String licenseno = "";

String customerid = request.getParameter("customer_id"); username = request.getParameter("username"); // licenseno = request.getParameter("licenseno");

try {

var = request.getParameter("customer_id");

if (!var.equalsIgnoreCase(" ")) { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact ResultSet r = smt.executeQuery("select * from tbl_customer where(customer_id='" + var + "');"); while (r.next()) { name1 = r.getString("Name"); housename = r.getString("housename"); typeofarea = r.getString("typeofarea"); district = r.getString("district"); houseno = r.getString("houseno"); prounit = r.getString("providingunit"); licenseno = r.getString("licenseno"); cardno = r.getString("cardno"); place = r.getString("place"); taluk = r.getString("taluk"); wardno = r.getString("wardno"); type = r.getString("type"); mincome = r.getString("monthlyincome"); // JOptionPane.showMessageDialog(null,e);

} catch (Exception e) {

} e.printStackTrace(); } %>

<div id="templatemo_content_wrapper"> <div id="content"> <form id="form1" name="form1" method="post" action="decretailer.jsp?customer_id=<%=customerid%>"> <table width="616" height="458" border="0"> <tr> <td width="139">Card No </td> <td width="168"><label>

<input type="text" name="cardno" value="<%out.print(cardno);%>" readonly="true"/> </label></td> <tr> </tr> <td>Name </td>

<td><input type="text" name="name" value="<%out.print(name1);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>House name </td> </tr>

<td><input type="text" name="housename" value="<%out.print(housename);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>Place</td> <td>&nbsp;</td> </tr>

<td><input type="text" name="place" value="<%out.print(place);%>" readonly="true"/></td> <td>&nbsp;</td> <td>&nbsp;</td> </tr>

<tr>

<td>Type of Area </td> <td>&nbsp;</td>

<td><input type="text" name="typeofarea" value="<%out.print(typeofarea);%>" readonly="true"/></td> <td>&nbsp;</td> </tr> <tr> readonly="true"/></td> <td>&nbsp;</td> <tr> <td>Taluk</td>

<td><input type="text" name="taluk" value="<%out.print(taluk);%>"

<td>&nbsp;</td> <td>District</td>

</tr>

<td><input type="text" name="district" value="<%out.print(district);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>Ward no </td> readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> </tr>

<td><input type="text" name="wardno" value="<%out.print(wardno);%>"

<td>&nbsp;</td> <td>House no </td>

</tr>

<td><input type="text" name="houseno" value="<%out.print(houseno);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>Monthly income </td> </tr>

<td><input type="text" name="mincome" value="<%out.print(mincome);%>" readonly="true"/></td> <td>&nbsp;</td> <td>&nbsp;</td> <tr> </tr> <td>Type of account </td>

<td><input type="text" name="type" value="<%out.print(type);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>providing unit </td> </tr>

<td><input type="text" name="prounit" value="<%out.print(prounit);%>" readonly="true"/></td> <td>&nbsp;</td> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr>

<td><input type="hidden" name="username" id="username" value="<%out.print(username);%>" readonly="hidden"/></td> <td>&nbsp;</td> <td><input type="hidden" name="licenseno" value="<%out.print(licenseno);%>" readonly="hidden"/></td> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><label> </tr>

<input type="submit" name="Submit" value="SUBMIT" /> </label></td> <td>&nbsp;</td> 32. Retailer details <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script> <script type="text/javascript"> </tr> </table> </form>

$(function() { $('#one').ContentSlider({ width : '940px', easing : 'easeOutSine' height : '240px', }); }); speed : 400, </script>

<script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> <% var = " "; String housename = " "; String phoneno = " "; String var = " "; String name1 = " "; String place = " "; String apl = " "; String license = " "; String pinno = " "; String bpl = " "; </div> </div>

String retailerid = request.getParameter("retailer_id"); try { var = request.getParameter("retailer_id");

if (!var.equalsIgnoreCase(" ")) { try { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact

ResultSet r = smt.executeQuery("select * from tbl_retailer where(retailer_id='" + var + "');"); while (r.next()) { name1 = r.getString("Name"); housename = r.getString("housename"); pinno = r.getString("pinno"); apl = r.getString("noofAPL"); } } catch (Exception e) { license = r.getString("licenceno"); place = r.getString("place"); phoneno = r.getString("phoneno"); bpl = r.getString("noofBPL");

// JOptionPane.showMessageDialog(null, retailerid); e.printStackTrace(); } } %> }

// JOptionPane.showMessageDialog(null,e); } catch (Exception e) { <div id="templatemo_content_wrapper"> <div id="content"> <form id="form1" name="form1" method="post" action=""> <table width="452" height="405" border="0"> <tr> <td width="142"> Customer Name</td> <td width="149"><label> <select name="name" id="name" onchange="jspcall();"> e.printStackTrace();

<option value="">Select Customer</option> <% String query = ""; String comboitem = ""; try { DatabaseAccess db = new DatabaseAccess(); // JOptionPane.showMessageDialog(null, hello ); query = "SELECT DISTINCT retailer_id FROM tbl_retailer ORDER BY `tbl_retailer`.`retailer_id` DESC"; ResultSet rs1 = null; ResultSet rs2 = null; while (rs1.next()) { number = rs1.getString("retailer_id"); // JOptionPane.showMessageDialog(null, number); query = "select Name from tbl_retailer where retailer_id = '" + number + "'"; rs2 = null; rs2 = db.dataRetrieve(query); if (rs2.next()) { name = rs2.getString("Name"); comboitem = name; rs1 = db.dataRetrieve(query); String number = ""; String name = "";

out.println("<option value='" + number + "'>" + comboitem + "</option>"); } } } catch (Exception ex) { } </tr> %>

// JOptionPane.showMessageDialog(null, ex); </select> <tr> </label></td> <td width="125">Name</td>

<td width="150"><label> <input type="text" name="name1" value="<%out.print(name1);%>"/> </label></td> <td width="163">&nbsp;</td> <tr> <td>License No </td> </tr>

<td><input type="text" name="license" value="<%out.print(license);%>"/></td> <td>&nbsp;</td> <tr> </tr> <td>House Name </td>

<td><input type="text" name="housename" value="<%out.print(housename);%>"/></td> <td>&nbsp;</td> <tr> </tr> <td>Place</td>

<td><input type="text" name="place" value="<%out.print(place);%>"/></td> <td>&nbsp;</td> </tr>

<tr>

<td>Pin No </td>

<td><input type="text" name="pinno" value="<%out.print(pinno);%>"/></td> <td>&nbsp;</td> <tr> </tr> <td>Phone Number </td>

<td><input type="text" name="phoneno" value="<%out.print(phoneno);%>"/></td> <td>&nbsp;</td> <tr> <td> APL </tr> <td>No. of Customers </td> <label> </label></td>

<input name="apl" type="text" size="8" value="<%out.print(apl);%>"/> <td>BPL <input name="bpl" type="text" size="8" value="<%out.print(bpl);%>"/></td> <tr> <td>&nbsp;</td> <td><label> <td>&nbsp;</td>

</tr>

<a href="adminform.jsp"><input type="button" name="Submit" value="BACK" /></a> </label></td> 33.Retailer form <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> </tr> </table> </form>

<script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script> <script type="text/javascript"> $(function() { $('#one').ContentSlider({ width : '940px', height : '240px', speed : 400, easing : 'easeOutSine' }); }); </script>

<script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> <% var = " "; username = request.getParameter("username"); licenseno = request.getParameter("licenseno"); String name1 = " "; String license = " "; String var = " "; </div>

String housename = " "; String pinno = " "; String apl = " ";

String place = " "; String phoneno = " "; String bpl = " ";

String retailerid = request.getParameter("retailerid"); // JOptionPane.showMessageDialog(null, retailerid); try { var = request.getParameter("username");

if (!var.equalsIgnoreCase(" ")) { try { Class.forName("com.mysql.jdbc.Driver");

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact ResultSet r = smt.executeQuery("select * from tbl_retailer where(name='" + var + "');"); while (r.next()) { name1 = r.getString("name"); housename = r.getString("housename"); pinno = r.getString("pinno"); apl = r.getString("apl"); } } catch (Exception e) { } license = r.getString("licenceno"); place = r.getString("place"); phoneno = r.getString("phoneno"); bpl = r.getString("bpl"); e.printStackTrace(); }

// JOptionPane.showMessageDialog(null,e);

} catch (Exception e) {

e.printStackTrace();

%>

</div>

<div id="templatemo_content_wrapper"> <div id="content"> <form id="form1" name="form1" method="post" action=""> <table width="547" height="317" border="0"> <tr> <td width="183">Name</td>

<td width="354"><label> <input type="text" name="textfield" value="<%out.print(name1);%>" readonly="true"/> </label></td> <tr> <td><label> <input type="text" name="textfield2" value="<%out.print(license);%>" readonly="true"/> <tr> <td><label> </label></td> </tr> </tr> <td>License Number </td>

<a href="stockprovide.jsp?username=<%=username%>"> <input type="button" name="Submit" value="STOCK PROVIDE" /></a> </label></td> <td><label> <a href="individualcustomerstock1.jsp"><input type="button" name="Submit2" value="INDIVIDUAL CUSTOMER STOCK" /></a> </label></td> </tr> <tr> <td><label>

<a href="customerdetails.jsp?username=<%=username%>"><input type="button" name="Submit3" value="CUSTOMER DETAILS" /></a> </label></td> <td><label><a href="customerbillviewretailer1.jsp?username=<%=username%>"><input type="button" name="Submit4" value="CUSTOMER </label></td> </tr> </table> </form>

PROCESS" /></a>

34.Retailer registration <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script> <script type="text/javascript"> $(function() { $('#one').ContentSlider({ width : '940px', speed : 400, height : '240px', easing : 'easeOutSine' }); }); </script>

<script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> <div id="templatemo_content_wrapper"> <div id="content"> <form id="form1" name="form1" method="post" action="retailerregfunc.jsp" onsubmit="validateForm()"> </div> </div>

<table width="452" height="405" border="0"> <tr> <td width="125">Name</td> <input type="text" name="name" /> <td width="163">&nbsp;</td> <td>License No </td> </tr>

<td width="150"><label> </label></td> <tr>

<td><input type="text" name="licenceno" /></td> <td>&nbsp;</td> <tr> </tr> <td>House Name </td>

<td><input type="text" name="housename" /></td> <td>&nbsp;</td> <tr> </tr> <td>Place</td>

<td><input type="text" name="place" /></td> <td>&nbsp;</td> <tr> </tr> <td>District </td>

<td><input type="text" name="district" /></td> <td>&nbsp;</td> <tr> </tr> <td>Pin No </td>

<td><input type="text" name="pinno" /></td>

<td>&nbsp;</td> <tr>

</tr> <td>Phone Number </td>

<td><input type="text" name="phoneno" /></td> <td>&nbsp;</td> <tr> <td> APL <input name="apl" type="text" size="8" /> </tr> <td>No. of Customers </td> <label> </label></td> </tr> <td>BPL

<input name="bpl" type="text" size="8" /></td> <tr> <td>&nbsp;</td> <td><label> </label></td> 35.Retailer registration func <%@page import="dao.DatabaseAccess"%> <%@page import="java.sql.ResultSet"%> <%@page import="javax.swing.JOptionPane"%> <% String name = ""; String district = ""; String licenceno = ""; String pinno = ""; String houseno = ""; String phoneno = ""; </tr> <td>&nbsp;</td>

<input type="submit" name="Submit" value="SUBMIT" /> </table> </form>

String place = ""; String apl = "";

String bpl = ""; try { try {

DatabaseAccess db = new DatabaseAccess(); name = request.getParameter("name");

// JOptionPane.showMessageDialog(null, name); } catch (Exception e) { try { }

licenceno = request.getParameter("licenceno"); }

} catch (Exception e) { try {

houseno = request.getParameter("houseno"); }

} catch (Exception e) { try {

place = request.getParameter("place"); }

} catch (Exception e) { try {

district = request.getParameter("district"); }

} catch (Exception e) { try {

pinno = request.getParameter("pinno"); }

} catch (Exception e) { try {

phoneno = request.getParameter("phoneno"); }

} catch (Exception e) { try {

apl = request.getParameter("apl"); }

} catch (Exception e) {

try {

bpl = request.getParameter("bpl"); } String query1 = ""; ResultSet rs1 = null;

} catch (Exception e) { String query = ""; ResultSet rs = null; try {

query = "SELECT * from tbl_retailer where name='" + name + "' and licenceno='" + licenceno + "'"; rs1 = db.dataRetrieve(query); if (rs1.next()) { JOptionPane.showMessageDialog(null, "RegistrationFailed"); response.sendRedirect("retailerreg.jsp"); } else

{ query = "INSERT INTO tbl_retailer(name,licenceno,housename,place,district,pinno,phoneno,noofAPL,noofBPL) VALUES ( '" + name + "' , '" + licenceno + "', '" + houseno + "' , '" + place + "' , '" + district + "' , '" + pinno + "' , '" + phoneno + "' , '" + apl + "' , '" + bpl + "')"; out.println(query); db.dataUpdate(query); // JOptionPane.showMessageDialog(null, query); }

query1 = "INSERT INTO tbl_retailerstockdetails(licenceno,date,item1,quantity1,sold1,p1,item2,quantity2,sold2,p2,item3,quantity3,sold3,p3,item4,quantity4,sold4,p4,item5,quantity5,s old5,p5,mtotal) VALUES('" + licenceno + "','0000-00-00','sugar',0,0,0,'rice',0,0,0,'wheat',0,0,0,'kerosine',0,0,0,'rawrice',0,0,0,0)"; db.dataUpdate(query1); } catch (Exception e) { } // response.sendRedirect("retailerreg.jsp"); JOptionPane.showMessageDialog(null, e);

} catch (Exception ex) {

//

JOptionPane.showMessageDialog(null, ex);

%>

36.Retailer stock <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script> <script type="text/javascript"> $(function() { $('#one').ContentSlider({ width : '940px', easing : 'easeOutSine' height : '240px', }); }); speed : 400, </script>

<script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> <div id="templatemo_content_wrapper"> <% var = " "; String name1 = " "; String place = " "; String license = " "; String pinno = " "; String housename = " "; String phoneno = " "; String var = " "; </div> </div>

String apl = " "; String quantity2= ""; String quantity5= "";

String bpl = " "; String quantity3= ""; String date = "";

String quantity1= ""; String quantity4= "";

String p1="",p2="",p3="",p4="",p5="",total=""; String retailerid = request.getParameter("retailer_id"); try { var = request.getParameter("retailer_id");

if (!var.equalsIgnoreCase(" ")) { try { Class.forName("com.mysql.jdbc.Driver");

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact ResultSet r = smt.executeQuery("select * from tbl_retailer where(retailer_id='" + var + "');"); while (r.next()) { name1 = r.getString("Name"); license = r.getString("licenceno"); housename = r.getString("housename"); place = r.getString("place"); pinno = r.getString("pinno"); phoneno = r.getString("phoneno");

apl = r.getString("noofAPL"); bpl = r.getString("noofBPL"); } // JOptionPane.showMessageDialog(null, retailerid); ResultSet r2 = smt.executeQuery("select * from tbl_retailerstockdetails where(licenceno='" + license + "');"); while (r2.next()) { quantity1 = r2.getString("quantity1"); quantity3 = r2.getString("quantity3"); quantity5 = r2.getString("quantity5"); p1 = r2.getString("p1"); p3 = r2.getString("p3"); p5 = r2.getString("p5"); } } catch (Exception e) { } } quantity2 = r2.getString("quantity2"); quantity4 = r2.getString("quantity4"); date = r2.getString("date"); p2 = r2.getString("p2"); p4 = r2.getString("p4"); total = r2.getString("mtotal"); e.printStackTrace(); } %>

// JOptionPane.showMessageDialog(null,e); } catch (Exception e) { <div id="content"> <form id="form1" name="form1" method="post" action=""> <table width="767" height="468" border="0">

e.printStackTrace();

<tr>

<td width="241">Retailer License Number </td>

<td colspan="2"><label> <select name="name" id="name" onchange="jspcall();"> <option value="">Select License No</option> <% String number = ""; String name = ""; try { DatabaseAccess db = new DatabaseAccess(); // JOptionPane.showMessageDialog(null, hello ); query = "SELECT DISTINCT retailer_id FROM tbl_retailer ORDER BY `tbl_retailer`.`retailer_id` DESC"; ResultSet rs1 = null; rs1 = db.dataRetrieve(query); while (rs1.next()) { number = rs1.getString("retailer_id"); // JOptionPane.showMessageDialog(null, number); query = "select licenceno from tbl_retailer where retailer_id = '" + number + "'"; rs2 = null; ResultSet rs2 = null; String query = ""; String comboitem = "";

rs2 = db.dataRetrieve(query); if (rs2.next()) { name = rs2.getString("licenceno"); comboitem = name; out.println("<option value='" + number + "'>" + comboitem + "</option>"); } } catch (Exception ex) { } <label> <input type="text" name="textfield2" value="<%out.println(date);%>" readonly="true"/> <tr> <td>Retailer Id </td> </label></td> </tr> %> } // JOptionPane.showMessageDialog(null, ex); </select> </label>Date

<td colspan="2"><input type="text" name="textfield3" value="<%out.println(retailerid);%>" readonly="true"/></td> </tr> <tr> <td>Retailer License</td> <td colspan="2"><input type="text" name="textfield3" value="<%out.println(license);%>" readonly="true"/></td> </tr> <tr>

<td>ITEM</td> <td>PRICE</td> <tr>

<td width="151">QUANTITY</td> </tr>

<td><input type="text" name="item1" value="Sugar" readonly="true"/></td> <td><input type="text" name="quantity1" value="<%out.println(quantity1);%>" readonly="true"/></td> <td><input type="text" name="textfield34" value="<%out.println(p1);%>" readonly="true"/></td> </tr> <tr> <td><input type="text" name="item1" value="Rice" readonly="true"/></td> <td><input type="text" name="quantity1" value="<%out.println(quantity2);%>" readonly="true"/></td> <td><input type="text" name="textfield37" value="<%out.println(p2);%>" readonly="true"/></td> </tr> <tr> <td><input type="text" name="item1" value="Wheat" readonly="true"/></td> <td><input type="text" name="quantity1" value="<%out.println(quantity3);%>" readonly="true"/></td> <td><input type="text" name="textfield310" value="<%out.println(p3);%>" readonly="true"/></td> </tr> <tr>

<td><input type="text" name="item1" value="Kerosine" readonly="true"/></td> <td><input type="text" name="quantity1" value="<%out.println(quantity4);%>" readonly="true"/></td> <td><input type="text" name="textfield313" value="<%out.println(p4);%>" readonly="true"/></td> </tr> <tr> <td><input type="text" name="item1" value="Rawrice" readonly="true"/></td> <td><input type="text" name="quantity1" value="<%out.println(quantity5);%>" readonly="true"/></td> <td><input type="text" name="textfield316" value="<%out.println(p5);%>" readonly="true"/></td> </tr> <tr> <td>&nbsp;</td> <td>Total</td>

<td><input type="text" name="textfield317" value="<%out.println(total);%>"readonly="true"/></td> </tr> <tr> <td>&nbsp;</td> <td><label> <input type="submit" name="Submit" value="BACK" /> </label></td> </tr> </table> </form> <td>&nbsp;</td>

37.Stock provide <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script> <script type="text/javascript"> $(function() { $('#one').ContentSlider({ width : '940px', easing : 'easeOutSine' height : '240px', }); }); speed : 400, </script>

<script src="js/jquery.chili-2.2.js" type="text/javascript"></script> <script src="js/chili/recipes.js" type="text/javascript"></script> <div class="cleaner"></div> <% var = " "; username = request.getParameter("username"); licenseno = request.getParameter("licenseno"); String name1 = " "; String housename = " "; String license = " "; String place = " "; String var = " "; </div>

String pinno = " "; String apl = " ";

String phoneno = " "; String bpl = " ";

String retailerid = request.getParameter("retailerid"); // JOptionPane.showMessageDialog(null, retailerid); try { var = request.getParameter("username");

if (!var.equalsIgnoreCase(" ")) { try { Class.forName("com.mysql.jdbc.Driver");

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact ResultSet r = smt.executeQuery("select * from tbl_retailer where(name='" + var + "');"); while (r.next()) { name1 = r.getString("name"); housename = r.getString("housename"); pinno = r.getString("pinno"); apl = r.getString("apl"); } catch (Exception e) { // JOptionPane.showMessageDialog(null,e); } catch (Exception e) { e.printStackTrace(); license = r.getString("licenceno"); place = r.getString("place"); phoneno = r.getString("phoneno"); bpl = r.getString("bpl"); e.printStackTrace(); } } } %> </div> }

<div id="templatemo_content_wrapper"> <div id="content"> <form id="form1" name="form1" method="post" action="stockprovidefunc.jsp?username=<%=username%>"> <table width="547" height="317" border="0"> <tr> <td width="183">Name</td> <td width="354"><label> <input type="text" name="textfield" value="<%out.print(name1);%>" readonly="true"/> </label></td> </tr> <tr> <td>License Number </td> <td><label> <input type="text" name="textfield2" value="<%out.print(license);%>" readonly="true"/> </label></td> </tr> <tr> <td><label>

<input type="submit" name="provide apl" value="PROVIDE APL STOCK" /> </label></td> <td><label> <input type="submit" name="provide bpl" value="PROVIDE BPL STOCK" /> </label></td> </tr> </table> </form> 38.Stock provide func <%@page import="javax.swing.JOptionPane"%> <%@page import="java.sql.ResultSet"%> <%@page import="java.sql.Statement"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Connection"%> <% String username = request.getParameter("username"); String licenseno = ""; String query = ""; try {

Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/civil", "root", ""); Statement smt = con.createStatement(); //Create Statement to interact ResultSet r = smt.executeQuery("select * from tbl_retailer where(name='" + username + "');"); while(r.next()){ licenseno = r.getString("licenceno"); } Statement smt1 = con.createStatement(); Statement smt2 = con.createStatement(); if (request.getParameter("btnapl").equalsIgnoreCase("PROVIDE APL STOCK")) { smt1.executeUpdate("update tbl_customerindividualstock set unitprovide1=2,unitprovide2=20,unitprovide3=10,unitprovide4=2,unitprovide5=10 where licenseno='" + licenseno + "'"); response.sendRedirect("stockprovide.jsp?username="+ username); }else if (request.getParameter("btnapl").equalsIgnoreCase("PROVIDE BPL STOCK")) { JOptionPane.showMessageDialog(null, "btnbpl"); smt2.executeUpdate("update tbl_customerindividualstock set unitprovide1=3,unitprovide2=30,unitprovide3=20,unitprovide4=3,unitprovide5=15 where licenseno='" + licenseno + "'"); response.sendRedirect("stockprovide.jsp?username="+ username); } } catch (Exception e) { e.printStackTrace();

// JOptionPane.showMessageDialog(null,e); } %>

SYSTEM TESTING

The goal of the system testing is to ensure that the developed system confirms to its requirements laid out in the SRS document. When all the modules have been successfully integrated and tested, system testing is carried out. System testing usually consists of three different kinds of testing activity.

- system testing: it is the testing performed by the development team; - System testing: it is the testing performed by a friendly set of customers. Acceptance testing: it is the testing performed by the customer himself after the product delivery to determine whether to accept or reject the delivered product.

System testing is normally carried out in a planned manner according to the system test plan document. The system test plan identifies whole testing- related activities that must be performed, specifies the schedule of testing, and allocates resources. It also lists all the test cases and the expected outputs for each test case. Immediately after the requirements specification face, a system test plan can be prepared which documents the plan for system testing. It is possible to prepare the system test plan just after the requirements specification face, solely based on the SRS document. The result of integration and system testing are documented in the form of a test report. The test report summarizes the outcome of all the testing activities that were carried out during this face.

IMPLIMENTATION
A crucial phase in the system life cycle is the successful implementation of the new system design. Implementation involves creating computer compactable files, training the operating the staff, and installing hardware, terminals. A crucial factor in the implementation is that, it should not disrupt the functioning of the organization. In the system implementation, user training is crucial for minimizing resistance to change and giving the new system a chance to provide its worth. Training aids, such as user friendly manuals, a data dictionary, job performance aids that communicate information about the new system, helps screens; provide the user with a good start on the new system. The objec tive of system implementation is to put the system into operation while holding costs, risks and personal irritation to minimum. The Implementation phase provides the conceptual foundation required for the design and development of complex distributed and real-time applications. It summarizes a large spectrum of concepts, enabling readability and ease of comprehension by concentrating on Java and presenting mainly the programmatic aspects and basic functioning

Once the physical system has been designed in detail, the next stage is to turn the design in to a working system and then to monitor the operation of the system to ensure that it continues to work efficiently and effectively. The implementation stage of a project is often very complex and time consuming because many more people are involved than in the earlier stages. The system implantation took place through various stages as follows Implementation planning Education and training System testing System implementation Change over System maintenance

CONCLUSION

We have successfully completed our project "E-Civil Supply System" inthe timeof span allotted and put together to form the main system.the modules were tested seperately.Testing of the whole system has been done with simple data and output obtained to the requirements. The project meets all the requirements as described in the proposed system and satisfied user requirements to

agreat extends.The software thus developed is easy maintain and is quite user friendly. In this project we ca add many facilities in future.Thus we can create excellent software using this project.The project now becomes a very time saving and increase the effeciency and speed of the service and it will reduce the workload to the staff.

You might also like