SlideShare a Scribd company logo
1 of 118
A Mini Project
On
COMPUTERIZED BILLING SYSTEM FOR WATER PLANT
Master of Computer Applications (MCA)
Submitted By
ADDURI KALYAN
(Reg No: 1223715102)
Under the guidance of
Smt. Dr. K.VEDAVATHI
Professor
Department of Computer Science
GITAM Institute of Science
GITAM University
Visakhapatnam-530 045, A.P.
(2016 – 2017)
CERTIFICATE
This is to certify that the Mini Project entitled COMPUTERIZED BILLING SYSTEM FOR
WATER PLANT is the bonafied work done by Adduri.Kalyan, Reg No. 1223715102 during
2016-2017 in partial fulfillment of the requirement of the 3rd Semester Mini Project of Master
of Computer Applications, in GitamUniversity, Visakhapatnam, under my supervision and
guidance.
Signature Signature
(Internal Guide) (HOD)
1. Introduction
1.1 Introduction to project:
The project titled “A Computerized Billing System for Water Plant” presents an easy
way to maintain customer data and generate bill to the customer. In the existing system the
delivery of water can takes place by personally going to the water plant or the can may be
delivered at the door steps of the customer. This transaction deals with paying money to the
authorized person of the plant. The customer can also avail the card facility, where the
company issues a monthly card for the amount paid by the customer in advance. Maintaining
this information is a tedious task. The loss of information with the office of the plant or loss
of card by the customer will create inconvenience to the authority. This inconvenience may
be overcome by maintaining customer data in electronic form. With this proposed system the
company will overcome against loss of customer data and also speedup the bill generation
task.
1.2 Purpose of the System:
The purpose of the system is to create the new customer by admin and a unique ID is
generated for every customer. The water bottles purchased by customer are stored in the
system and the bill is generated for every customer without any paper work. The
administrator can search and generate a report on every customer. Our proposed system has
the following advantages.
 User Friendly Interface
 Fast Access To Database
 Less Error
 More Storage Capacity
 Search Facility
 Look And Feel Environment
 Quick Transaction
1.3 Existing System:
If you want to take a water bottle in a plant we have to go to water bottle plant and we have
to get the bottle manually by giving money every time. Sometimes this is a time consuming
process when there are lot of customers. There is no guarantee for security if the card given
by the owner of the plant is lost.
And another problem is exact money change where we have to wait for a lot of time when
there are number of customers.
1.4 ProposedSystem:
Proposed system is a ‘Computerized Billing System’. Through our software, administrator
can create the new customer and a unique ID is generated for every customer. The water
bottles purchased by customer are stored in the system and the bill is generated for every
customer without any paper work. The administrator can search and generate a report to
every customer.
2. SYSTEM ANALYSES
2.1 Study of the System:
2.2 Modules of the System:
The proposed system consists of six modules:
1. Administrator Login module
2. Customer Information Entry module
3. Customer Search module
4. Customer Update module
5. Admin Update module
6. Billing System module
3. REQUIREMENT ANALYSIS
3.1 SYSTEM REQUIREMENT
Requirements Analysis is the process of studying and analyzing the problem present in the
System. In requirement gathering and analysis, the goal of requirement analysis and gathering
is to collect the information from the administrator regarding the work he wants to get from
the system. This phased leads to in completeness of the project.
Functional Requirements:
Functional requirements define the fundamental actions that must take place in the software
in accepting and processing the inputs and in processing and generating the outputs.
REQ-1: The administrator must have a valid login to access the system. A failed login will
alert the administrator with an error message.
REQ-2: The administrator will create the new customer in the system.
REQ-3: The administrator can generate bill to the customer.
REQ-4: The administrator can search and generate a report on every customer.
REQ-5: The administrator can update the customer information.
Non Functional Requirements:
The following have been identified as the key non-functional requirements that are necessary
to ensure that the application is both technically and fundamentally sound.
3.1 SYSTEM SPECIFICATIONS:
Hardware specifications:
Processor : Intel p4
RAM : 512MB RAM
Hard disk : 20GB or more
Software specifications:
Operating system : Windows, Vista
Programming Language : Asp.net C#
Database : SQL SERVER
3.2 OVERVIEW OF FRONT END:
ASP.NET is a web development platform, which provides a programming
model, a comprehensive software infrastructure and various services required to build up
robust web applications for PC, as well as mobile devices.
ASP.NET works on top of the HTTP protocol, and uses the HTTP commands and
policies to set a browser-to-server bilateral communication and cooperation.ASP.NET is a
part of Microsoft .Net platform. ASP.NET applications are compiled codes.
Extensible and reusable components or objects present in .Net framework. These codes can
use the entire hierarchy of classes in .Net framework.
The ASP.NET application codes can be written in any of the following languages:
 C#
 Visual Basic.Net
 Jscript
 J#
ASP.NET is used to produce interactive, data-driven web applications over the internet. It
consists of a large number of controls such as text boxes, buttons, and labels for assembling,
configuring, and manipulating code to create HTML pages.
ASP.NET LIFE CYCLE:
The ASP.NET life cycle could be divided into two groups:
 Application Life Cycle
 Page Life Cycle
Application Life Cycle:
The application life cycle has the following stages:
User makes a request for accessing application resource, a page. Browser sends this request
to the web server.
A unified pipeline receives the first request and the following events take place:
 An object of the class Application Manager is created.
 An object of the class Hosting Environment is created to provide information
regarding the resources.
 Top level items in the application are compiled.
Response objects are created. The application objects such as HttpContext, HttpRequest
and HttpResponse are created and initialized.
Page Life Cycle:
When a page is requested, it is loaded into the server memory, processed, and sent to the
browser. Then it is unloaded from the memory. At each of these steps, methods and events
are available, which could be overridden according to the need of the application. In other
words, you can write your own code to override the default code.
The Page class creates a hierarchical tree of all the controls on the page. All the components
on the page, except the directives, are part of this control tree. You can see the control tree
by adding trace= "true" to the page directive. We will cover page directives and tracing
under 'directives' and 'event handling'.
The page life cycle phases are:
 Initialization
 Instantiation of the controls on the page
 Restoration and maintenance of the state
 Execution of the event handler codes
 Page rendering
Understanding the page cycle helps in writing codes for making some specific thing happen
at any stage of the page life cycle. It also helps in writing custom controls and initializing
them at right time, populate their properties with view-state data and run control behavior
code.
Asp.net web controls:
The Web controls reside in the System.Web.UI.WebControls namespace, which is available
to all Web Forms pages automatically. They provide a range of functionality, from simple
data entry to complex data validation.
Two classesare consideredtobe base classesof ASP.NETservercontrols:
System.Web.UI.Control andSystem.Web.UI.WebControls.WebControl.Webcontrolsfallintoeight
categories:input,display,action,selection,databound,rich,validation,theyhave properties,
methods,andeventsthatcan be accessedat run time fromcode runningonthe server.
The following are the web controls of Asp.net:
 Label
 Button
 Text Box
 Dropdown list
 List Box
 Check box
 Radio Button
 Image Button
 Tree View
 Calendar
ERROR HANDLING TECHNIQUES:
Error handling in ASP.NET has three aspects:
 Tracing - tracing the program execution at page level or application level.
 Error handling - handling standard errors or custom errors at page level or
application level.
 Debugging - stepping through the program, setting break points to analyze the code.
SECURITY:
Implementing security in a site has the following aspects:
 Authentication: It is the process of ensuring the user's identity and
authenticity.
ASP.NET allows four types of authentications:
o Windows Authentication
o Forms Authentication
o Passport Authentication
o Custom Authentication
 Authorization: It is the process of defining and allotting specific roles to
specific users.
 Confidentiality: It involves encrypting the channel between the client
browser and the web server.
 Integrity: It involves maintaining the integrity of data. For example,
implementing digital signature.
CONFIGURATION:
The behavior of an ASP.NET application is affected by different settings in the
configuration files:
 machine.Config
 web.config
The machine.config file contains default and the machine-specific value for all supported
settings. The machine settings are controlled by the system administrator and applications
are generally not given access to this file.
An application however, can override the default values by creating web.config files in its
roots folder. The web.config file is a subset of the machine.config file.
If the application contains child directories, it can define a web.config file for each folder.
Scope of each configuration file is determined in a hierarchical top-down manner.
Any web.config file can locally extend, restrict, or override any settings defined on the
upper level.
Visual Studio generates a default web.config file for each project. An application can
execute without a web.config file, however, you cannot debug an application without a
web.config file.
ARCHITECTURE AND DESIGN PROCESS:
The following aspects when you review the architecture and design of your application:
 Deployment and infrastructure: You review the design of your application in
relation to the target deployment environment and any associated restrictions that
might be imposed by company or institutional policies.
 Performance and scalability frame: Pay particular attention to the design
approaches you have adopted for those areas that most commonly exhibit
performance bottlenecks. This guide refers to these collectively as the performance
and scalability frame.
 Layer by layer analysis: You walk through the logical layers of your application and
examine the performance characteristics of the various technologies that you have
used within each layer. For example, ASP.NET in the presentation layer; Web
services, Enterprise Services, and Microsoft®.NET remoting within the business
layer; and Microsoft SQL Server™ within the data access layer.
COMPILATION OF CODE:
In order for application code to service requests by users, ASP.NET must first
compile the code into one or more assemblies. Assemblies are files that have the file name
extension .dll.
You can write ASP.NET code in many different languages, such as Visual Basic, C#,
J#, and others. When the code is compiled, it is translated into a language-independent and
CPU-independent representation called Microsoft Intermediate Language (MSIL).
At run time, MSIL runs in the context of the .NET Framework, which translates MSIL into
CPU-specific instructions for the processor on the computer running the application.
There are many benefits to compiling application code including:
Performance Compiled code is much faster than scripting languages such as ECMA Script
or VBScript because it is a closer representation to machine code and does not require
additional parsing.
Security Compiled code is more difficult to reverse engineer than non-compiled source
code because it lacks the readability and abstraction of a high-level language. Additionally,
there are obfuscation tools that make compiled code even more resistant to reverse
engineering.
Stability Code is checked at compile time for syntax errors, type safety, and other problems.
By catching these errors at build-time you can eliminate many errors in your code.
Interoperability Because MSIL code supports any .NET language, you can use assemblies
that were originally written in other languages in your code. For example, if you are writing
an ASP.NET Web page in C#, you can add a reference to a .dll file was that written in Visual
Basic.
3.3 Overview of the Back End:
A database in SQL Server is made up of a collection of tables that stores a specific set of
structured data. A table contains a collection of rows, also referred to as records or tuples, and
columns, also referred to as attributes. Each column in the table is designed to store a certain
type of information, for example, dates, names, dollar amounts, and numbers.
A computer can have one or more than one instance of SQL Server installed. Each instance
of SQL Server can contain one or many databases. Within a database, there are one or many
object ownership groups called schemas. Within each schema there are database objects such
as tables, views, and stored procedures. Some objects such as certificates and asymmetric
keys are contained within the database, but are not contained within a schema. SQL Server
databases are stored in the file system in files. Files can be grouped into file Groups. When
people gain access to an instance of SQL Server they are identified as a login. When people
gain access to a database they are identified as a database user. A database user can be based
on a login. If contained databases are enabled, a database user can be created that is not based
on a login.
ASP.NET provides many options for storing, retrieving, and displaying data.
There are several SQL Server editions to choose from:
 SQL Server Express. The entry-level, free edition of SQL Server.
 SQL Server Express Local DB. A special execution mode of SQL Server Express that
enables you to work with databases as .mdf files. Typically, Local DB database files
are kept in the App_Data folder of a web project. (The user instance feature in SQL
Server Express also enables you to work with .mdf files, but the user instance feature
is deprecated; therefore, Local DB is recommended for working with .mdf files.)
In Visual Studio 2010 and earlier versions, SQL Server Express is installed by default
with Visual Studio; in Visual Studio 2012 Local DB is installed by default with
Visual Studio. Local DB is recommended for web development but not for production
web applications because it is not designed to work with IIS.
 SQL Server Developer Edition. Has all the features of Enterprise edition but is
licensed only for development and testing, not for production.
 SQL Server (full editions)
Several full editions are available: Enterprise, Business Intelligence, Standard, and
Web.
 Windows Azure SQL Database. The cloud edition of SQL Server, formerly known as
SQL Azure.
 SQL Server Compact 4.0. A free, lightweight database engine that you can use in
ASP.NET web applications for both development and production.
SQL Server Compact uses a different database engine and .NET data provider than
the other editions. SQL Server Management Studio (SSMS) and SQL Server Data
Tools (SSDT) don’t work with SQL Server Compact 4.0.
You don't have to use the same edition of SQL Server in development that you use in
production. The choice of SQL Server edition for development depends on your
development environment and the edition you choose for your production database:
 If you're using Visual Studio 2012, and your production database is SQL Database or
a full edition of SQL Server, the default choice for development is LocalDB. This is
the default choice because LocalDB is installed with Visual Studio 2012 by default.
 If you're using Visual Studio 2010 or WebMatrix, and your production database is
SQL Database or a full edition of SQL Server, the default choice for development is
SQL Server Express. This is the default choice because SQL Server Express 2008 is
installed with Visual Studio 2010 by default, and LocalDB doesn't work with
WebMatrix.
 If your production database is SQL Server Compact, use SQL Server Compact for
development.
Exceptions that might dictate a different choice for development include the following:
 If you want to use IIS as your development web server in Visual Studio 2012, use
SQL Server Express instead of LocalDB. You will have to install SQL Server
Express, because it is not installed with Visual Studio 2012 by default.
 If there are features of the edition you use in production that aren't available in
LocalDB or SQL Server Express, use Developer Edition or the same edition that you
use in production.
 If you want to enable multiple developers to work on the same Visual Studio web
project, with some of them using Visual Studio 2010 and some of them using Visual
Studio 2012
Creating a LocalData Base File:
 Open Solution Explorer and right click on your project
 Now Click on Add select New Item Sql Server Data Base.
 Now Data Source wizard will open. Configure data source and click on
finish
 Now local data base will create under App_Data folder of your project.
 The local data base file has the extension of .mdf i.e. local database
4. FEASIBILITY REPORT
4.1 Technical Feasibility
4.2 Economical Feasibility
4.3 Operational Feasibility
5. DATA FLOW DIAGRAM
5.1 Introduction:
Data Flow Diagram (DFD) provides a visual representation of the flow of information (i.e. data)
within a system. By drawing a Data Flow Diagram, we can tell the information provided by and
delivered to someone who takes part in system processes, the information needed in order to
complete the processes and the information needed to be stored and accessed.
Context DFD
A context diagram is a data flow diagram that only shows the top level, otherwise known as Level
0. At this level, there is only one visible process node that represents the functions of a complete
system in regards to how it interacts with external entities. Some of the benefits of a Context
Diagram are:
 Shows the overview of the boundaries of a system
 No technical knowledge is required to understand with the simple notation
 Simple to draw, amend and elaborate as its limited notation
The figure below shows a context Data Flow Diagram that is drawn for a COMPUTERIZED
BILLING SYSTEM FOR WATER BOTTLE PLANT. It contains a process (shape) that represents
the system to model, in this case, the "Computerized Billing System". It also shows the
participants who will interact with the system, called the external entities. In this example, Admin
is the entity who will interact with the system. In between the process and the external entities,
there are data flow (connectors) that indicate the existence of information exchange between the
entities and the system.
5.2 Level 0 DFD (Context level DFD)
5.3 Level-1 DFD -Administrator
5.4 Level-1 DFD –User
6. ENTITYRELATIONSHIP DIAGRAMS (ER)
7. DATABASE DESIGNS
7.1 Introduction
7.2 Normalized Database Tables
8. SAMPLE SCREEN SHOTS
9. CODING
//LOGINPAGE ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="loginpage.aspx.cs"
Inherits="ComputerizedBillingSystem.loginpage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
height: 255px;
}
.auto-style2 {
width: 246px;
}
.auto-style3 {
width: 246px;
height: 24px;
}
.auto-style4 {
height: 24px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table class="auto-style1">
<tr>
<td class="auto-
style2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
USERNAME</td>
<td>
<asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox>
&nbsp;&nbsp;&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="*UserName is required"
ForeColor="Red"></asp:RequiredFieldValidator>
&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr>
<td class="auto-
style2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
PASSWORD</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"
TextMode="Password"></asp:TextBox>
&nbsp;&nbsp;&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="TextBox2" ErrorMessage="*Password is required"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-
style3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="LOGIN" />
</td>
<td class="auto-style4">
<input id="Reset1" type="reset" value="RESET" /></td>
</tr>
<tr>
<td class="auto-style3">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:adminconn %>" SelectCommand="SELECT *
FROM admin;"></asp:SqlDataSource>
</td>
<td class="auto-style4">
<asp:Label ID="Label1" runat="server" Text="Label"
Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
</table>
<div>
</div>
</form>
</body>
</html>
// LOGINPAGE C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
namespace ComputerizedBillingSystem
{
public partial class loginpage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand("Select * from admin where
username='"+TextBox1.Text+"'and password='"+TextBox2.Text+"'",con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
if(dt.Rows.Count>0)
{
Response.Redirect("Home.aspx");
}
else
{
Label1.Visible = true;
Label1.Text = "UserName/Password is wrong";
}
}
catch(Exception ee)
{
Response.Write(ee.Message);
}
}
}
}
//HOMEPAGE.ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Home.aspx.cs"
Inherits="ComputerizedBillingSystem.Home" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
height: 252px;
}
.auto-style2 {
text-align: center;
}
.auto-style3 {
text-align: left;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<div class="auto-style3">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp; &nbsp;
WELCOME TO
HOMEPAGE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:HyperLink ID="HyperLink6" runat="server" ForeColor="Blue"
NavigateUrl="~/loginpage.aspx">LOGOUT</asp:HyperLink>
</div>
<table class="auto-style1">
<tr>
<td class="auto-style2">
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl="~/registeruser.aspx">CUSTOMER INFORMATION
ENTRY</asp:HyperLink>
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:HyperLink ID="HyperLink2" runat="server"
NavigateUrl="~/search.aspx">CUSTOMER SEARCH</asp:HyperLink>
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:HyperLink ID="HyperLink3" runat="server"
NavigateUrl="~/BillPage.aspx">BILL TO CUSTOMER</asp:HyperLink>
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:HyperLink ID="HyperLink4" runat="server"
NavigateUrl="~/UpdateCustomer.aspx">UPDATE CUSTOMER
DETAILS</asp:HyperLink>
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:HyperLink ID="HyperLink5" runat="server"
NavigateUrl="~/UpdateAdminLoginRecheck.aspx">UPDATE ADMIN
CREDENTIALS</asp:HyperLink>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
// HOMEPAGE C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ComputerizedBillingSystem
{
public partial class Home : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
//CUSTOMER INFORMATION ENTRY ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="registeruser.aspx.cs"
Inherits="ComputerizedBillingSystem.registeruser" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
}
.auto-style2 {
width: 246px;
text-align: right;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table class="auto-style1">
<tr>
<td class="auto-style2">Customer Id</td>
<td>
<asp:TextBox ID="TextBox1" runat="server" Enabled="False"
ReadOnly="True"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style2">Customer Name</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ErrorMessage="*" ControlToValidate="TextBox2"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style2">Door No</td>
<td>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ErrorMessage="*" ControlToValidate="TextBox3"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style2">Streer Name</td>
<td>
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ErrorMessage="*" ControlToValidate="TextBox4"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style2">Mobile Number</td>
<td>
<asp:TextBox ID="TextBox5" runat="server"
TextMode="Number"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ErrorMessage="*" ControlToValidate="TextBox5"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
<div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="STORE" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="CANCEL"
CausesValidation="False" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label>
&nbsp;
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:adminconn %>" SelectCommand="SELECT * FROM
[register]"></asp:SqlDataSource>
</div>
</form>
</body>
</html>
//CUSTOMER INFORMATION ENTRY C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace ComputerizedBillingSystem
{
public partial class registeruser : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
string custid= "122";
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
GenerateAutoId();
}
}
private void GenerateAutoId()
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand("select count(custid) from register", con);
int i = Convert.ToInt32(cmd.ExecuteScalar());
con.Close();
i++;
TextBox1.Text = custid+i.ToString();
}
private void clearfields()
{
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con.Open();
SqlCommand com = new SqlCommand("insert into
register(custid,custname,DoorNo,StreetName,mobile)values('"+TextBox1.Text+"','"+TextBo
x2.Text+"','"+TextBox3.Text+"','"+TextBox4.Text+"','"+TextBox5.Text+"')", con);
com.ExecuteNonQuery();
Label1.Visible = true;
Label1.Text = "Customer Data Inserted Successfully";
int val= 0;
SqlCommand com1 = new SqlCommand("insert into
Billdetails(Cid,Qty,Total)values("+TextBox1.Text+","+val+" ,"+val+")", con);
com1.ExecuteNonQuery();
con.Close();
GenerateAutoId();
clearfields();
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("Home.aspx");
}
}
}
//Customer Search aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="search.aspx.cs"
Inherits="ComputerizedBillingSystem.search" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
height: 58px;
margin-bottom: 0px;
}
.auto-style2 {
text-align: center;
height: 58px;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: x-large;
color: #0000FF;
}
.auto-style3 {
width: 586px;
text-align: right;
height: 32px;
}
.auto-style4 {
width: 586px;
text-align: right;
height: 41px;
}
.auto-style5 {
height: 41px;
}
.auto-style8 {
height: 44px;
text-align: left;
}
.auto-style10 {
height: 32px;
}
.auto-style11 {
text-align: center;
}
.auto-style12 {
width: 99%;
height: 498px;
margin-bottom: 0px;
}
.auto-style14 {
height: 44px;
text-align: left;
width: 586px;
}
.auto-style15 {
width: 586px;
text-align: right;
height: 22px;
}
.auto-style16 {
height: 22px;
}
.auto-style17 {
width: 586px;
text-align: right;
height: 20px;
}
.auto-style18 {
height: 20px;
}
</style>
</head>
<body>
<form id="form1" runat="server" style="background-color: #B2B2B2">
<table class="auto-style1">
<tr>
<td class="auto-style2">SEARCH CUSTOMER</td>
</tr>
</table>
<div>
<table class="auto-style12">
<tr>
<td class="auto-style4">
<asp:DropDownList ID="DropDownList1" runat="server" Height="17px"
Width="125px">
<asp:ListItem>SEARCH AS</asp:ListItem>
<asp:ListItem>CUSTOMER ID</asp:ListItem>
<asp:ListItem>MOBILE NO</asp:ListItem>
</asp:DropDownList>
</td>
<td class="auto-style5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click"
Text="OK" />
&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="DropDownList1" ErrorMessage="*Select Type of Search"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-
style3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CUSTOMER ID</td>
<td class="auto-style10">
&nbsp;
<asp:TextBox ID="TextBox1" runat="server" Enabled="False"></asp:TextBox>
&nbsp;&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="TextBox1" ErrorMessage="*" ForeColor="Red"
Visible="False"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-
style17">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp; CUSTOMER MOBILE NO</td>
<td class="auto-style18">
&nbsp;
<asp:TextBox ID="TextBox3" runat="server" Enabled="False"></asp:TextBox>
&nbsp;&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="TextBox3" ErrorMessage="*" ForeColor="Red"
Visible="False"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style15">
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button1" runat="server" Height="23px"
OnClick="Button1_Click" Text="SEARCH" Width="77px" />
</td>
<td class="auto-style16">
<br />
&nbsp;&nbsp;
<asp:Button ID="Button3" runat="server" OnClick="Button3_Click"
Text="CANCEL" Height="23px" Width="78px" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label1" runat="server" Text="Label" Visible="False"
ForeColor="Red"></asp:Label>
</td>
</tr>
<tr>
<td class="auto-style14">
<div class="auto-style11">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Large"
ForeColor="Green" Text="Label" Visible="False"></asp:Label>
</div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
<td class="auto-style8">
<asp:GridView ID="GridView1" runat="server" BackColor="White"
BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3"
Height="156px" Visible="False" Width="247px">
<FooterStyle BackColor="White" ForeColor="#000066" />
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White"
/>
<PagerStyle BackColor="White" ForeColor="#000066"
HorizontalAlign="Left" />
<RowStyle ForeColor="#000066" />
<SelectedRowStyle BackColor="#669999" Font-Bold="True"
ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#007DBB" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#00547E" />
</asp:GridView>
</td>
</tr>
</table>
</div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</form>
</body>
</html>
//CUSTOMER SEARCH C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace ComputerizedBillingSystem
{
public partial class search : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con.Open();
SqlCommand com = new SqlCommand("Select custid,custname,mobile from
register where custid='" + TextBox1.Text + "' or mobile='" + TextBox3.Text + "' ", con);
SqlDataAdapter da = new SqlDataAdapter(com);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
GridView1.Visible = true;
Label1.Visible = false;
Label2.Visible = true;
Label2.Text = "SEARCH SUCCESSFUL";
GridView1.DataSource = dt;
GridView1.DataBind();
con.Close();
}
else
{
GridView1.Visible = false;
Label1.Visible = true;
Label2.Visible = false;
Label1.Text = "RECORD NOT FOUND";
}
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
}
private void clearTextBox()
{
TextBox1.Text = "";
TextBox3.Text = "";
}
protected void Button2_Click(object sender, EventArgs e)
{
if (DropDownList1.SelectedIndex == 1)
{
Label1.Visible = false;
Label2.Visible = false;
clearTextBox();
TextBox1.Enabled = true;
TextBox3.Enabled = false;
GridView1.Visible = false;
}
else if (DropDownList1.SelectedIndex == 2)
{
Label1.Visible = false;
Label2.Visible = false;
clearTextBox();
TextBox1.Enabled = false;
TextBox3.Enabled = true;
GridView1.Visible = false;
}
}
protected void Button3_Click(object sender, EventArgs e)
{
Response.Redirect("Home.aspx");
}
}
}
//BILL TO CUSTOMER ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillPage.aspx.cs"
Inherits="ComputerizedBillingSystem.BillPage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
height: 351px;
}
.auto-style2 {
text-align: center;
}
.auto-style3 {
text-align: left;
height: 16px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table class="auto-style1">
<tr>
<td class="auto-style3">
<asp:HyperLink ID="HyperLink3" runat="server" ForeColor="Blue"
NavigateUrl="~/Home.aspx">BACK TO HOME</asp:HyperLink>
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl="~/BillPayLater.aspx">PAY LATER</asp:HyperLink>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:HyperLink ID="HyperLink2" runat="server"
NavigateUrl="~/BillPayNow.aspx">PAY NOW</asp:HyperLink>
</td>
</tr>
</table>
<div>
</div>
</form>
</body>
</html>
//BILL PAYLATER ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillPayLater.aspx.cs"
Inherits="ComputerizedBillingSystem.BillPayLater" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
height: 222px;
}
.auto-style2 {
height: 54px;
}
.auto-style3 {
height: 54px;
width: 249px;
text-align: right;
}
.auto-style4 {
width: 249px;
text-align: right;
}
.auto-style5 {
height: 54px;
width: 329px;
}
.auto-style6 {
width: 329px;
}
.auto-style7 {
width: 249px;
height: 39px;
text-align: right;
}
.auto-style8 {
width: 329px;
height: 39px;
}
.auto-style9 {
height: 39px;
}
.auto-style10 {
width: 249px;
height: 28px;
text-align: right;
}
.auto-style11 {
width: 329px;
height: 28px;
}
.auto-style12 {
height: 28px;
}
.auto-style13 {
width: 249px;
text-align: right;
height: 29px;
}
.auto-style14 {
width: 329px;
height: 29px;
}
.auto-style15 {
height: 29px;
}
.auto-style16 {
width: 249px;
height: 43px;
text-align: right;
}
.auto-style17 {
width: 329px;
height: 43px;
}
.auto-style18 {
height: 43px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Home.aspx">BACK
TO HOME</asp:HyperLink>
</div>
<table class="auto-style1">
<tr>
<td class="auto-style3">ID NUMBER</td>
<td class="auto-style5">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="*"
ForeColor="Red"></asp:RequiredFieldValidator>
&nbsp;
<asp:Button ID="Button1" runat="server" Height="27px"
OnClick="Button1_Click" Text="GET DETAILS" Width="112px" />
</td>
<td class="auto-style2">&nbsp;<asp:Label ID="Label1" runat="server"
Text="Label" Visible="False"></asp:Label>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style13">
<asp:Label ID="Label2" runat="server" Text="NAME"
Visible="False"></asp:Label>
</td>
<td class="auto-style14">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox2" runat="server" Visible="False"></asp:TextBox>
&nbsp;</td>
<td class="auto-style15"></td>
</tr>
<tr>
<td class="auto-style10">
<asp:Label ID="Label3" runat="server" Text="MOBILE"
Visible="False"></asp:Label>
</td>
<td class="auto-style11">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox3" runat="server" Visible="False"></asp:TextBox>
&nbsp;</td>
<td class="auto-style12"></td>
</tr>
<tr>
<td class="auto-style7">
<asp:Label ID="Label5" runat="server" Text="PRICE"
Visible="False"></asp:Label>
</td>
<td class="auto-style8">&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox5"
runat="server" Visible="False"></asp:TextBox>
&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="TextBox5" ErrorMessage="*Give Pice of Bottle"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
<td class="auto-style9">&nbsp;</td>
</tr>
<tr>
<td class="auto-style4">
<asp:Label ID="Label4" runat="server" Text="QUANTITY"
Visible="False"></asp:Label>
</td>
<td class="auto-style6">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox4" runat="server" Visible="False"></asp:TextBox>
&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="TextBox4" ErrorMessage="*No of Bottles"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style13">
<asp:Label ID="Label6" runat="server" Text="TOTAL"
Visible="False"></asp:Label>
</td>
<td class="auto-style14">&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox6"
runat="server" Enabled="False" Visible="False"></asp:TextBox>
</td>
<td class="auto-style15"></td>
</tr>
<tr>
<td class="auto-style16">
<asp:Button ID="Button2" runat="server" Height="20px"
OnClick="Button2_Click" Text="CANCEL" Visible="False" Width="79px"
CausesValidation="False" />
</td>
<td class="auto-style17">&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button3" runat="server" Height="22px" Text="ADD
INVOICE" Visible="False" Width="100px" OnClick="Button3_Click" />
&nbsp;&nbsp;
</td>
<td class="auto-style18"></td>
</tr>
<tr>
<td class="auto-style3">
</td>
<td class="auto-style5">
<asp:Label ID="Label7" runat="server" Font-Bold="True" Font-Size="Medium"
ForeColor="Green" Text="Label" Visible="False"></asp:Label>
</td>
<td class="auto-style2"></td>
</tr>
</table>
</form>
</body>
</html>
//BILL PAYLATER C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace ComputerizedBillingSystem
{
public partial class BillPayLater : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private void clearfields()
{
TextBox1.Text = " ";
TextBox2.Text = " ";
TextBox3.Text = " ";
TextBox4.Text = " ";
TextBox5.Text = " ";
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("Home.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
RequiredFieldValidator2.Visible = false;
RequiredFieldValidator3.Visible = false;
bool temp = false;
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand("select * from register where
custid="+TextBox1.Text.Trim()+"", con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
TextBox2.Text= dr.GetString(1);
TextBox3.Text = dr.GetString(4);
temp = true;
Label1.Visible = false;
Label2.Visible = true;
TextBox2.Visible = true;
Label3.Visible = true;
TextBox3.Visible = true;
Label4.Visible = true;
TextBox4.Visible = true;
Label5.Visible = true;
TextBox5.Visible = true;
Button2.Visible = true;
Button3.Visible = true;
Label6.Visible = true;
TextBox6.Visible = true;
HyperLink1.Visible = false;
}
if (temp == false)
{
Label1.Visible = true;
Label1.Text = "Record Not Found";
Label2.Visible = false;
TextBox2.Visible = false;
Label3.Visible = false;
TextBox3.Visible = false;
Label4.Visible = false;
TextBox4.Visible = false;
TextBox5.Visible = false;
TextBox6.Visible = false;
Label5.Visible = false;
Label6.Visible = false;
Label7.Visible = false;
Button2.Visible = false;
Button3.Visible = false;
}
con.Close();
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
}
protected void Button3_Click(object sender, EventArgs e)
{
int dqty;
int cost;
int ctot = 0;
int dtot, dtot2;
int totqty, cqty;
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con.Open();
SqlCommand cmd1 = new SqlCommand("select Qty,Total from Billdetails where
Cid=" + TextBox1.Text + "", con);
SqlDataReader dr = cmd1.ExecuteReader();
while (dr.Read())
{
cost = Convert.ToInt32(TextBox5.Text);
dqty = Convert.ToInt32(dr.GetInt32(0));
cqty = Convert.ToInt32(TextBox4.Text);
totqty = dqty + cqty;
dtot = Convert.ToInt32(dr.GetInt32(1));
ctot = cqty * cost;
dtot2 = dtot + ctot;
TextBox6.Text = Convert.ToString(dtot2);
dr.Close();
con.Close();
//Updating Data in database with new values.
SqlConnection con1 = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con1.Open();
SqlDataAdapter da = new SqlDataAdapter("update Billdetails set Qty=" + totqty
+ ",Total=" + dtot2 + " where Cid=" + TextBox1.Text + "", con);
DataSet ds = new DataSet();
da.Fill(ds);
Label7.Visible = true;
Label7.Text = "Update Successful.Balance Due is: " + dtot2 + "";
clearfields();
con1.Close();
}
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
}
}
}
//BILL PAYNOW ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillPayNow.aspx.cs"
Inherits="ComputerizedBillingSystem.BillPayNow" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 119%;
height: 591px;
}
.auto-style2 {
height: 54px;
}
.auto-style3 {
height: 54px;
text-align: right;
}
.auto-style10 {
width: 590px;
height: 28px;
text-align: right;
}
.auto-style11 {
width: 544px;
height: 28px;
}
.auto-style12 {
height: 28px;
}
.auto-style16 {
width: 590px;
height: 44px;
text-align: right;
}
.auto-style17 {
width: 544px;
height: 44px;
}
.auto-style18 {
height: 44px;
}
.auto-style22 {
width: 590px;
text-align: right;
height: 30px;
}
.auto-style23 {
width: 544px;
height: 30px;
}
.auto-style24 {
height: 30px;
}
.auto-style31 {
width: 590px;
height: 35px;
text-align: right;
}
.auto-style32 {
width: 544px;
height: 35px;
}
.auto-style33 {
height: 35px;
}
.auto-style37 {
width: 590px;
height: 33px;
text-align: right;
}
.auto-style38 {
width: 544px;
height: 33px;
}
.auto-style39 {
height: 33px;
}
.auto-style40 {
width: 590px;
height: 37px;
text-align: right;
}
.auto-style41 {
width: 544px;
height: 37px;
}
.auto-style42 {
height: 37px;
}
.auto-style43 {
text-align: center;
margin-left: 4px;
}
.auto-style45 {
text-align: center;
}
.auto-style46 {
text-align: left;
}
.auto-style47 {
text-decoration: underline;
}
</style>
</head>
<body>
<form id="form1" runat="server" style="background-color: #B2B2B2">
<div>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Home.aspx">BACK
TO HOME</asp:HyperLink>
</div>
<table class="auto-style1">
<tr>
<td class="auto-style16">ID NUMBER</td>
<td class="auto-style17">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="*"
ForeColor="Red"></asp:RequiredFieldValidator>
&nbsp;
<asp:Button ID="Button1" runat="server" Height="24px"
OnClick="Button1_Click" Text="GET BILL" Width="96px" />
&nbsp;&nbsp; <asp:Label ID="Label1" runat="server" Text="Label"
Visible="False" ForeColor="Red"></asp:Label>
</td>
<td class="auto-style18">&nbsp;&nbsp;</td>
</tr>
<tr>
<td class="auto-style22">
<asp:Label ID="Label2" runat="server" Text="NAME"
Visible="False"></asp:Label>
</td>
<td class="auto-style23">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox2" runat="server" Visible="False"></asp:TextBox>
&nbsp;</td>
<td class="auto-style24"></td>
</tr>
<tr>
<td class="auto-style10">
<asp:Label ID="Label3" runat="server" Text="MOBILE"
Visible="False"></asp:Label>
</td>
<td class="auto-style11">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox3" runat="server" Visible="False"></asp:TextBox>
&nbsp;</td>
<td class="auto-style12"></td>
</tr>
<tr>
<td class="auto-style31">
<asp:Label ID="Label5" runat="server" Text="PRICE"
Visible="False"></asp:Label>
</td>
<td class="auto-style32">&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox5"
runat="server" Visible="False"></asp:TextBox>
&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="TextBox5" ErrorMessage="*Give Pice of Bottle" ForeColor="Red"
ValidationGroup="tot"></asp:RequiredFieldValidator>
</td>
<td class="auto-style33"></td>
</tr>
<tr>
<td class="auto-style31">
<asp:Label ID="Label4" runat="server" Text="QUANTITY"
Visible="False"></asp:Label>
</td>
<td class="auto-style32">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox4" runat="server" Visible="False"></asp:TextBox>
&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="TextBox4" ErrorMessage="*No of Bottles" ForeColor="Red"
ValidationGroup="tot"></asp:RequiredFieldValidator>
</td>
<td class="auto-style33"></td>
</tr>
<tr>
<td class="auto-style40">
<asp:Label ID="Label6" runat="server" Text="TOTAL"
Visible="False"></asp:Label>
</td>
<td class="auto-style41">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox6"
runat="server" Visible="False" Enabled="False"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton1" runat="server"
OnClick="LinkButton1_Click" Visible="False" ValidationGroup="tot">GET
TOTAL</asp:LinkButton>
</td>
<td class="auto-style42"></td>
</tr>
<tr>
<td class="auto-style37">
<asp:Label ID="Label7" runat="server" Text="PAID AMOUNT"
Visible="False"></asp:Label>
</td>
<td class="auto-style38">&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox
ID="TextBox7" runat="server" Visible="False"></asp:TextBox>
&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="TextBox7" ErrorMessage="* " ForeColor="Red"
Visible="False"></asp:RequiredFieldValidator>
</td>
<td class="auto-style39"></td>
</tr>
<tr>
<td class="auto-style16">
<asp:Button ID="Button2" runat="server" Height="22px"
OnClick="Button2_Click" Text="CANCEL" Visible="False" Width="87px"
CausesValidation="False" />
</td>
<td class="auto-style17">&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button3" runat="server" Height="23px" Text="GENERATE
BILL" Visible="False" Width="118px" OnClick="Button3_Click" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label11" runat="server" ForeColor="Red" Text="Label"
Visible="False"></asp:Label>
</td>
<td class="auto-style18"></td>
</tr>
<tr>
<td class="auto-style3" colspan="2">
<div class="auto-style46">
<asp:Panel ID="Panel1" runat="server" Height="138px" Visible="False"
Width="1110px" Font-Bold="True" Font-Size="Large" ForeColor="Black" CssClass="auto-
style43">
<div class="auto-style46">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp; DATE:&nbsp;
<asp:Label ID="Label12" runat="server" Text="Label"
Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TIME:
<asp:Label ID="Label15" runat="server" Text="Label"
Visible="False"></asp:Label>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;<span class="auto-style47"><br />
</span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span class="auto-
style47">ID NUMBER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p; Total&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Amount Paid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Due
Amount</span><br class="auto-style47" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br class="auto-style47" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label14" runat="server" Text="Label"
Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;
<asp:Label ID="Label13" runat="server" Text="Label"
Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; &nbsp;
<asp:Label ID="Label8" runat="server" ForeColor="Black" Text="Label"
Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;
<asp:Label ID="Label10" runat="server" ForeColor="Black" Text="Label"
Visible="False"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label9" runat="server" ForeColor="Black" Text="Label"
Visible="False"></asp:Label>
</div>
</asp:Panel>
</div>
<div class="auto-style45">
&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button4" runat="server" CausesValidation="False"
OnClick="Button4_Click" Text="PRINT" Visible="False" />
</div>
</td>
<td class="auto-style2"></td>
</tr>
<tr>
<td class="auto-style3" colspan="2">
&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
</tr>
</table>
</form>
</body>
</html>
//BILL PAYNOW C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
namespace ComputerizedBillingSystem
{
public partial class BillPayNow : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private void clearfields()
{
TextBox1.Text = " ";
TextBox2.Text = " ";
TextBox3.Text = " ";
TextBox4.Text = " ";
TextBox5.Text = " ";
TextBox6.Text = " ";
TextBox7.Text = " ";
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("Home.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
RequiredFieldValidator2.Visible = false;
RequiredFieldValidator3.Visible = false;
booltemp = false;
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].Conne
ctionString);
con.Open();
SqlCommand cmd = new SqlCommand("select * from register where
custid=" + TextBox1.Text.Trim() + "", con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
TextBox2.Text = dr.GetString(1);
TextBox3.Text = dr.GetString(4);
temp = true;
Label1.Visible = false;
Label2.Visible = true;
TextBox2.Visible = true;
Label3.Visible = true;
TextBox3.Visible = true;
Label4.Visible = true;
TextBox4.Visible = true;
Label5.Visible = true;
TextBox5.Visible = true;
Button2.Visible = true;
Button3.Visible = true;
Label6.Visible = true;
TextBox6.Visible = true;
Label7.Visible = true;
TextBox7.Visible = true;
Label8.Visible = false;
Label9.Visible = false;
Label10.Visible = false;
Label12.Visible = false;
Label13.Visible = false;
Label14.Visible = false;
Label15.Visible = false;
LinkButton1.Visible = true;
HyperLink1.Visible = false;
}
if (temp == false)
{
Label1.Visible = true;
Label1.Text = "Record Not Found";
Label2.Visible = false;
TextBox2.Visible = false;
Label3.Visible = false;
TextBox3.Visible = false;
Label4.Visible = false;
TextBox4.Visible = false;
TextBox5.Visible = false;
TextBox6.Visible = false;
Label5.Visible = false;
Label6.Visible = false;
Button2.Visible = false;
Button3.Visible = false;
Label7.Visible = false;
TextBox7.Visible = false;
Label8.Visible = false;
Label9.Visible = false;
Label10.Visible = false;
Label12.Visible = false;
Label13.Visible = false;
Label14.Visible = false;
Label15.Visible = false;
LinkButton1.Visible = false;
}
con.Close();
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
}
protected void Button3_Click(object sender, EventArgs e)
{
RequiredFieldValidator4.Visible = true;
int dqty;
int cost;
int ctot = 0;
int dtot, dtot2;
int totqty, cqty;
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].Conne
ctionString);
con.Open();
SqlCommand cmd1 = new SqlCommand("select Qty,Total from
Billdetails where Cid=" + TextBox1.Text + "", con);
SqlDataReader dr = cmd1.ExecuteReader();
while (dr.Read())
{
cost= Convert.ToInt32(TextBox5.Text);
dqty = Convert.ToInt32(dr.GetInt32(0));
cqty = Convert.ToInt32(TextBox4.Text);
totqty = dqty + cqty;
ctot = cqty * cost;
dtot = Convert.ToInt32(dr.GetInt32(1));
dtot2 = dtot + ctot;
TextBox6.Text = Convert.ToString(dtot2);
int mtot = Convert.ToInt32(TextBox7.Text);
int m2tot = dtot2 - mtot;
if (m2tot < 0)
{
TextBox7.Text = "";
Label11.Visible = true;
Label11.Text = "Your payment exceed your bill amount";
}
else
{
if (m2tot == 0)
{
totqty = 0;
}
Panel1.Visible = true;
Label11.Visible = false;
Label8.Visible = true;
Label9.Visible = true;
Label10.Visible = true;
Label12.Visible = true;
Label13.Visible = true;
Label14.Visible = true;
Label15.Visible = true;
Label2.Visible = false;
TextBox2.Visible = false;
Label3.Visible = false;
TextBox3.Visible = false;
Label4.Visible = false;
TextBox4.Visible = false;
TextBox5.Visible = false;
TextBox6.Visible = false;
Label5.Visible = false;
Label6.Visible = false;
Button2.Visible = false;
Button3.Visible = false;
Label7.Visible = false;
TextBox7.Visible = false;
LinkButton1.Visible = false;
HyperLink1.Visible = true; ;
Label8.Text = Convert.ToString(dtot2);
Label9.Text = Convert.ToString(m2tot);
Label10.Text = Convert.ToString(mtot);
Label12.Text = DateTime.Now.ToShortDateString();
Label15.Text = DateTime.Now.ToShortTimeString();
Label13.Text = TextBox2.Text;
Label14.Text = TextBox1.Text;
Button4.Visible = true;
//Updating Data in database with new values.
SqlConnection con1 = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].Conne
ctionString);
con1.Open();
SqlDataAdapter da = new SqlDataAdapter("update Billdetails set
Qty=" + totqty + ",Total=" + m2tot + " where Cid=" + TextBox1.Text + "",
con1);
DataSet ds = new DataSet();
da.Fill(ds);
con1.Close();
clearfields();
dr.Close();
con.Close();
}
}
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
RequiredFieldValidator2.Visible = true;
RequiredFieldValidator3.Visible = true;
int dqty;
int cost;
int ctot = 0;
int dtot, dtot2;
int totqty, cqty;
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].Conne
ctionString);
con.Open();
SqlCommand cmd1 = new SqlCommand("select Qty,Total from
Billdetails where Cid=" + TextBox1.Text + "", con);
SqlDataReader dr = cmd1.ExecuteReader();
while (dr.Read())
{
cost= Convert.ToInt32(TextBox5.Text);
dqty = Convert.ToInt32(dr.GetInt32(0));
cqty = Convert.ToInt32(TextBox4.Text);
totqty = dqty + cqty;
ctot = cqty * cost;
dtot = Convert.ToInt32(dr.GetInt32(1));
dtot2 = dtot+ ctot;
TextBox6.Text = Convert.ToString(dtot2);
dr.Close();
con.Close();
}
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
}
protected void Button4_Click(object sender, EventArgs e)
{
Session["ctrl"] = Panel1;
ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script
language=javascript>windows.open('Print.aspx','PrintMe','height=300px,width=
300px,scrollbars=1');</script>");
Control ctrl = (Control)Session["ctrl"];
PrintHelper.PrintWebControl(ctrl);
/* For Direct print
PrintHelper.PrintWebControl(Panel1);*/
}
}
}
//BILLPAYLATER ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillPayLater.aspx.cs"
Inherits="ComputerizedBillingSystem.BillPayLater" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
height: 222px;
}
.auto-style2 {
height: 54px;
}
.auto-style3 {
height: 54px;
width: 249px;
text-align: right;
}
.auto-style4 {
width: 249px;
text-align: right;
}
.auto-style5 {
height: 54px;
width: 329px;
}
.auto-style6 {
width: 329px;
}
.auto-style7 {
width: 249px;
height: 39px;
text-align: right;
}
.auto-style8 {
width: 329px;
height: 39px;
}
.auto-style9 {
height: 39px;
}
.auto-style10 {
width: 249px;
height: 28px;
text-align: right;
}
.auto-style11 {
width: 329px;
height: 28px;
}
.auto-style12 {
height: 28px;
}
.auto-style13 {
width: 249px;
text-align: right;
height: 29px;
}
.auto-style14 {
width: 329px;
height: 29px;
}
.auto-style15 {
height: 29px;
}
.auto-style16 {
width: 249px;
height: 43px;
text-align: right;
}
.auto-style17 {
width: 329px;
height: 43px;
}
.auto-style18 {
height: 43px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Home.aspx">BACK
TO HOME</asp:HyperLink>
</div>
<table class="auto-style1">
<tr>
<td class="auto-style3">ID NUMBER</td>
<td class="auto-style5">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="*"
ForeColor="Red"></asp:RequiredFieldValidator>
&nbsp;
<asp:Button ID="Button1" runat="server" Height="27px"
OnClick="Button1_Click" Text="GET DETAILS" Width="112px" />
</td>
<td class="auto-style2">&nbsp;<asp:Label ID="Label1" runat="server"
Text="Label" Visible="False"></asp:Label>
&nbsp;</td>
</tr>
<tr>
<td class="auto-style13">
<asp:Label ID="Label2" runat="server" Text="NAME"
Visible="False"></asp:Label>
</td>
<td class="auto-style14">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox2" runat="server" Visible="False"></asp:TextBox>
&nbsp;</td>
<td class="auto-style15"></td>
</tr>
<tr>
<td class="auto-style10">
<asp:Label ID="Label3" runat="server" Text="MOBILE"
Visible="False"></asp:Label>
</td>
<td class="auto-style11">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox3" runat="server" Visible="False"></asp:TextBox>
&nbsp;</td>
<td class="auto-style12"></td>
</tr>
<tr>
<td class="auto-style7">
<asp:Label ID="Label5" runat="server" Text="PRICE"
Visible="False"></asp:Label>
</td>
<td class="auto-style8">&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox5"
runat="server" Visible="False"></asp:TextBox>
&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="TextBox5" ErrorMessage="*Give Pice of Bottle"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
<td class="auto-style9">&nbsp;</td>
</tr>
<tr>
<td class="auto-style4">
<asp:Label ID="Label4" runat="server" Text="QUANTITY"
Visible="False"></asp:Label>
</td>
<td class="auto-style6">&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox4" runat="server" Visible="False"></asp:TextBox>
&nbsp;
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="TextBox4" ErrorMessage="*No of Bottles"
ForeColor="Red"></asp:RequiredFieldValidator>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style13">
<asp:Label ID="Label6" runat="server" Text="TOTAL"
Visible="False"></asp:Label>
</td>
<td class="auto-style14">&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox6"
runat="server" Enabled="False" Visible="False"></asp:TextBox>
</td>
<td class="auto-style15"></td>
</tr>
<tr>
<td class="auto-style16">
<asp:Button ID="Button2" runat="server" Height="20px"
OnClick="Button2_Click" Text="CANCEL" Visible="False" Width="79px"
CausesValidation="False" />
</td>
<td class="auto-style17">&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button3" runat="server" Height="22px" Text="ADD
INVOICE" Visible="False" Width="100px" OnClick="Button3_Click" />
&nbsp;&nbsp;
</td>
<td class="auto-style18"></td>
</tr>
<tr>
<td class="auto-style3">
</td>
<td class="auto-style5">
<asp:Label ID="Label7" runat="server" Font-Bold="True" Font-Size="Medium"
ForeColor="Green" Text="Label" Visible="False"></asp:Label>
</td>
<td class="auto-style2"></td>
</tr>
</table>
</form>
</body>
</html>
//BILL PAYNOW C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
namespace ComputerizedBillingSystem
{
public partial class BillPayNow : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private void clearfields()
{
TextBox1.Text = " ";
TextBox2.Text = " ";
TextBox3.Text = " ";
TextBox4.Text = " ";
TextBox5.Text = " ";
TextBox6.Text = " ";
TextBox7.Text = " ";
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("Home.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
RequiredFieldValidator2.Visible = false;
RequiredFieldValidator3.Visible = false;
bool temp = false;
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand("select * from register where custid=" +
TextBox1.Text.Trim() + "", con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
TextBox2.Text = dr.GetString(1);
TextBox3.Text = dr.GetString(4);
temp = true;
Label1.Visible = false;
Label2.Visible = true;
TextBox2.Visible = true;
Label3.Visible = true;
TextBox3.Visible = true;
Label4.Visible = true;
TextBox4.Visible = true;
Label5.Visible = true;
TextBox5.Visible = true;
Button2.Visible = true;
Button3.Visible = true;
Label6.Visible = true;
TextBox6.Visible = true;
Label7.Visible = true;
TextBox7.Visible = true;
Label8.Visible = false;
Label9.Visible = false;
Label10.Visible = false;
Label12.Visible = false;
Label13.Visible = false;
Label14.Visible = false;
Label15.Visible = false;
LinkButton1.Visible = true;
HyperLink1.Visible = false;
}
if (temp == false)
{
Label1.Visible = true;
Label1.Text = "Record Not Found";
Label2.Visible = false;
TextBox2.Visible = false;
Label3.Visible = false;
TextBox3.Visible = false;
Label4.Visible = false;
TextBox4.Visible = false;
TextBox5.Visible = false;
TextBox6.Visible = false;
Label5.Visible = false;
Label6.Visible = false;
Button2.Visible = false;
Button3.Visible = false;
Label7.Visible = false;
TextBox7.Visible = false;
Label8.Visible = false;
Label9.Visible = false;
Label10.Visible = false;
Label12.Visible = false;
Label13.Visible = false;
Label14.Visible = false;
Label15.Visible = false;
LinkButton1.Visible = false;
}
con.Close();
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
}
protected void Button3_Click(object sender, EventArgs e)
{
RequiredFieldValidator4.Visible = true;
int dqty;
int cost;
int ctot = 0;
int dtot, dtot2;
int totqty, cqty;
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con.Open();
SqlCommand cmd1 = new SqlCommand("select Qty,Total from Billdetails where
Cid=" + TextBox1.Text + "", con);
SqlDataReader dr = cmd1.ExecuteReader();
while (dr.Read())
{
cost = Convert.ToInt32(TextBox5.Text);
dqty = Convert.ToInt32(dr.GetInt32(0));
cqty = Convert.ToInt32(TextBox4.Text);
totqty = dqty + cqty;
ctot = cqty * cost;
dtot = Convert.ToInt32(dr.GetInt32(1));
dtot2 = dtot + ctot;
TextBox6.Text = Convert.ToString(dtot2);
int mtot = Convert.ToInt32(TextBox7.Text);
int m2tot = dtot2 - mtot;
if (m2tot < 0)
{
TextBox7.Text = "";
Label11.Visible = true;
Label11.Text = "Your payment exceed your bill amount";
}
else
{
if (m2tot == 0)
{
totqty = 0;
}
Panel1.Visible = true;
Label11.Visible = false;
Label8.Visible = true;
Label9.Visible = true;
Label10.Visible = true;
Label12.Visible = true;
Label13.Visible = true;
Label14.Visible = true;
Label15.Visible = true;
Label2.Visible = false;
TextBox2.Visible = false;
Label3.Visible = false;
TextBox3.Visible = false;
Label4.Visible = false;
TextBox4.Visible = false;
TextBox5.Visible = false;
TextBox6.Visible = false;
Label5.Visible = false;
Label6.Visible = false;
Button2.Visible = false;
Button3.Visible = false;
Label7.Visible = false;
TextBox7.Visible = false;
LinkButton1.Visible = false;
HyperLink1.Visible = true; ;
Label8.Text = Convert.ToString(dtot2);
Label9.Text = Convert.ToString(m2tot);
Label10.Text = Convert.ToString(mtot);
Label12.Text = DateTime.Now.ToShortDateString();
Label15.Text = DateTime.Now.ToShortTimeString();
Label13.Text = TextBox2.Text;
Label14.Text = TextBox1.Text;
Button4.Visible = true;
//Updating Data in database with new values.
SqlConnection con1 = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con1.Open();
SqlDataAdapter da = new SqlDataAdapter("update Billdetails set Qty=" +
totqty + ",Total=" + m2tot + " where Cid=" + TextBox1.Text + "", con1);
DataSet ds = new DataSet();
da.Fill(ds);
con1.Close();
clearfields();
dr.Close();
con.Close();
}
}
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
RequiredFieldValidator2.Visible = true;
RequiredFieldValidator3.Visible = true;
int dqty;
int cost;
int ctot = 0;
int dtot, dtot2;
int totqty, cqty;
try
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString);
con.Open();
SqlCommand cmd1 = new SqlCommand("select Qty,Total from Billdetails where
Cid=" + TextBox1.Text + "", con);
SqlDataReader dr = cmd1.ExecuteReader();
while (dr.Read())
{
cost = Convert.ToInt32(TextBox5.Text);
dqty = Convert.ToInt32(dr.GetInt32(0));
cqty = Convert.ToInt32(TextBox4.Text);
totqty = dqty + cqty;
ctot = cqty * cost;
dtot = Convert.ToInt32(dr.GetInt32(1));
dtot2 = dtot + ctot;
TextBox6.Text = Convert.ToString(dtot2);
dr.Close();
con.Close();
}
}
catch (Exception ee)
{
Response.Write(ee.Message);
}
}
protected void Button4_Click(object sender, EventArgs e)
{
Session["ctrl"] = Panel1;
ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script
language=javascript>windows.open('Print.aspx','PrintMe','height=300px,width=300px,scrollb
ars=1');</script>");
Control ctrl = (Control)Session["ctrl"];
PrintHelper.PrintWebControl(ctrl)
/* For Direct print
PrintHelper.PrintWebControl(Panel1);*/
}
}
}
//PRINTER HELPER CLASS FILE .CS
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Text;
using System.Web.SessionState;
public class PrintHelper
{
public PrintHelper()
{
}
public static void PrintWebControl(Control ctrl)
{
PrintWebControl(ctrl, string.Empty);
}
public static void PrintWebControl(Control ctrl, string Script)
{
StringWriter stringWrite = new StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new
System.Web.UI.HtmlTextWriter(stringWrite);
if (ctrl is WebControl)
{
Unit w = new Unit(100, UnitType.Percentage); ((WebControl)ctrl).Width = w;
}
Page pg = new Page();
pg.EnableEventValidation = false;
if (Script != string.Empty)
{
pg.ClientScript.RegisterStartupScript(pg.GetType(), "PrintJavaScript", Script);
}
HtmlForm frm = new HtmlForm();
pg.Controls.Add(frm);
frm.Attributes.Add("runat", "server");
frm.Controls.Add(ctrl);
pg.DesignerInitialize();
pg.RenderControl(htmlWrite);
string strHTML = stringWrite.ToString();
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Write(strHTML);
HttpContext.Current.Response.Write("<script>window.print();</script>");
HttpContext.Current.Response.End();
}
}
//UPDATE CUSTOMER DETAILS ASPX
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="UpdateCustomer.aspx.cs"
Inherits="ComputerizedBillingSystem.UpdateCustomer" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
height: 283px;
}
.auto-style2 {
width: 408px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table class="auto-style1">
<tr>
<td style="text-align: left" class="auto-style2">&nbsp;ID
NO&nbsp;&nbsp;&nbsp;&nbsp;
<asp:TextBox ID="TextBox1" runat="server" Height="16px"
Width="120px"></asp:TextBox>
&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="TextBox1" ErrorMessage="*"
ForeColor="Red"></asp:RequiredFieldValidator>
&nbsp;&nbsp;
<br />
&nbsp;
</td>
<td style="text-align: left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl="~/Home.aspx">BACK TO HOME</asp:HyperLink>
</td>
</tr>
<tr>
<td style="text-align: center" class="auto-style2">
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
AutoGenerateDeleteButton="True" AutoGenerateEditButton="True"
DataKeyNames="custid" DataSourceID="SqlDataSource1" BackColor="White"
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3"
GridLines="Vertical" Height="177px" Width="295px">
<AlternatingRowStyle BackColor="#DCDCDC" />
<Columns>
<asp:BoundField DataField="custid" HeaderText="custid"
ReadOnly="True" SortExpression="custid" />
<asp:BoundField DataField="custname" HeaderText="custname"
SortExpression="custname" />
<asp:BoundField DataField="DoorNo" HeaderText="DoorNo"
SortExpression="DoorNo" />
<asp:BoundField DataField="StreetName" HeaderText="StreetName"
SortExpression="StreetName" />
<asp:BoundField DataField="Mobile" HeaderText="Mobile"
SortExpression="Mobile" />
</Columns>
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White"
/>
<PagerStyle BackColor="#999999" ForeColor="Black"
HorizontalAlign="Center" />
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True"
ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#0000A9" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#000065" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:adminconn %>" SelectCommand="SELECT *
FROM [register] WHERE ([custid] = @custid)" DeleteCommand="DELETE FROM
[register] WHERE [custid] = @custid" InsertCommand="INSERT INTO [register] ([custid],
[custname], [DoorNo], [StreetName], [Mobile]) VALUES (@custid, @custname, @DoorNo,
@StreetName, @Mobile)" UpdateCommand="UPDATE [register] SET [custname] =
@custname, [DoorNo] = @DoorNo, [StreetName] = @StreetName, [Mobile] = @Mobile
WHERE [custid] = @custid">
<DeleteParameters>
<asp:Parameter Name="custid" Type="String" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="custid" Type="String" />
<asp:Parameter Name="custname" Type="String" />
<asp:Parameter Name="DoorNo" Type="String" />
<asp:Parameter Name="StreetName" Type="String" />
<asp:Parameter Name="Mobile" Type="String" />
</InsertParameters>
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="custid"
PropertyName="Text" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="custname" Type="String" />
<asp:Parameter Name="DoorNo" Type="String" />
<asp:Parameter Name="StreetName" Type="String" />
<asp:Parameter Name="Mobile" Type="String" />
<asp:Parameter Name="custid" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>
</td>
<td style="text-align: center">
&nbsp;</td>
</tr>
</table>
</form>
</body>
</html>
//UPDATE ADMIN LOGIN CREDENTIALS (RECHECK USERNAME @ PASSWORD)
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="UpdateAdminLoginRecheck.aspx.cs"
Inherits="ComputerizedBillingSystem.UpdateAdminLoginRecheck" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
height: 153px;
}
.auto-style2 {
width: 193px;
}
.auto-style3 {
width: 193px;
height: 61px;
}
.auto-style4 {
height: 61px;
}
.auto-style5 {
width: 193px;
height: 51px;
}
.auto-style6 {
height: 51px;
}
.auto-style7 {
width: 209px;
height: 61px;
text-align: right;
}
.auto-style8 {
width: 209px;
height: 51px;
text-align: right;
}
.auto-style9 {
width: 209px;
text-align: right;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table class="auto-style1">
<tr>
<td class="auto-style3">
Documentation
Documentation
Documentation
Documentation
Documentation
Documentation
Documentation

More Related Content

What's hot

web based Internet cafe system abstract
web based Internet cafe system abstractweb based Internet cafe system abstract
web based Internet cafe system abstractFAKHRUN NISHA
 
Event Management System Document
Event Management System Document Event Management System Document
Event Management System Document LJ PROJECTS
 
Full accesspolicyconsolidation for event processing systems
Full accesspolicyconsolidation for event processing systemsFull accesspolicyconsolidation for event processing systems
Full accesspolicyconsolidation for event processing systemsviswanadhamsatish
 
Hotel management present
Hotel management presentHotel management present
Hotel management presentArman Ahmed
 
SYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMSYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMNitish Xavier Tirkey
 
Software Requirement Specification Of Hotel Management System
Software Requirement Specification Of Hotel Management SystemSoftware Requirement Specification Of Hotel Management System
Software Requirement Specification Of Hotel Management SystemUttam Singh Chaudhary
 
Oosd shopping (1)
Oosd shopping (1)Oosd shopping (1)
Oosd shopping (1)shaj13
 
web based speed age courier
web based speed age courierweb based speed age courier
web based speed age courierFAKHRUN NISHA
 
Bank management system
Bank management systemBank management system
Bank management systemsumanadas37
 
Hotel managementsystemcorrectfinalsrs
Hotel managementsystemcorrectfinalsrsHotel managementsystemcorrectfinalsrs
Hotel managementsystemcorrectfinalsrsvidya_shankar
 
Web based Peripheral trouble shooting management system
Web based Peripheral trouble shooting management systemWeb based Peripheral trouble shooting management system
Web based Peripheral trouble shooting management systemFAKHRUN NISHA
 
Software Requirements Specification for restaurant management system
Software Requirements Specification for restaurant management systemSoftware Requirements Specification for restaurant management system
Software Requirements Specification for restaurant management systemSM. Aurnob
 
Software Requirement Specification - Interest Rate Management
Software Requirement Specification - Interest Rate ManagementSoftware Requirement Specification - Interest Rate Management
Software Requirement Specification - Interest Rate ManagementSharad Srivastava
 
Medical Store Management System Software Engineering Project
Medical Store Management System Software Engineering ProjectMedical Store Management System Software Engineering Project
Medical Store Management System Software Engineering Projecthani2253
 

What's hot (19)

web based Internet cafe system abstract
web based Internet cafe system abstractweb based Internet cafe system abstract
web based Internet cafe system abstract
 
Event Management System Document
Event Management System Document Event Management System Document
Event Management System Document
 
Banking java project
Banking java projectBanking java project
Banking java project
 
Full accesspolicyconsolidation for event processing systems
Full accesspolicyconsolidation for event processing systemsFull accesspolicyconsolidation for event processing systems
Full accesspolicyconsolidation for event processing systems
 
Job portal
Job portalJob portal
Job portal
 
Hotel management present
Hotel management presentHotel management present
Hotel management present
 
SYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEMSYNOPSIS ON BANK MANAGEMENT SYSTEM
SYNOPSIS ON BANK MANAGEMENT SYSTEM
 
Srs present
Srs presentSrs present
Srs present
 
Software Requirement Specification Of Hotel Management System
Software Requirement Specification Of Hotel Management SystemSoftware Requirement Specification Of Hotel Management System
Software Requirement Specification Of Hotel Management System
 
Bug Tracking Java Project
Bug Tracking Java ProjectBug Tracking Java Project
Bug Tracking Java Project
 
Oosd shopping (1)
Oosd shopping (1)Oosd shopping (1)
Oosd shopping (1)
 
web based speed age courier
web based speed age courierweb based speed age courier
web based speed age courier
 
Bank management system
Bank management systemBank management system
Bank management system
 
Hotel managementsystemcorrectfinalsrs
Hotel managementsystemcorrectfinalsrsHotel managementsystemcorrectfinalsrs
Hotel managementsystemcorrectfinalsrs
 
Web based Peripheral trouble shooting management system
Web based Peripheral trouble shooting management systemWeb based Peripheral trouble shooting management system
Web based Peripheral trouble shooting management system
 
Software Requirements Specification for restaurant management system
Software Requirements Specification for restaurant management systemSoftware Requirements Specification for restaurant management system
Software Requirements Specification for restaurant management system
 
Software Requirement Specification - Interest Rate Management
Software Requirement Specification - Interest Rate ManagementSoftware Requirement Specification - Interest Rate Management
Software Requirement Specification - Interest Rate Management
 
Medical Store Management System Software Engineering Project
Medical Store Management System Software Engineering ProjectMedical Store Management System Software Engineering Project
Medical Store Management System Software Engineering Project
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 

Similar to Documentation

java Project report online banking system
java Project report online banking systemjava Project report online banking system
java Project report online banking systemVishNu KuNtal
 
Medical Store Management System Software Engineering 1
Medical Store Management System Software Engineering 1Medical Store Management System Software Engineering 1
Medical Store Management System Software Engineering 1hani2253
 
ProjectReport.docx project report pdf file
ProjectReport.docx project report pdf fileProjectReport.docx project report pdf file
ProjectReport.docx project report pdf filekomkar98230
 
ProjectReport.docx project documentation
ProjectReport.docx project documentationProjectReport.docx project documentation
ProjectReport.docx project documentationkomkar98230
 
Banking Management System SDS
Banking Management System SDSBanking Management System SDS
Banking Management System SDSMr. Moms
 
14.project online eamination system
14.project online eamination system14.project online eamination system
14.project online eamination systemVivek Mehta
 
A Review Of Computerized Payroll System
A Review Of Computerized Payroll SystemA Review Of Computerized Payroll System
A Review Of Computerized Payroll SystemApril Knyff
 
IRJET- E-Gatepass System
IRJET- E-Gatepass SystemIRJET- E-Gatepass System
IRJET- E-Gatepass SystemIRJET Journal
 
mnvRTBS-PPT-int4p9[1].pptx this report is good
mnvRTBS-PPT-int4p9[1].pptx this report is goodmnvRTBS-PPT-int4p9[1].pptx this report is good
mnvRTBS-PPT-int4p9[1].pptx this report is goodmrmanavpachurkar
 
Online birth certificate system and management
Online birth certificate system and managementOnline birth certificate system and management
Online birth certificate system and managementKARUPPUSAMYSAIPRASAT
 
Issue tracking system
Issue tracking systemIssue tracking system
Issue tracking systemAkshay Surve
 
22598435 project-on-banking-system-in-mis-pdf
22598435 project-on-banking-system-in-mis-pdf22598435 project-on-banking-system-in-mis-pdf
22598435 project-on-banking-system-in-mis-pdfDeepak Malusare
 
22598435 project-on-banking-system-in-mis-pdf(1)
22598435 project-on-banking-system-in-mis-pdf(1)22598435 project-on-banking-system-in-mis-pdf(1)
22598435 project-on-banking-system-in-mis-pdf(1)Sruthi S
 
54024405 project-report-banking-management-system
54024405 project-report-banking-management-system54024405 project-report-banking-management-system
54024405 project-report-banking-management-systemnancs
 

Similar to Documentation (20)

ASSIGNMENT
ASSIGNMENT ASSIGNMENT
ASSIGNMENT
 
Net banking
Net banking Net banking
Net banking
 
java Project report online banking system
java Project report online banking systemjava Project report online banking system
java Project report online banking system
 
ProjectReport_Subhayu
ProjectReport_SubhayuProjectReport_Subhayu
ProjectReport_Subhayu
 
Medical Store Management System Software Engineering 1
Medical Store Management System Software Engineering 1Medical Store Management System Software Engineering 1
Medical Store Management System Software Engineering 1
 
PPT.pptx
PPT.pptxPPT.pptx
PPT.pptx
 
ProjectReport.docx project report pdf file
ProjectReport.docx project report pdf fileProjectReport.docx project report pdf file
ProjectReport.docx project report pdf file
 
ProjectReport.docx project documentation
ProjectReport.docx project documentationProjectReport.docx project documentation
ProjectReport.docx project documentation
 
Banking Management System SDS
Banking Management System SDSBanking Management System SDS
Banking Management System SDS
 
14.project online eamination system
14.project online eamination system14.project online eamination system
14.project online eamination system
 
A Review Of Computerized Payroll System
A Review Of Computerized Payroll SystemA Review Of Computerized Payroll System
A Review Of Computerized Payroll System
 
IRJET- E-Gatepass System
IRJET- E-Gatepass SystemIRJET- E-Gatepass System
IRJET- E-Gatepass System
 
mnvRTBS-PPT-int4p9[1].pptx this report is good
mnvRTBS-PPT-int4p9[1].pptx this report is goodmnvRTBS-PPT-int4p9[1].pptx this report is good
mnvRTBS-PPT-int4p9[1].pptx this report is good
 
Online birth certificate system and management
Online birth certificate system and managementOnline birth certificate system and management
Online birth certificate system and management
 
Online banking
Online bankingOnline banking
Online banking
 
OBCS-PPT-sehhia (1).pptx
OBCS-PPT-sehhia (1).pptxOBCS-PPT-sehhia (1).pptx
OBCS-PPT-sehhia (1).pptx
 
Issue tracking system
Issue tracking systemIssue tracking system
Issue tracking system
 
22598435 project-on-banking-system-in-mis-pdf
22598435 project-on-banking-system-in-mis-pdf22598435 project-on-banking-system-in-mis-pdf
22598435 project-on-banking-system-in-mis-pdf
 
22598435 project-on-banking-system-in-mis-pdf(1)
22598435 project-on-banking-system-in-mis-pdf(1)22598435 project-on-banking-system-in-mis-pdf(1)
22598435 project-on-banking-system-in-mis-pdf(1)
 
54024405 project-report-banking-management-system
54024405 project-report-banking-management-system54024405 project-report-banking-management-system
54024405 project-report-banking-management-system
 

Documentation

  • 1. A Mini Project On COMPUTERIZED BILLING SYSTEM FOR WATER PLANT Master of Computer Applications (MCA) Submitted By ADDURI KALYAN (Reg No: 1223715102) Under the guidance of Smt. Dr. K.VEDAVATHI Professor Department of Computer Science GITAM Institute of Science GITAM University Visakhapatnam-530 045, A.P. (2016 – 2017)
  • 2. CERTIFICATE This is to certify that the Mini Project entitled COMPUTERIZED BILLING SYSTEM FOR WATER PLANT is the bonafied work done by Adduri.Kalyan, Reg No. 1223715102 during 2016-2017 in partial fulfillment of the requirement of the 3rd Semester Mini Project of Master of Computer Applications, in GitamUniversity, Visakhapatnam, under my supervision and guidance. Signature Signature (Internal Guide) (HOD)
  • 3. 1. Introduction 1.1 Introduction to project: The project titled “A Computerized Billing System for Water Plant” presents an easy way to maintain customer data and generate bill to the customer. In the existing system the delivery of water can takes place by personally going to the water plant or the can may be delivered at the door steps of the customer. This transaction deals with paying money to the authorized person of the plant. The customer can also avail the card facility, where the company issues a monthly card for the amount paid by the customer in advance. Maintaining this information is a tedious task. The loss of information with the office of the plant or loss of card by the customer will create inconvenience to the authority. This inconvenience may be overcome by maintaining customer data in electronic form. With this proposed system the company will overcome against loss of customer data and also speedup the bill generation task. 1.2 Purpose of the System: The purpose of the system is to create the new customer by admin and a unique ID is generated for every customer. The water bottles purchased by customer are stored in the system and the bill is generated for every customer without any paper work. The administrator can search and generate a report on every customer. Our proposed system has the following advantages.  User Friendly Interface  Fast Access To Database  Less Error  More Storage Capacity  Search Facility  Look And Feel Environment  Quick Transaction 1.3 Existing System: If you want to take a water bottle in a plant we have to go to water bottle plant and we have to get the bottle manually by giving money every time. Sometimes this is a time consuming process when there are lot of customers. There is no guarantee for security if the card given by the owner of the plant is lost. And another problem is exact money change where we have to wait for a lot of time when there are number of customers.
  • 4. 1.4 ProposedSystem: Proposed system is a ‘Computerized Billing System’. Through our software, administrator can create the new customer and a unique ID is generated for every customer. The water bottles purchased by customer are stored in the system and the bill is generated for every customer without any paper work. The administrator can search and generate a report to every customer. 2. SYSTEM ANALYSES 2.1 Study of the System: 2.2 Modules of the System: The proposed system consists of six modules: 1. Administrator Login module 2. Customer Information Entry module 3. Customer Search module 4. Customer Update module 5. Admin Update module 6. Billing System module 3. REQUIREMENT ANALYSIS 3.1 SYSTEM REQUIREMENT Requirements Analysis is the process of studying and analyzing the problem present in the System. In requirement gathering and analysis, the goal of requirement analysis and gathering is to collect the information from the administrator regarding the work he wants to get from the system. This phased leads to in completeness of the project.
  • 5. Functional Requirements: Functional requirements define the fundamental actions that must take place in the software in accepting and processing the inputs and in processing and generating the outputs. REQ-1: The administrator must have a valid login to access the system. A failed login will alert the administrator with an error message. REQ-2: The administrator will create the new customer in the system. REQ-3: The administrator can generate bill to the customer. REQ-4: The administrator can search and generate a report on every customer. REQ-5: The administrator can update the customer information. Non Functional Requirements: The following have been identified as the key non-functional requirements that are necessary to ensure that the application is both technically and fundamentally sound. 3.1 SYSTEM SPECIFICATIONS: Hardware specifications: Processor : Intel p4 RAM : 512MB RAM Hard disk : 20GB or more Software specifications: Operating system : Windows, Vista Programming Language : Asp.net C# Database : SQL SERVER 3.2 OVERVIEW OF FRONT END: ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required to build up robust web applications for PC, as well as mobile devices.
  • 6. ASP.NET works on top of the HTTP protocol, and uses the HTTP commands and policies to set a browser-to-server bilateral communication and cooperation.ASP.NET is a part of Microsoft .Net platform. ASP.NET applications are compiled codes. Extensible and reusable components or objects present in .Net framework. These codes can use the entire hierarchy of classes in .Net framework. The ASP.NET application codes can be written in any of the following languages:  C#  Visual Basic.Net  Jscript  J# ASP.NET is used to produce interactive, data-driven web applications over the internet. It consists of a large number of controls such as text boxes, buttons, and labels for assembling, configuring, and manipulating code to create HTML pages. ASP.NET LIFE CYCLE: The ASP.NET life cycle could be divided into two groups:  Application Life Cycle  Page Life Cycle Application Life Cycle: The application life cycle has the following stages: User makes a request for accessing application resource, a page. Browser sends this request to the web server. A unified pipeline receives the first request and the following events take place:  An object of the class Application Manager is created.  An object of the class Hosting Environment is created to provide information regarding the resources.  Top level items in the application are compiled. Response objects are created. The application objects such as HttpContext, HttpRequest and HttpResponse are created and initialized.
  • 7. Page Life Cycle: When a page is requested, it is loaded into the server memory, processed, and sent to the browser. Then it is unloaded from the memory. At each of these steps, methods and events are available, which could be overridden according to the need of the application. In other words, you can write your own code to override the default code. The Page class creates a hierarchical tree of all the controls on the page. All the components on the page, except the directives, are part of this control tree. You can see the control tree by adding trace= "true" to the page directive. We will cover page directives and tracing under 'directives' and 'event handling'. The page life cycle phases are:  Initialization  Instantiation of the controls on the page  Restoration and maintenance of the state  Execution of the event handler codes  Page rendering Understanding the page cycle helps in writing codes for making some specific thing happen at any stage of the page life cycle. It also helps in writing custom controls and initializing them at right time, populate their properties with view-state data and run control behavior code. Asp.net web controls: The Web controls reside in the System.Web.UI.WebControls namespace, which is available to all Web Forms pages automatically. They provide a range of functionality, from simple data entry to complex data validation. Two classesare consideredtobe base classesof ASP.NETservercontrols: System.Web.UI.Control andSystem.Web.UI.WebControls.WebControl.Webcontrolsfallintoeight categories:input,display,action,selection,databound,rich,validation,theyhave properties, methods,andeventsthatcan be accessedat run time fromcode runningonthe server. The following are the web controls of Asp.net:  Label  Button  Text Box
  • 8.  Dropdown list  List Box  Check box  Radio Button  Image Button  Tree View  Calendar ERROR HANDLING TECHNIQUES: Error handling in ASP.NET has three aspects:  Tracing - tracing the program execution at page level or application level.  Error handling - handling standard errors or custom errors at page level or application level.  Debugging - stepping through the program, setting break points to analyze the code. SECURITY: Implementing security in a site has the following aspects:  Authentication: It is the process of ensuring the user's identity and authenticity. ASP.NET allows four types of authentications: o Windows Authentication o Forms Authentication o Passport Authentication o Custom Authentication  Authorization: It is the process of defining and allotting specific roles to specific users.  Confidentiality: It involves encrypting the channel between the client browser and the web server.  Integrity: It involves maintaining the integrity of data. For example, implementing digital signature.
  • 9. CONFIGURATION: The behavior of an ASP.NET application is affected by different settings in the configuration files:  machine.Config  web.config The machine.config file contains default and the machine-specific value for all supported settings. The machine settings are controlled by the system administrator and applications are generally not given access to this file. An application however, can override the default values by creating web.config files in its roots folder. The web.config file is a subset of the machine.config file. If the application contains child directories, it can define a web.config file for each folder. Scope of each configuration file is determined in a hierarchical top-down manner. Any web.config file can locally extend, restrict, or override any settings defined on the upper level. Visual Studio generates a default web.config file for each project. An application can execute without a web.config file, however, you cannot debug an application without a web.config file. ARCHITECTURE AND DESIGN PROCESS: The following aspects when you review the architecture and design of your application:  Deployment and infrastructure: You review the design of your application in relation to the target deployment environment and any associated restrictions that might be imposed by company or institutional policies.  Performance and scalability frame: Pay particular attention to the design approaches you have adopted for those areas that most commonly exhibit performance bottlenecks. This guide refers to these collectively as the performance and scalability frame.  Layer by layer analysis: You walk through the logical layers of your application and examine the performance characteristics of the various technologies that you have used within each layer. For example, ASP.NET in the presentation layer; Web services, Enterprise Services, and Microsoft®.NET remoting within the business layer; and Microsoft SQL Server™ within the data access layer.
  • 10. COMPILATION OF CODE: In order for application code to service requests by users, ASP.NET must first compile the code into one or more assemblies. Assemblies are files that have the file name extension .dll. You can write ASP.NET code in many different languages, such as Visual Basic, C#, J#, and others. When the code is compiled, it is translated into a language-independent and CPU-independent representation called Microsoft Intermediate Language (MSIL). At run time, MSIL runs in the context of the .NET Framework, which translates MSIL into CPU-specific instructions for the processor on the computer running the application. There are many benefits to compiling application code including: Performance Compiled code is much faster than scripting languages such as ECMA Script or VBScript because it is a closer representation to machine code and does not require additional parsing. Security Compiled code is more difficult to reverse engineer than non-compiled source code because it lacks the readability and abstraction of a high-level language. Additionally,
  • 11. there are obfuscation tools that make compiled code even more resistant to reverse engineering. Stability Code is checked at compile time for syntax errors, type safety, and other problems. By catching these errors at build-time you can eliminate many errors in your code. Interoperability Because MSIL code supports any .NET language, you can use assemblies that were originally written in other languages in your code. For example, if you are writing an ASP.NET Web page in C#, you can add a reference to a .dll file was that written in Visual Basic. 3.3 Overview of the Back End: A database in SQL Server is made up of a collection of tables that stores a specific set of structured data. A table contains a collection of rows, also referred to as records or tuples, and columns, also referred to as attributes. Each column in the table is designed to store a certain type of information, for example, dates, names, dollar amounts, and numbers. A computer can have one or more than one instance of SQL Server installed. Each instance of SQL Server can contain one or many databases. Within a database, there are one or many
  • 12. object ownership groups called schemas. Within each schema there are database objects such as tables, views, and stored procedures. Some objects such as certificates and asymmetric keys are contained within the database, but are not contained within a schema. SQL Server databases are stored in the file system in files. Files can be grouped into file Groups. When people gain access to an instance of SQL Server they are identified as a login. When people gain access to a database they are identified as a database user. A database user can be based on a login. If contained databases are enabled, a database user can be created that is not based on a login. ASP.NET provides many options for storing, retrieving, and displaying data. There are several SQL Server editions to choose from:  SQL Server Express. The entry-level, free edition of SQL Server.  SQL Server Express Local DB. A special execution mode of SQL Server Express that enables you to work with databases as .mdf files. Typically, Local DB database files are kept in the App_Data folder of a web project. (The user instance feature in SQL Server Express also enables you to work with .mdf files, but the user instance feature is deprecated; therefore, Local DB is recommended for working with .mdf files.) In Visual Studio 2010 and earlier versions, SQL Server Express is installed by default with Visual Studio; in Visual Studio 2012 Local DB is installed by default with Visual Studio. Local DB is recommended for web development but not for production web applications because it is not designed to work with IIS.  SQL Server Developer Edition. Has all the features of Enterprise edition but is licensed only for development and testing, not for production.  SQL Server (full editions) Several full editions are available: Enterprise, Business Intelligence, Standard, and Web.  Windows Azure SQL Database. The cloud edition of SQL Server, formerly known as SQL Azure.  SQL Server Compact 4.0. A free, lightweight database engine that you can use in ASP.NET web applications for both development and production. SQL Server Compact uses a different database engine and .NET data provider than the other editions. SQL Server Management Studio (SSMS) and SQL Server Data Tools (SSDT) don’t work with SQL Server Compact 4.0. You don't have to use the same edition of SQL Server in development that you use in production. The choice of SQL Server edition for development depends on your development environment and the edition you choose for your production database:  If you're using Visual Studio 2012, and your production database is SQL Database or a full edition of SQL Server, the default choice for development is LocalDB. This is the default choice because LocalDB is installed with Visual Studio 2012 by default.  If you're using Visual Studio 2010 or WebMatrix, and your production database is SQL Database or a full edition of SQL Server, the default choice for development is SQL Server Express. This is the default choice because SQL Server Express 2008 is
  • 13. installed with Visual Studio 2010 by default, and LocalDB doesn't work with WebMatrix.  If your production database is SQL Server Compact, use SQL Server Compact for development. Exceptions that might dictate a different choice for development include the following:  If you want to use IIS as your development web server in Visual Studio 2012, use SQL Server Express instead of LocalDB. You will have to install SQL Server Express, because it is not installed with Visual Studio 2012 by default.  If there are features of the edition you use in production that aren't available in LocalDB or SQL Server Express, use Developer Edition or the same edition that you use in production.  If you want to enable multiple developers to work on the same Visual Studio web project, with some of them using Visual Studio 2010 and some of them using Visual Studio 2012 Creating a LocalData Base File:  Open Solution Explorer and right click on your project  Now Click on Add select New Item Sql Server Data Base.  Now Data Source wizard will open. Configure data source and click on finish  Now local data base will create under App_Data folder of your project.  The local data base file has the extension of .mdf i.e. local database 4. FEASIBILITY REPORT 4.1 Technical Feasibility 4.2 Economical Feasibility 4.3 Operational Feasibility 5. DATA FLOW DIAGRAM 5.1 Introduction: Data Flow Diagram (DFD) provides a visual representation of the flow of information (i.e. data) within a system. By drawing a Data Flow Diagram, we can tell the information provided by and
  • 14. delivered to someone who takes part in system processes, the information needed in order to complete the processes and the information needed to be stored and accessed. Context DFD A context diagram is a data flow diagram that only shows the top level, otherwise known as Level 0. At this level, there is only one visible process node that represents the functions of a complete system in regards to how it interacts with external entities. Some of the benefits of a Context Diagram are:  Shows the overview of the boundaries of a system  No technical knowledge is required to understand with the simple notation  Simple to draw, amend and elaborate as its limited notation The figure below shows a context Data Flow Diagram that is drawn for a COMPUTERIZED BILLING SYSTEM FOR WATER BOTTLE PLANT. It contains a process (shape) that represents the system to model, in this case, the "Computerized Billing System". It also shows the participants who will interact with the system, called the external entities. In this example, Admin is the entity who will interact with the system. In between the process and the external entities, there are data flow (connectors) that indicate the existence of information exchange between the entities and the system. 5.2 Level 0 DFD (Context level DFD) 5.3 Level-1 DFD -Administrator 5.4 Level-1 DFD –User 6. ENTITYRELATIONSHIP DIAGRAMS (ER) 7. DATABASE DESIGNS 7.1 Introduction 7.2 Normalized Database Tables 8. SAMPLE SCREEN SHOTS
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. 9. CODING //LOGINPAGE ASPX <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="loginpage.aspx.cs" Inherits="ComputerizedBillingSystem.loginpage" %> <!DOCTYPE html>
  • 27. <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .auto-style1 { width: 100%; height: 255px; } .auto-style2 { width: 246px; } .auto-style3 { width: 246px; height: 24px; } .auto-style4 { height: 24px; } </style> </head> <body> <form id="form1" runat="server"> <table class="auto-style1"> <tr> <td class="auto- style2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
  • 28. nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; USERNAME</td> <td> <asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox> &nbsp;&nbsp;&nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="*UserName is required" ForeColor="Red"></asp:RequiredFieldValidator> &nbsp;&nbsp;&nbsp; </td> </tr> <tr> <td class="auto- style2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PASSWORD</td> <td> <asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox> &nbsp;&nbsp;&nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" ErrorMessage="*Password is required" ForeColor="Red"></asp:RequiredFieldValidator> </td> </tr> <tr> <td class="auto- style3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  • 29. <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="LOGIN" /> </td> <td class="auto-style4"> <input id="Reset1" type="reset" value="RESET" /></td> </tr> <tr> <td class="auto-style3"> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:adminconn %>" SelectCommand="SELECT * FROM admin;"></asp:SqlDataSource> </td> <td class="auto-style4"> <asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td> </tr> </table> <div> </div> </form> </body> </html>
  • 30. // LOGINPAGE C# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Configuration; using System.Data; namespace ComputerizedBillingSystem { public partial class loginpage : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { try { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con.Open(); SqlCommand cmd = new SqlCommand("Select * from admin where username='"+TextBox1.Text+"'and password='"+TextBox2.Text+"'",con); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); if(dt.Rows.Count>0) { Response.Redirect("Home.aspx"); } else { Label1.Visible = true; Label1.Text = "UserName/Password is wrong"; } } catch(Exception ee) { Response.Write(ee.Message);
  • 31. } } } } //HOMEPAGE.ASPX <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="ComputerizedBillingSystem.Home" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .auto-style1 { width: 100%; height: 252px; } .auto-style2 { text-align: center; } .auto-style3 { text-align: left; } </style> </head> <body> <form id="form1" runat="server">
  • 32. <div> <div class="auto-style3"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp; &nbsp; WELCOME TO HOMEPAGE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:HyperLink ID="HyperLink6" runat="server" ForeColor="Blue" NavigateUrl="~/loginpage.aspx">LOGOUT</asp:HyperLink> </div> <table class="auto-style1"> <tr> <td class="auto-style2"> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/registeruser.aspx">CUSTOMER INFORMATION ENTRY</asp:HyperLink> </td> </tr> <tr> <td class="auto-style2">
  • 33. <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/search.aspx">CUSTOMER SEARCH</asp:HyperLink> </td> </tr> <tr> <td class="auto-style2"> <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="~/BillPage.aspx">BILL TO CUSTOMER</asp:HyperLink> </td> </tr> <tr> <td class="auto-style2"> <asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/UpdateCustomer.aspx">UPDATE CUSTOMER DETAILS</asp:HyperLink> </td> </tr> <tr> <td class="auto-style2"> <asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl="~/UpdateAdminLoginRecheck.aspx">UPDATE ADMIN CREDENTIALS</asp:HyperLink> </td> </tr> </table> </div> </form> </body> </html>
  • 34. // HOMEPAGE C# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace ComputerizedBillingSystem { public partial class Home : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } } //CUSTOMER INFORMATION ENTRY ASPX <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="registeruser.aspx.cs" Inherits="ComputerizedBillingSystem.registeruser" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">
  • 35. <title></title> <style type="text/css"> .auto-style1 { width: 100%; } .auto-style2 { width: 246px; text-align: right; } </style> </head> <body> <form id="form1" runat="server"> <table class="auto-style1"> <tr> <td class="auto-style2">Customer Id</td> <td> <asp:TextBox ID="TextBox1" runat="server" Enabled="False" ReadOnly="True"></asp:TextBox> </td> </tr> <tr> <td class="auto-style2">Customer Name</td> <td> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> &nbsp;&nbsp;&nbsp;&nbsp;
  • 36. <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="TextBox2" ForeColor="Red"></asp:RequiredFieldValidator> </td> </tr> <tr> <td class="auto-style2">Door No</td> <td> <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox> &nbsp;&nbsp;&nbsp;&nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="TextBox3" ForeColor="Red"></asp:RequiredFieldValidator> </td> </tr> <tr> <td class="auto-style2">Streer Name</td> <td> <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox> &nbsp;&nbsp;&nbsp;&nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*" ControlToValidate="TextBox4" ForeColor="Red"></asp:RequiredFieldValidator> </td> </tr> <tr> <td class="auto-style2">Mobile Number</td> <td> <asp:TextBox ID="TextBox5" runat="server" TextMode="Number"></asp:TextBox>
  • 37. &nbsp;&nbsp;&nbsp;&nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*" ControlToValidate="TextBox5" ForeColor="Red"></asp:RequiredFieldValidator> </td> </tr> </table> <div> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="STORE" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp; <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="CANCEL" CausesValidation="False" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label> &nbsp; <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:adminconn %>" SelectCommand="SELECT * FROM [register]"></asp:SqlDataSource> </div> </form> </body> </html>
  • 38. //CUSTOMER INFORMATION ENTRY C# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; namespace ComputerizedBillingSystem { public partial class registeruser : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); string custid= "122"; protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { GenerateAutoId(); } } private void GenerateAutoId()
  • 39. { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con.Open(); SqlCommand cmd = new SqlCommand("select count(custid) from register", con); int i = Convert.ToInt32(cmd.ExecuteScalar()); con.Close(); i++; TextBox1.Text = custid+i.ToString(); } private void clearfields() { TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; } protected void Button1_Click(object sender, EventArgs e) { try { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con.Open();
  • 40. SqlCommand com = new SqlCommand("insert into register(custid,custname,DoorNo,StreetName,mobile)values('"+TextBox1.Text+"','"+TextBo x2.Text+"','"+TextBox3.Text+"','"+TextBox4.Text+"','"+TextBox5.Text+"')", con); com.ExecuteNonQuery(); Label1.Visible = true; Label1.Text = "Customer Data Inserted Successfully"; int val= 0; SqlCommand com1 = new SqlCommand("insert into Billdetails(Cid,Qty,Total)values("+TextBox1.Text+","+val+" ,"+val+")", con); com1.ExecuteNonQuery(); con.Close(); GenerateAutoId(); clearfields(); } catch (Exception ee) { Response.Write(ee.Message); } } protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("Home.aspx"); } } }
  • 41. //Customer Search aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="search.aspx.cs" Inherits="ComputerizedBillingSystem.search" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .auto-style1 { width: 100%; height: 58px; margin-bottom: 0px; } .auto-style2 { text-align: center; height: 58px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: x-large; color: #0000FF; } .auto-style3 { width: 586px; text-align: right;
  • 42. height: 32px; } .auto-style4 { width: 586px; text-align: right; height: 41px; } .auto-style5 { height: 41px; } .auto-style8 { height: 44px; text-align: left; } .auto-style10 { height: 32px; } .auto-style11 { text-align: center; } .auto-style12 { width: 99%; height: 498px; margin-bottom: 0px; } .auto-style14 { height: 44px;
  • 43. text-align: left; width: 586px; } .auto-style15 { width: 586px; text-align: right; height: 22px; } .auto-style16 { height: 22px; } .auto-style17 { width: 586px; text-align: right; height: 20px; } .auto-style18 { height: 20px; } </style> </head> <body> <form id="form1" runat="server" style="background-color: #B2B2B2"> <table class="auto-style1"> <tr> <td class="auto-style2">SEARCH CUSTOMER</td> </tr>
  • 44. </table> <div> <table class="auto-style12"> <tr> <td class="auto-style4"> <asp:DropDownList ID="DropDownList1" runat="server" Height="17px" Width="125px"> <asp:ListItem>SEARCH AS</asp:ListItem> <asp:ListItem>CUSTOMER ID</asp:ListItem> <asp:ListItem>MOBILE NO</asp:ListItem> </asp:DropDownList> </td> <td class="auto-style5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="OK" /> &nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="DropDownList1" ErrorMessage="*Select Type of Search" ForeColor="Red"></asp:RequiredFieldValidator> </td> </tr> <tr> <td class="auto- style3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CUSTOMER ID</td> <td class="auto-style10">
  • 45. &nbsp; <asp:TextBox ID="TextBox1" runat="server" Enabled="False"></asp:TextBox> &nbsp;&nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBox1" ErrorMessage="*" ForeColor="Red" Visible="False"></asp:RequiredFieldValidator> </td> </tr> <tr> <td class="auto- style17">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp; CUSTOMER MOBILE NO</td> <td class="auto-style18"> &nbsp; <asp:TextBox ID="TextBox3" runat="server" Enabled="False"></asp:TextBox> &nbsp;&nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TextBox3" ErrorMessage="*" ForeColor="Red" Visible="False"></asp:RequiredFieldValidator> </td> </tr> <tr> <td class="auto-style15"> <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  • 46. <asp:Button ID="Button1" runat="server" Height="23px" OnClick="Button1_Click" Text="SEARCH" Width="77px" /> </td> <td class="auto-style16"> <br /> &nbsp;&nbsp; <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="CANCEL" Height="23px" Width="78px" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label1" runat="server" Text="Label" Visible="False" ForeColor="Red"></asp:Label> </td> </tr> <tr> <td class="auto-style14"> <div class="auto-style11"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Large" ForeColor="Green" Text="Label" Visible="False"></asp:Label> </div> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td> <td class="auto-style8">
  • 47. <asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" Height="156px" Visible="False" Width="247px"> <FooterStyle BackColor="White" ForeColor="#000066" /> <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /> <RowStyle ForeColor="#000066" /> <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /> <SortedAscendingCellStyle BackColor="#F1F1F1" /> <SortedAscendingHeaderStyle BackColor="#007DBB" /> <SortedDescendingCellStyle BackColor="#CAC9C9" /> <SortedDescendingHeaderStyle BackColor="#00547E" /> </asp:GridView> </td> </tr> </table> </div> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </form> </body> </html>
  • 48. //CUSTOMER SEARCH C# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; namespace ComputerizedBillingSystem { public partial class search : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { try {
  • 49. SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con.Open(); SqlCommand com = new SqlCommand("Select custid,custname,mobile from register where custid='" + TextBox1.Text + "' or mobile='" + TextBox3.Text + "' ", con); SqlDataAdapter da = new SqlDataAdapter(com); DataTable dt = new DataTable(); da.Fill(dt); if (dt.Rows.Count > 0) { GridView1.Visible = true; Label1.Visible = false; Label2.Visible = true; Label2.Text = "SEARCH SUCCESSFUL"; GridView1.DataSource = dt; GridView1.DataBind(); con.Close(); } else { GridView1.Visible = false; Label1.Visible = true; Label2.Visible = false; Label1.Text = "RECORD NOT FOUND"; } }
  • 50. catch (Exception ee) { Response.Write(ee.Message); } } private void clearTextBox() { TextBox1.Text = ""; TextBox3.Text = ""; } protected void Button2_Click(object sender, EventArgs e) { if (DropDownList1.SelectedIndex == 1) { Label1.Visible = false; Label2.Visible = false; clearTextBox(); TextBox1.Enabled = true; TextBox3.Enabled = false; GridView1.Visible = false; } else if (DropDownList1.SelectedIndex == 2) {
  • 51. Label1.Visible = false; Label2.Visible = false; clearTextBox(); TextBox1.Enabled = false; TextBox3.Enabled = true; GridView1.Visible = false; } } protected void Button3_Click(object sender, EventArgs e) { Response.Redirect("Home.aspx"); } } } //BILL TO CUSTOMER ASPX <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillPage.aspx.cs" Inherits="ComputerizedBillingSystem.BillPage" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css">
  • 52. .auto-style1 { width: 100%; height: 351px; } .auto-style2 { text-align: center; } .auto-style3 { text-align: left; height: 16px; } </style> </head> <body> <form id="form1" runat="server"> <table class="auto-style1"> <tr> <td class="auto-style3"> <asp:HyperLink ID="HyperLink3" runat="server" ForeColor="Blue" NavigateUrl="~/Home.aspx">BACK TO HOME</asp:HyperLink> </td> </tr> <tr> <td class="auto-style2"> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/BillPayLater.aspx">PAY LATER</asp:HyperLink> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  • 53. <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/BillPayNow.aspx">PAY NOW</asp:HyperLink> </td> </tr> </table> <div> </div> </form> </body> </html> //BILL PAYLATER ASPX <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillPayLater.aspx.cs" Inherits="ComputerizedBillingSystem.BillPayLater" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .auto-style1 { width: 100%; height: 222px; } .auto-style2 { height: 54px; } .auto-style3 {
  • 54. height: 54px; width: 249px; text-align: right; } .auto-style4 { width: 249px; text-align: right; } .auto-style5 { height: 54px; width: 329px; } .auto-style6 { width: 329px; } .auto-style7 { width: 249px; height: 39px; text-align: right; } .auto-style8 { width: 329px; height: 39px; } .auto-style9 { height: 39px; }
  • 55. .auto-style10 { width: 249px; height: 28px; text-align: right; } .auto-style11 { width: 329px; height: 28px; } .auto-style12 { height: 28px; } .auto-style13 { width: 249px; text-align: right; height: 29px; } .auto-style14 { width: 329px; height: 29px; } .auto-style15 { height: 29px; } .auto-style16 { width: 249px; height: 43px;
  • 56. text-align: right; } .auto-style17 { width: 329px; height: 43px; } .auto-style18 { height: 43px; } </style> </head> <body> <form id="form1" runat="server"> <div> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Home.aspx">BACK TO HOME</asp:HyperLink> </div> <table class="auto-style1"> <tr> <td class="auto-style3">ID NUMBER</td> <td class="auto-style5">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> &nbsp;
  • 57. <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator> &nbsp; <asp:Button ID="Button1" runat="server" Height="27px" OnClick="Button1_Click" Text="GET DETAILS" Width="112px" /> </td> <td class="auto-style2">&nbsp;<asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label> &nbsp;</td> </tr> <tr> <td class="auto-style13"> <asp:Label ID="Label2" runat="server" Text="NAME" Visible="False"></asp:Label> </td> <td class="auto-style14">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox2" runat="server" Visible="False"></asp:TextBox> &nbsp;</td> <td class="auto-style15"></td> </tr> <tr> <td class="auto-style10"> <asp:Label ID="Label3" runat="server" Text="MOBILE" Visible="False"></asp:Label> </td> <td class="auto-style11">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox3" runat="server" Visible="False"></asp:TextBox> &nbsp;</td>
  • 58. <td class="auto-style12"></td> </tr> <tr> <td class="auto-style7"> <asp:Label ID="Label5" runat="server" Text="PRICE" Visible="False"></asp:Label> </td> <td class="auto-style8">&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox5" runat="server" Visible="False"></asp:TextBox> &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox5" ErrorMessage="*Give Pice of Bottle" ForeColor="Red"></asp:RequiredFieldValidator> </td> <td class="auto-style9">&nbsp;</td> </tr> <tr> <td class="auto-style4"> <asp:Label ID="Label4" runat="server" Text="QUANTITY" Visible="False"></asp:Label> </td> <td class="auto-style6">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox4" runat="server" Visible="False"></asp:TextBox> &nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox4" ErrorMessage="*No of Bottles" ForeColor="Red"></asp:RequiredFieldValidator> </td> <td>&nbsp;</td> </tr> <tr>
  • 59. <td class="auto-style13"> <asp:Label ID="Label6" runat="server" Text="TOTAL" Visible="False"></asp:Label> </td> <td class="auto-style14">&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox6" runat="server" Enabled="False" Visible="False"></asp:TextBox> </td> <td class="auto-style15"></td> </tr> <tr> <td class="auto-style16"> <asp:Button ID="Button2" runat="server" Height="20px" OnClick="Button2_Click" Text="CANCEL" Visible="False" Width="79px" CausesValidation="False" /> </td> <td class="auto-style17">&nbsp;&nbsp;&nbsp; <asp:Button ID="Button3" runat="server" Height="22px" Text="ADD INVOICE" Visible="False" Width="100px" OnClick="Button3_Click" /> &nbsp;&nbsp; </td> <td class="auto-style18"></td> </tr> <tr> <td class="auto-style3"> </td> <td class="auto-style5"> <asp:Label ID="Label7" runat="server" Font-Bold="True" Font-Size="Medium" ForeColor="Green" Text="Label" Visible="False"></asp:Label> </td>
  • 60. <td class="auto-style2"></td> </tr> </table> </form> </body> </html> //BILL PAYLATER C# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; namespace ComputerizedBillingSystem { public partial class BillPayLater : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } private void clearfields() {
  • 61. TextBox1.Text = " "; TextBox2.Text = " "; TextBox3.Text = " "; TextBox4.Text = " "; TextBox5.Text = " "; } protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("Home.aspx"); } protected void Button1_Click(object sender, EventArgs e) { RequiredFieldValidator2.Visible = false; RequiredFieldValidator3.Visible = false; bool temp = false; try { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con.Open(); SqlCommand cmd = new SqlCommand("select * from register where custid="+TextBox1.Text.Trim()+"", con); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { TextBox2.Text= dr.GetString(1);
  • 62. TextBox3.Text = dr.GetString(4); temp = true; Label1.Visible = false; Label2.Visible = true; TextBox2.Visible = true; Label3.Visible = true; TextBox3.Visible = true; Label4.Visible = true; TextBox4.Visible = true; Label5.Visible = true; TextBox5.Visible = true; Button2.Visible = true; Button3.Visible = true; Label6.Visible = true; TextBox6.Visible = true; HyperLink1.Visible = false; } if (temp == false) { Label1.Visible = true; Label1.Text = "Record Not Found"; Label2.Visible = false; TextBox2.Visible = false; Label3.Visible = false; TextBox3.Visible = false; Label4.Visible = false; TextBox4.Visible = false;
  • 63. TextBox5.Visible = false; TextBox6.Visible = false; Label5.Visible = false; Label6.Visible = false; Label7.Visible = false; Button2.Visible = false; Button3.Visible = false; } con.Close(); } catch (Exception ee) { Response.Write(ee.Message); } } protected void Button3_Click(object sender, EventArgs e) { int dqty; int cost; int ctot = 0; int dtot, dtot2; int totqty, cqty;
  • 64. try { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con.Open(); SqlCommand cmd1 = new SqlCommand("select Qty,Total from Billdetails where Cid=" + TextBox1.Text + "", con); SqlDataReader dr = cmd1.ExecuteReader(); while (dr.Read()) { cost = Convert.ToInt32(TextBox5.Text); dqty = Convert.ToInt32(dr.GetInt32(0)); cqty = Convert.ToInt32(TextBox4.Text); totqty = dqty + cqty; dtot = Convert.ToInt32(dr.GetInt32(1)); ctot = cqty * cost; dtot2 = dtot + ctot; TextBox6.Text = Convert.ToString(dtot2); dr.Close(); con.Close(); //Updating Data in database with new values. SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con1.Open(); SqlDataAdapter da = new SqlDataAdapter("update Billdetails set Qty=" + totqty + ",Total=" + dtot2 + " where Cid=" + TextBox1.Text + "", con);
  • 65. DataSet ds = new DataSet(); da.Fill(ds); Label7.Visible = true; Label7.Text = "Update Successful.Balance Due is: " + dtot2 + ""; clearfields(); con1.Close(); } } catch (Exception ee) { Response.Write(ee.Message); } } } } //BILL PAYNOW ASPX <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillPayNow.aspx.cs" Inherits="ComputerizedBillingSystem.BillPayNow" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .auto-style1 { width: 119%;
  • 66. height: 591px; } .auto-style2 { height: 54px; } .auto-style3 { height: 54px; text-align: right; } .auto-style10 { width: 590px; height: 28px; text-align: right; } .auto-style11 { width: 544px; height: 28px; } .auto-style12 { height: 28px; } .auto-style16 { width: 590px; height: 44px; text-align: right; } .auto-style17 {
  • 67. width: 544px; height: 44px; } .auto-style18 { height: 44px; } .auto-style22 { width: 590px; text-align: right; height: 30px; } .auto-style23 { width: 544px; height: 30px; } .auto-style24 { height: 30px; } .auto-style31 { width: 590px; height: 35px; text-align: right; } .auto-style32 { width: 544px; height: 35px; }
  • 68. .auto-style33 { height: 35px; } .auto-style37 { width: 590px; height: 33px; text-align: right; } .auto-style38 { width: 544px; height: 33px; } .auto-style39 { height: 33px; } .auto-style40 { width: 590px; height: 37px; text-align: right; } .auto-style41 { width: 544px; height: 37px; } .auto-style42 { height: 37px; }
  • 69. .auto-style43 { text-align: center; margin-left: 4px; } .auto-style45 { text-align: center; } .auto-style46 { text-align: left; } .auto-style47 { text-decoration: underline; } </style> </head> <body> <form id="form1" runat="server" style="background-color: #B2B2B2"> <div> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Home.aspx">BACK TO HOME</asp:HyperLink> </div> <table class="auto-style1"> <tr> <td class="auto-style16">ID NUMBER</td>
  • 70. <td class="auto-style17">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> &nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator> &nbsp; <asp:Button ID="Button1" runat="server" Height="24px" OnClick="Button1_Click" Text="GET BILL" Width="96px" /> &nbsp;&nbsp; <asp:Label ID="Label1" runat="server" Text="Label" Visible="False" ForeColor="Red"></asp:Label> </td> <td class="auto-style18">&nbsp;&nbsp;</td> </tr> <tr> <td class="auto-style22"> <asp:Label ID="Label2" runat="server" Text="NAME" Visible="False"></asp:Label> </td> <td class="auto-style23">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox2" runat="server" Visible="False"></asp:TextBox> &nbsp;</td> <td class="auto-style24"></td> </tr> <tr> <td class="auto-style10"> <asp:Label ID="Label3" runat="server" Text="MOBILE" Visible="False"></asp:Label> </td>
  • 71. <td class="auto-style11">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox3" runat="server" Visible="False"></asp:TextBox> &nbsp;</td> <td class="auto-style12"></td> </tr> <tr> <td class="auto-style31"> <asp:Label ID="Label5" runat="server" Text="PRICE" Visible="False"></asp:Label> </td> <td class="auto-style32">&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox5" runat="server" Visible="False"></asp:TextBox> &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox5" ErrorMessage="*Give Pice of Bottle" ForeColor="Red" ValidationGroup="tot"></asp:RequiredFieldValidator> </td> <td class="auto-style33"></td> </tr> <tr> <td class="auto-style31"> <asp:Label ID="Label4" runat="server" Text="QUANTITY" Visible="False"></asp:Label> </td> <td class="auto-style32">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox4" runat="server" Visible="False"></asp:TextBox> &nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox4" ErrorMessage="*No of Bottles" ForeColor="Red" ValidationGroup="tot"></asp:RequiredFieldValidator> </td>
  • 72. <td class="auto-style33"></td> </tr> <tr> <td class="auto-style40"> <asp:Label ID="Label6" runat="server" Text="TOTAL" Visible="False"></asp:Label> </td> <td class="auto-style41">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox6" runat="server" Visible="False" Enabled="False"></asp:TextBox> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" Visible="False" ValidationGroup="tot">GET TOTAL</asp:LinkButton> </td> <td class="auto-style42"></td> </tr> <tr> <td class="auto-style37"> <asp:Label ID="Label7" runat="server" Text="PAID AMOUNT" Visible="False"></asp:Label> </td> <td class="auto-style38">&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="TextBox7" runat="server" Visible="False"></asp:TextBox> &nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBox7" ErrorMessage="* " ForeColor="Red" Visible="False"></asp:RequiredFieldValidator> </td> <td class="auto-style39"></td> </tr>
  • 73. <tr> <td class="auto-style16"> <asp:Button ID="Button2" runat="server" Height="22px" OnClick="Button2_Click" Text="CANCEL" Visible="False" Width="87px" CausesValidation="False" /> </td> <td class="auto-style17">&nbsp;&nbsp;&nbsp; <asp:Button ID="Button3" runat="server" Height="23px" Text="GENERATE BILL" Visible="False" Width="118px" OnClick="Button3_Click" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label11" runat="server" ForeColor="Red" Text="Label" Visible="False"></asp:Label> </td> <td class="auto-style18"></td> </tr> <tr> <td class="auto-style3" colspan="2"> <div class="auto-style46"> <asp:Panel ID="Panel1" runat="server" Height="138px" Visible="False" Width="1110px" Font-Bold="True" Font-Size="Large" ForeColor="Black" CssClass="auto- style43"> <div class="auto-style46"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp; DATE:&nbsp; <asp:Label ID="Label12" runat="server" Text="Label" Visible="False"></asp:Label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
  • 74. p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TIME: <asp:Label ID="Label15" runat="server" Text="Label" Visible="False"></asp:Label> <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<span class="auto-style47"><br /> </span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span class="auto- style47">ID NUMBER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p; Total&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Amount Paid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Due Amount</span><br class="auto-style47" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br class="auto-style47" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label14" runat="server" Text="Label" Visible="False"></asp:Label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;
  • 75. <asp:Label ID="Label13" runat="server" Text="Label" Visible="False"></asp:Label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp; <asp:Label ID="Label8" runat="server" ForeColor="Black" Text="Label" Visible="False"></asp:Label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <asp:Label ID="Label10" runat="server" ForeColor="Black" Text="Label" Visible="False"></asp:Label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label9" runat="server" ForeColor="Black" Text="Label" Visible="False"></asp:Label> </div> </asp:Panel> </div> <div class="auto-style45"> &nbsp;&nbsp;&nbsp; <asp:Button ID="Button4" runat="server" CausesValidation="False" OnClick="Button4_Click" Text="PRINT" Visible="False" /> </div> </td> <td class="auto-style2"></td> </tr> <tr> <td class="auto-style3" colspan="2"> &nbsp;</td> <td class="auto-style2">&nbsp;</td>
  • 76. </tr> </table> </form> </body> </html> //BILL PAYNOW C# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Configuration; using System.Data; namespace ComputerizedBillingSystem { public partial class BillPayNow : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { }
  • 77. private void clearfields() { TextBox1.Text = " "; TextBox2.Text = " "; TextBox3.Text = " "; TextBox4.Text = " "; TextBox5.Text = " "; TextBox6.Text = " "; TextBox7.Text = " "; } protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("Home.aspx"); } protected void Button1_Click(object sender, EventArgs e) { RequiredFieldValidator2.Visible = false; RequiredFieldValidator3.Visible = false; booltemp = false; try
  • 78. { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].Conne ctionString); con.Open(); SqlCommand cmd = new SqlCommand("select * from register where custid=" + TextBox1.Text.Trim() + "", con); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { TextBox2.Text = dr.GetString(1); TextBox3.Text = dr.GetString(4); temp = true; Label1.Visible = false; Label2.Visible = true; TextBox2.Visible = true; Label3.Visible = true; TextBox3.Visible = true; Label4.Visible = true; TextBox4.Visible = true; Label5.Visible = true; TextBox5.Visible = true; Button2.Visible = true; Button3.Visible = true; Label6.Visible = true;
  • 79. TextBox6.Visible = true; Label7.Visible = true; TextBox7.Visible = true; Label8.Visible = false; Label9.Visible = false; Label10.Visible = false; Label12.Visible = false; Label13.Visible = false; Label14.Visible = false; Label15.Visible = false; LinkButton1.Visible = true; HyperLink1.Visible = false; } if (temp == false) { Label1.Visible = true; Label1.Text = "Record Not Found"; Label2.Visible = false; TextBox2.Visible = false; Label3.Visible = false; TextBox3.Visible = false; Label4.Visible = false; TextBox4.Visible = false;
  • 80. TextBox5.Visible = false; TextBox6.Visible = false; Label5.Visible = false; Label6.Visible = false; Button2.Visible = false; Button3.Visible = false; Label7.Visible = false; TextBox7.Visible = false; Label8.Visible = false; Label9.Visible = false; Label10.Visible = false; Label12.Visible = false; Label13.Visible = false; Label14.Visible = false; Label15.Visible = false; LinkButton1.Visible = false; } con.Close(); } catch (Exception ee) { Response.Write(ee.Message); }
  • 81. } protected void Button3_Click(object sender, EventArgs e) { RequiredFieldValidator4.Visible = true; int dqty; int cost; int ctot = 0; int dtot, dtot2; int totqty, cqty; try { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].Conne ctionString); con.Open(); SqlCommand cmd1 = new SqlCommand("select Qty,Total from Billdetails where Cid=" + TextBox1.Text + "", con); SqlDataReader dr = cmd1.ExecuteReader(); while (dr.Read()) { cost= Convert.ToInt32(TextBox5.Text);
  • 82. dqty = Convert.ToInt32(dr.GetInt32(0)); cqty = Convert.ToInt32(TextBox4.Text); totqty = dqty + cqty; ctot = cqty * cost; dtot = Convert.ToInt32(dr.GetInt32(1)); dtot2 = dtot + ctot; TextBox6.Text = Convert.ToString(dtot2); int mtot = Convert.ToInt32(TextBox7.Text); int m2tot = dtot2 - mtot; if (m2tot < 0) { TextBox7.Text = ""; Label11.Visible = true; Label11.Text = "Your payment exceed your bill amount"; } else { if (m2tot == 0) { totqty = 0; } Panel1.Visible = true; Label11.Visible = false;
  • 83. Label8.Visible = true; Label9.Visible = true; Label10.Visible = true; Label12.Visible = true; Label13.Visible = true; Label14.Visible = true; Label15.Visible = true; Label2.Visible = false; TextBox2.Visible = false; Label3.Visible = false; TextBox3.Visible = false; Label4.Visible = false; TextBox4.Visible = false; TextBox5.Visible = false; TextBox6.Visible = false; Label5.Visible = false; Label6.Visible = false; Button2.Visible = false; Button3.Visible = false; Label7.Visible = false; TextBox7.Visible = false; LinkButton1.Visible = false; HyperLink1.Visible = true; ; Label8.Text = Convert.ToString(dtot2);
  • 84. Label9.Text = Convert.ToString(m2tot); Label10.Text = Convert.ToString(mtot); Label12.Text = DateTime.Now.ToShortDateString(); Label15.Text = DateTime.Now.ToShortTimeString(); Label13.Text = TextBox2.Text; Label14.Text = TextBox1.Text; Button4.Visible = true; //Updating Data in database with new values. SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].Conne ctionString); con1.Open(); SqlDataAdapter da = new SqlDataAdapter("update Billdetails set Qty=" + totqty + ",Total=" + m2tot + " where Cid=" + TextBox1.Text + "", con1); DataSet ds = new DataSet(); da.Fill(ds); con1.Close(); clearfields(); dr.Close(); con.Close(); } } } catch (Exception ee)
  • 85. { Response.Write(ee.Message); } } protected void LinkButton1_Click(object sender, EventArgs e) { RequiredFieldValidator2.Visible = true; RequiredFieldValidator3.Visible = true; int dqty; int cost; int ctot = 0; int dtot, dtot2; int totqty, cqty; try { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].Conne ctionString); con.Open();
  • 86. SqlCommand cmd1 = new SqlCommand("select Qty,Total from Billdetails where Cid=" + TextBox1.Text + "", con); SqlDataReader dr = cmd1.ExecuteReader(); while (dr.Read()) { cost= Convert.ToInt32(TextBox5.Text); dqty = Convert.ToInt32(dr.GetInt32(0)); cqty = Convert.ToInt32(TextBox4.Text); totqty = dqty + cqty; ctot = cqty * cost; dtot = Convert.ToInt32(dr.GetInt32(1)); dtot2 = dtot+ ctot; TextBox6.Text = Convert.ToString(dtot2); dr.Close(); con.Close(); } } catch (Exception ee) { Response.Write(ee.Message); } }
  • 87. protected void Button4_Click(object sender, EventArgs e) { Session["ctrl"] = Panel1; ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language=javascript>windows.open('Print.aspx','PrintMe','height=300px,width= 300px,scrollbars=1');</script>"); Control ctrl = (Control)Session["ctrl"]; PrintHelper.PrintWebControl(ctrl); /* For Direct print PrintHelper.PrintWebControl(Panel1);*/ } } } //BILLPAYLATER ASPX <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillPayLater.aspx.cs" Inherits="ComputerizedBillingSystem.BillPayLater" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .auto-style1 { width: 100%;
  • 88. height: 222px; } .auto-style2 { height: 54px; } .auto-style3 { height: 54px; width: 249px; text-align: right; } .auto-style4 { width: 249px; text-align: right; } .auto-style5 { height: 54px; width: 329px; } .auto-style6 { width: 329px; } .auto-style7 { width: 249px; height: 39px; text-align: right; } .auto-style8 {
  • 89. width: 329px; height: 39px; } .auto-style9 { height: 39px; } .auto-style10 { width: 249px; height: 28px; text-align: right; } .auto-style11 { width: 329px; height: 28px; } .auto-style12 { height: 28px; } .auto-style13 { width: 249px; text-align: right; height: 29px; } .auto-style14 { width: 329px; height: 29px; }
  • 90. .auto-style15 { height: 29px; } .auto-style16 { width: 249px; height: 43px; text-align: right; } .auto-style17 { width: 329px; height: 43px; } .auto-style18 { height: 43px; } </style> </head> <body> <form id="form1" runat="server"> <div> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Home.aspx">BACK TO HOME</asp:HyperLink> </div> <table class="auto-style1">
  • 91. <tr> <td class="auto-style3">ID NUMBER</td> <td class="auto-style5">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> &nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator> &nbsp; <asp:Button ID="Button1" runat="server" Height="27px" OnClick="Button1_Click" Text="GET DETAILS" Width="112px" /> </td> <td class="auto-style2">&nbsp;<asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label> &nbsp;</td> </tr> <tr> <td class="auto-style13"> <asp:Label ID="Label2" runat="server" Text="NAME" Visible="False"></asp:Label> </td> <td class="auto-style14">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox2" runat="server" Visible="False"></asp:TextBox> &nbsp;</td> <td class="auto-style15"></td> </tr> <tr> <td class="auto-style10">
  • 92. <asp:Label ID="Label3" runat="server" Text="MOBILE" Visible="False"></asp:Label> </td> <td class="auto-style11">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox3" runat="server" Visible="False"></asp:TextBox> &nbsp;</td> <td class="auto-style12"></td> </tr> <tr> <td class="auto-style7"> <asp:Label ID="Label5" runat="server" Text="PRICE" Visible="False"></asp:Label> </td> <td class="auto-style8">&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox5" runat="server" Visible="False"></asp:TextBox> &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox5" ErrorMessage="*Give Pice of Bottle" ForeColor="Red"></asp:RequiredFieldValidator> </td> <td class="auto-style9">&nbsp;</td> </tr> <tr> <td class="auto-style4"> <asp:Label ID="Label4" runat="server" Text="QUANTITY" Visible="False"></asp:Label> </td> <td class="auto-style6">&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox4" runat="server" Visible="False"></asp:TextBox> &nbsp;
  • 93. <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox4" ErrorMessage="*No of Bottles" ForeColor="Red"></asp:RequiredFieldValidator> </td> <td>&nbsp;</td> </tr> <tr> <td class="auto-style13"> <asp:Label ID="Label6" runat="server" Text="TOTAL" Visible="False"></asp:Label> </td> <td class="auto-style14">&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TextBox6" runat="server" Enabled="False" Visible="False"></asp:TextBox> </td> <td class="auto-style15"></td> </tr> <tr> <td class="auto-style16"> <asp:Button ID="Button2" runat="server" Height="20px" OnClick="Button2_Click" Text="CANCEL" Visible="False" Width="79px" CausesValidation="False" /> </td> <td class="auto-style17">&nbsp;&nbsp;&nbsp; <asp:Button ID="Button3" runat="server" Height="22px" Text="ADD INVOICE" Visible="False" Width="100px" OnClick="Button3_Click" /> &nbsp;&nbsp; </td> <td class="auto-style18"></td> </tr> <tr>
  • 94. <td class="auto-style3"> </td> <td class="auto-style5"> <asp:Label ID="Label7" runat="server" Font-Bold="True" Font-Size="Medium" ForeColor="Green" Text="Label" Visible="False"></asp:Label> </td> <td class="auto-style2"></td> </tr> </table> </form> </body> </html> //BILL PAYNOW C# using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Configuration; using System.Data; namespace ComputerizedBillingSystem { public partial class BillPayNow : System.Web.UI.Page
  • 95. { protected void Page_Load(object sender, EventArgs e) { } private void clearfields() { TextBox1.Text = " "; TextBox2.Text = " "; TextBox3.Text = " "; TextBox4.Text = " "; TextBox5.Text = " "; TextBox6.Text = " "; TextBox7.Text = " "; } protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("Home.aspx"); } protected void Button1_Click(object sender, EventArgs e) { RequiredFieldValidator2.Visible = false;
  • 96. RequiredFieldValidator3.Visible = false; bool temp = false; try { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con.Open(); SqlCommand cmd = new SqlCommand("select * from register where custid=" + TextBox1.Text.Trim() + "", con); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { TextBox2.Text = dr.GetString(1); TextBox3.Text = dr.GetString(4); temp = true; Label1.Visible = false; Label2.Visible = true; TextBox2.Visible = true; Label3.Visible = true; TextBox3.Visible = true; Label4.Visible = true; TextBox4.Visible = true; Label5.Visible = true; TextBox5.Visible = true; Button2.Visible = true; Button3.Visible = true; Label6.Visible = true; TextBox6.Visible = true;
  • 97. Label7.Visible = true; TextBox7.Visible = true; Label8.Visible = false; Label9.Visible = false; Label10.Visible = false; Label12.Visible = false; Label13.Visible = false; Label14.Visible = false; Label15.Visible = false; LinkButton1.Visible = true; HyperLink1.Visible = false; } if (temp == false) { Label1.Visible = true; Label1.Text = "Record Not Found"; Label2.Visible = false; TextBox2.Visible = false; Label3.Visible = false; TextBox3.Visible = false; Label4.Visible = false; TextBox4.Visible = false; TextBox5.Visible = false; TextBox6.Visible = false; Label5.Visible = false; Label6.Visible = false;
  • 98. Button2.Visible = false; Button3.Visible = false; Label7.Visible = false; TextBox7.Visible = false; Label8.Visible = false; Label9.Visible = false; Label10.Visible = false; Label12.Visible = false; Label13.Visible = false; Label14.Visible = false; Label15.Visible = false; LinkButton1.Visible = false; } con.Close(); } catch (Exception ee) { Response.Write(ee.Message); } } protected void Button3_Click(object sender, EventArgs e) { RequiredFieldValidator4.Visible = true;
  • 99. int dqty; int cost; int ctot = 0; int dtot, dtot2; int totqty, cqty; try { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con.Open(); SqlCommand cmd1 = new SqlCommand("select Qty,Total from Billdetails where Cid=" + TextBox1.Text + "", con); SqlDataReader dr = cmd1.ExecuteReader(); while (dr.Read()) { cost = Convert.ToInt32(TextBox5.Text); dqty = Convert.ToInt32(dr.GetInt32(0)); cqty = Convert.ToInt32(TextBox4.Text); totqty = dqty + cqty; ctot = cqty * cost; dtot = Convert.ToInt32(dr.GetInt32(1)); dtot2 = dtot + ctot; TextBox6.Text = Convert.ToString(dtot2); int mtot = Convert.ToInt32(TextBox7.Text); int m2tot = dtot2 - mtot; if (m2tot < 0) {
  • 100. TextBox7.Text = ""; Label11.Visible = true; Label11.Text = "Your payment exceed your bill amount"; } else { if (m2tot == 0) { totqty = 0; } Panel1.Visible = true; Label11.Visible = false; Label8.Visible = true; Label9.Visible = true; Label10.Visible = true; Label12.Visible = true; Label13.Visible = true; Label14.Visible = true; Label15.Visible = true; Label2.Visible = false; TextBox2.Visible = false; Label3.Visible = false; TextBox3.Visible = false; Label4.Visible = false; TextBox4.Visible = false; TextBox5.Visible = false;
  • 101. TextBox6.Visible = false; Label5.Visible = false; Label6.Visible = false; Button2.Visible = false; Button3.Visible = false; Label7.Visible = false; TextBox7.Visible = false; LinkButton1.Visible = false; HyperLink1.Visible = true; ; Label8.Text = Convert.ToString(dtot2); Label9.Text = Convert.ToString(m2tot); Label10.Text = Convert.ToString(mtot); Label12.Text = DateTime.Now.ToShortDateString(); Label15.Text = DateTime.Now.ToShortTimeString(); Label13.Text = TextBox2.Text; Label14.Text = TextBox1.Text; Button4.Visible = true; //Updating Data in database with new values. SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con1.Open(); SqlDataAdapter da = new SqlDataAdapter("update Billdetails set Qty=" + totqty + ",Total=" + m2tot + " where Cid=" + TextBox1.Text + "", con1); DataSet ds = new DataSet(); da.Fill(ds); con1.Close(); clearfields(); dr.Close();
  • 102. con.Close(); } } } catch (Exception ee) { Response.Write(ee.Message); } } protected void LinkButton1_Click(object sender, EventArgs e) { RequiredFieldValidator2.Visible = true; RequiredFieldValidator3.Visible = true; int dqty; int cost; int ctot = 0; int dtot, dtot2; int totqty, cqty; try {
  • 103. SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["adminconn"].ConnectionString); con.Open(); SqlCommand cmd1 = new SqlCommand("select Qty,Total from Billdetails where Cid=" + TextBox1.Text + "", con); SqlDataReader dr = cmd1.ExecuteReader(); while (dr.Read()) { cost = Convert.ToInt32(TextBox5.Text); dqty = Convert.ToInt32(dr.GetInt32(0)); cqty = Convert.ToInt32(TextBox4.Text); totqty = dqty + cqty; ctot = cqty * cost; dtot = Convert.ToInt32(dr.GetInt32(1)); dtot2 = dtot + ctot; TextBox6.Text = Convert.ToString(dtot2); dr.Close(); con.Close(); } } catch (Exception ee) { Response.Write(ee.Message); } } protected void Button4_Click(object sender, EventArgs e) {
  • 104. Session["ctrl"] = Panel1; ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language=javascript>windows.open('Print.aspx','PrintMe','height=300px,width=300px,scrollb ars=1');</script>"); Control ctrl = (Control)Session["ctrl"]; PrintHelper.PrintWebControl(ctrl) /* For Direct print PrintHelper.PrintWebControl(Panel1);*/ } } } //PRINTER HELPER CLASS FILE .CS using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO; using System.Text; using System.Web.SessionState; public class PrintHelper {
  • 105. public PrintHelper() { } public static void PrintWebControl(Control ctrl) { PrintWebControl(ctrl, string.Empty); } public static void PrintWebControl(Control ctrl, string Script) { StringWriter stringWrite = new StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite); if (ctrl is WebControl) { Unit w = new Unit(100, UnitType.Percentage); ((WebControl)ctrl).Width = w; } Page pg = new Page(); pg.EnableEventValidation = false; if (Script != string.Empty) { pg.ClientScript.RegisterStartupScript(pg.GetType(), "PrintJavaScript", Script); } HtmlForm frm = new HtmlForm(); pg.Controls.Add(frm); frm.Attributes.Add("runat", "server");
  • 106. frm.Controls.Add(ctrl); pg.DesignerInitialize(); pg.RenderControl(htmlWrite); string strHTML = stringWrite.ToString(); HttpContext.Current.Response.Clear(); HttpContext.Current.Response.Write(strHTML); HttpContext.Current.Response.Write("<script>window.print();</script>"); HttpContext.Current.Response.End(); } } //UPDATE CUSTOMER DETAILS ASPX <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UpdateCustomer.aspx.cs" Inherits="ComputerizedBillingSystem.UpdateCustomer" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .auto-style1 { width: 100%; height: 283px; } .auto-style2 { width: 408px; }
  • 107. </style> </head> <body> <form id="form1" runat="server"> <table class="auto-style1"> <tr> <td style="text-align: left" class="auto-style2">&nbsp;ID NO&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox1" runat="server" Height="16px" Width="120px"></asp:TextBox> &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator> &nbsp;&nbsp; <br /> &nbsp; </td> <td style="text-align: left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Home.aspx">BACK TO HOME</asp:HyperLink> </td> </tr> <tr> <td style="text-align: center" class="auto-style2"> <br /> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" DataKeyNames="custid" DataSourceID="SqlDataSource1" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" Height="177px" Width="295px">
  • 108. <AlternatingRowStyle BackColor="#DCDCDC" /> <Columns> <asp:BoundField DataField="custid" HeaderText="custid" ReadOnly="True" SortExpression="custid" /> <asp:BoundField DataField="custname" HeaderText="custname" SortExpression="custname" /> <asp:BoundField DataField="DoorNo" HeaderText="DoorNo" SortExpression="DoorNo" /> <asp:BoundField DataField="StreetName" HeaderText="StreetName" SortExpression="StreetName" /> <asp:BoundField DataField="Mobile" HeaderText="Mobile" SortExpression="Mobile" /> </Columns> <FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> <RowStyle BackColor="#EEEEEE" ForeColor="Black" /> <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> <SortedAscendingCellStyle BackColor="#F1F1F1" /> <SortedAscendingHeaderStyle BackColor="#0000A9" /> <SortedDescendingCellStyle BackColor="#CAC9C9" /> <SortedDescendingHeaderStyle BackColor="#000065" /> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:adminconn %>" SelectCommand="SELECT * FROM [register] WHERE ([custid] = @custid)" DeleteCommand="DELETE FROM [register] WHERE [custid] = @custid" InsertCommand="INSERT INTO [register] ([custid], [custname], [DoorNo], [StreetName], [Mobile]) VALUES (@custid, @custname, @DoorNo, @StreetName, @Mobile)" UpdateCommand="UPDATE [register] SET [custname] =
  • 109. @custname, [DoorNo] = @DoorNo, [StreetName] = @StreetName, [Mobile] = @Mobile WHERE [custid] = @custid"> <DeleteParameters> <asp:Parameter Name="custid" Type="String" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="custid" Type="String" /> <asp:Parameter Name="custname" Type="String" /> <asp:Parameter Name="DoorNo" Type="String" /> <asp:Parameter Name="StreetName" Type="String" /> <asp:Parameter Name="Mobile" Type="String" /> </InsertParameters> <SelectParameters> <asp:ControlParameter ControlID="TextBox1" Name="custid" PropertyName="Text" Type="String" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="custname" Type="String" /> <asp:Parameter Name="DoorNo" Type="String" /> <asp:Parameter Name="StreetName" Type="String" /> <asp:Parameter Name="Mobile" Type="String" /> <asp:Parameter Name="custid" Type="String" /> </UpdateParameters> </asp:SqlDataSource> </td> <td style="text-align: center"> &nbsp;</td> </tr>
  • 110. </table> </form> </body> </html> //UPDATE ADMIN LOGIN CREDENTIALS (RECHECK USERNAME @ PASSWORD) <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UpdateAdminLoginRecheck.aspx.cs" Inherits="ComputerizedBillingSystem.UpdateAdminLoginRecheck" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .auto-style1 { width: 100%; height: 153px; } .auto-style2 { width: 193px; } .auto-style3 { width: 193px; height: 61px; } .auto-style4 { height: 61px; }
  • 111. .auto-style5 { width: 193px; height: 51px; } .auto-style6 { height: 51px; } .auto-style7 { width: 209px; height: 61px; text-align: right; } .auto-style8 { width: 209px; height: 51px; text-align: right; } .auto-style9 { width: 209px; text-align: right; } </style> </head> <body> <form id="form1" runat="server"> <table class="auto-style1"> <tr> <td class="auto-style3">