Final Water Billing

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 55

Water Billing System

1. INTRODUCTION:

1.1 Introduction to Proposed System


Our project entitled “Water Billing System” aims is to generate
Water bill with all the charges and penalty. Manual system that is
employed is extremely laborious and quite inadequate. It only makes
the process more difficult and hard.
The aim of our project is to develop a system that is meant to
partially computerize the work performed in the Water Board like
generating monthly Water bill, record of consuming unit of water,
store record of the customer and previous unpaid record.
We used HTML/PHP as front end and MYSQL as back end for
developing our project. HTML is primarily a visual design environment.
We can create a android application by designing the form and that
make up the user interface. Adding android application code to the
form and the objects such as buttons and text boxes on them and
adding any required support code in additional modular.
MySQL is free open source database that facilitates the
effective management of the databases by connecting them to the
software. It is a stable ,reliable and the powerful solution with the
advanced features and advantages which are as follows: Data
Security.MySQL is free open source database that facilitates the
effective management of the databases by connecting them to the
software. It is a stable ,reliable and the powerful solution with the
Water Billing System

advanced features and advantages which are as follows: Data


Security.

2. SYSTEM STUDY:
2.1 Scope:
Our project aims at Business process automation, i.e. we have tried to
computerize various processes of Water Billing System. In the sector
of Water board we have computerizes their department and stock
maintenance.
Scope of any software depends upon the following things:
1. It satisfy the user requirement
2. Be easy to understand by the user and operator
3. Be easy to operate
4. Have a good user interface
5. Be expandable
6. Delivered on schedule within the budget.
We have tried to make such type of software, which satisfy the
above given requirement.
Water Billing System

2.2 Objectives Of The System:


The firm handles all of the work manually, which is very tedious and
mismanaged.
The objective of our project is as follows:
a. To keep the information of Customer.
b. To keep the information of consuming unit of energy of current
month.
c. To keep the information of consuming unit of energy of previous
month.
d. To keep the information of employee working in the department.
e. To maintain the record of the department.
Water Billing System

3. SYSTEM ANALYSIS:
3.1 Identification Of Problem:

The old manual system was suffering from a series of drawbacks.


Since whole of the system was to be maintained with hands the
process of keeping, maintaining and retrieving the information was
very tedious and lengthy. The records were never used to be in a
systematic order. there used to be lots of difficulties in associating any
particular transaction with a particular context. If any information was
to be found it was required to go through the different registers,
documents there would never exist anything like report generation.
There would always be unnecessary consumption of time while
entering records and retrieving records. One more problem was that it
was very difficult to find errors while entering the records. Once the
records were entered it was very difficult to update these records.
In present, work done in the Water board is performed
manually which is a great headache for the department .The reason
behind it is that there is lot of information to be maintained and have
to be kept in mind while running the business .For this reason we have
Water Billing System

provided features Present system is partially automated


(computerized), actually existing system is quite laborious as one has
to enter same information at three different places.
Following points should be well considered-:
Documents and reports that must be provided by the new system:
there can also be few reports, which can help management in
decision-making and cost controlling, but since these reports do not
get required attention, such kind of reports and information were also
identified and given required attention.
Details of the information needed for each document and report.
The required frequency and distribution for each document.
Probable sources of information for each document and report.
With the implementation of computerized system, the task of keeping
records in an organized manner will be solved. The greatest of all is
the retrieval of information, which will be at the click of the mouse. So
the proposed system helps in saving the time in different operations
and making information flow easy giving valuable reports.

3.2 Feasibility Study:

Feasibility study is the phase in which the analyst checks that the
candidate system is feasible for the organization or not. This entails
identification, description & evaluation of the system. Feasibility study
is done to select the best system that meets the performance
requirement.
Water Billing System

If the feasibility study is to serve as a decision document, it must


answer key questions.
1. Is there a new and better way to do the job that will benefit the
user?
2. What are the costs and savings of the alternatives?
3. What is recommended?
The most successful system projects are not necessarily the
biggest or most visible in the business but rather those truly meet
user’s expectations.
Feasibility considerations
Three key considerations are involved in the feasibility study. They are
as follows:-
Economic Feasibility:
Economic analysis is the most frequently used method for evaluating
the effectiveness of the candidate system.
We analyze the candidate system (computerized system) is feasible as
than the manual system because it saves the money, time and
manpower. It also feasible according to cost benefits analysis.
Technical Feasibility:
Technical feasibility centers around the technology used. It means the
candidate system is technically feasible i.e. it don’t have any technical
fault and work properly in the given environment. Our system is
technically feasible; it is providing us required output.
Behavioral Feasibility:
Water Billing System

Behavioral feasibility is the analysis of behavior of the candidate


system. In this we analyze that the candidate system is working
properly or not. If working than it communicating proper with the
environment or not. All this matters are analyzed and a good
candidate system is prepared. Due to the change of system what is
the change in behavior of the users, this factors are also analyzed.

4. SYSTEM DEVELOPMENT ENVIRONMENT:


System development environment shows the hardware and software
requirement, which is necessary for developing the software.
Necessary software and hardware requirement, which are necessary
for making this software are as follows:
4.1 Software Requirement:
Software requirement for developing this project is as follows:
XAMPP
PHP /HTML.
MYSQL
4.2 Hardware Requirement:
Hardware requirement for developing this project is as follows:
1. Intel Pentium Processor
2. 32 MB RAM or higher
3. 1.2 GB Hard Disk or greater.
4. Video Display Unit.
Water Billing System

5. Keyboard.
6. Mouse.
7. One Printer for printing the Water bill.

5. INTRODUCTION TO TOOLS:

5.1 Introduction of PHP:


What Exactly is PHP?

PHP is an intuitive, server side scripting language. Like any other scripting
language it allows developers to build logic into the creation of web page
content and handle data returned from a web browser. PHP also contains a
number of extensions that make it easy to interact with databases, extracting
data to be displayed on a web page and storing information entered by a
web site visitor back into the database.

PHP consists of a scripting language and an interpreter. Like other scripting


languages, PHP enables web developers to define the behavior and logic
they need in a web page. These scripts are embedded into the HTML
documents that are served by the web server. The interpreter takes the form
of a module that integrates into the web server, converting the scripts into
Water Billing System

commands the computer then executes to achieve the results defined in the
script by the web developer.

How Does PHP Work?

To develop an understanding of how PHP works it is helpful to first explore


what happens when a web page is served to a user's browser.
When a user visits a web site or clicks on a link on a page the browser sends
a request to the web server hosting the site asking for a copy of the web
page. The web server receives the request, finds the corresponding web
page file on the file system and sends it back, over the internet, to the user's
browser.

Typically the web server doesn't pay any attention to the content of the file
it has just transmitted to the web browser. As far as the web server is
concerned the web browser understands the content of the web page file and
knows how to interpret and render it so that it appears as the web designer
intended.

Now let's consider what kind of web page content a web browser
understands. These days a web page is likely to consist of HTML, XHTML
and JavaScript. The web browser contains code that tells it what to do with
these types of content. For example, it understands the structure HTML in
terms of rendering the page and it has a JavaScript interpreter built in that
knows how to execute the instructions in a JavaScript script. A web
browser, however, knows absolutely nothing about any PHP script that may
be embedded in an HTML document. If a browser was served a web page
containing PHP it would not know how to interpret that code.

Given that a web browser knows nothing about PHP in a web page, then
clearly something has to be done with any PHP script in the page before it
reaches the browser. This is where the PHP pre-processing module comes
Water Billing System

in. The PHP module is, as mentioned previously, integrated into the web
server. The module tells the web server that when a page is to be served
which contains PHP script (identified by special markers) that it is to pass
that script to the PHP pre-processing module and wait for the PHP module
to send it some content to replace that script fragment. The PHP processing
module understands PHP, executes the PHP script written by the web
developer and, based on the script instructions, creates output that the
browser will understand. The web server substitutes the content provided by
the PHP pre-processor module in place of the PHP script in the web page
and sends it to the browser where it is rendered for the user to view.

To help understand this concept let's take a quick look at a before and after
scenario. The following HTML contains some PHP script that is designed
to output an HTML paragraph tag:

<html>
<head>
<title>A PHP Example</title>
</head>
<body>

<?php
echo '<p>This line of HTML was generated by a PHP script embedded
into an HTML document</p>';
?>

</body>
</html>

The above example looks very much like standard HTML until you reach
the part surrounded by <?php and ?>. These are markers that designate
where the embedded PHP script begins and ends. When the web server
Water Billing System

finds this it sends it to the PHP module. The PHP module interprets it,
converts it to HTML and sends it back to the web server. The web server, in
turn, sends the following to the browser:

<html>
<head>
<title>A PHP Example</title>
</head>
<body>

<p>This line of HTML was generated by a PHP script embedded into an


HTML document</p>

</body>
</html>

Once loaded into the browser, it is rendered just like any other web page.
The fact that the web page originally contained PHP is completely
transparent to the web browser.

The above example is certainly an oversimplification of the power of PHP.


Some may question why one would use PHP to output some static text that
could have been achieved more easily using an HTML tag. The fact is,
however, HTML only makes sense if you know beforehand exactly what
needs to be displayed in the web page. Imagine instead, that you are
developing an online banking application. One of the pages you need to
display must contain the customer's bank account number combined with
the current balance. Obviously this information is going to be different for
each customer. In this scenario you would develop an HTML page that
essentially serves as a template for the page, and then embed PHP into the
page to extract the account and balance information from a database. Once
processed by the PHP module integrated into the web server, this customer
Water Billing System

specific content will then appear in the HTML page in place of the PHP
script when the page is loaded into the browser.

Why is PHP so Useful?

In terms of web page content we have two extremes. At one extreme we


have HTML which is completely static. There is very little that can be done
with HTML to create dynamic content in a web page. At the other extreme
we have scripting languages like JavaScript. JavaScript provides a powerful
mechanism for creating interactive and dynamic web pages.

When talking about JavaScript it is important to understand that it is, by


design, a client side scripting language. By this we mean that the script gets
executed inside the user's browser and not on the web server on which the
web page originated. Whilst this is fine for many situations it is often the
case that by the time a script reaches the browser it is then either too late, or
inefficient, to do what is needed. A prime example of this involves
displaying a web page which contains some data from a database table.
Since the database resides on a server (either the same physical server
which runs the web server or on the same network as the web server
connected by a high speed fiber network connection) it makes sense for any
script that needs to extract data from the database to be executed on the
server, rather than waiting until it reaches the browser. It is for this kind of
task that PHP is perfectly suited. It is also fast and efficient (because the
script is executed on the server it gets to take advantage of multi-processing,
large scale memory and other such enterprise level hardware features.

In addition to the advantages of being a server side scripting language PHP


is easy to learn and use. The fact that PHP works seamlessly with HTML
makes it accessible to a broad community of web designers.
Water Billing System

Perhaps one of the most significant advantages of PHP to some is the ease
with which it interacts with the MySQL database to retrieve and store data.

Summary
In summary, PHP has many advantages, and those listed here are just some
of the reasons for the success of PHP. Many people will offer their own
reasons for using PHP - and this fact alone is testament to the power and
flexibility of PHP.

5.2 Introduction of MySql


MySQL Database

MySQL is a fast, easy-to-use RDBMS being used for many small and big
businesses. MySQL is developed, marketed and supported by MySQL AB,
which is a Swedish company. MySQL is becoming so popular because of
many good reasons −

MySQL is released under an open-source license. So you have nothing to


pay to use it.

MySQL is a very powerful program in its own right. It handles a large


subset of the functionality of the most expensive and powerful database
packages.

MySQL uses a standard form of the well-known SQL data language.

MySQL works on many operating systems and with many languages


including PHP, PERL, C, C++, JAVA, etc.

MySQL works very quickly and works well even with large data sets.

MySQL is very friendly to PHP, the most appreciated language for web
development.
Water Billing System

MySQL supports large databases, up to 50 million rows or more in a table.


The default file size limit for a table is 4GB, but you can increase this (if
your operating system can handle it) to a theoretical limit of 8 million
terabytes (TB).

MySQL is customizable. The open-source GPL license allows programmers


to modify the MySQL software to fit their own specific environments.

Table is shown below:-

Table Name: BILL


Field Name Data Type Size Constraint
Bill_no Number Auto Primary key
BillDate Date
Amount Number Auto
City Text 30

In this table there are no multivalued attributes. So this is in First


Normal Form.

2. Table Name : Customer


Field Name Data Type Size Constraint
Customer First Name Text 10
Customer Middle Text 10
Name
Customer Last Name Text 10
Cust_id Number Auto Primary Key
Service_Centre Text 20
Street Text 20

Code
Design Design Code Test
Water Billing System

City Text 20
City Code Number Auto
State Text 20

In this table there are no multivalued attributes. So this is in First


Normal Form.
Service Centre Table:
Field Name Data Type Size Constraint
Cust_id Number Auto Foreign Key
Service_Centre Text 20
Street Text 20
City Text 20
City Code Number Auto
State Text 10

In this table there are no multivalued attributes. So this is in First


Normal Form.

Bill Charge Table:

Field Name Data Type Size Constraint


Bill_no Number Auto Primary Key
Fix _charge Number Auto
E_duty Number Auto
Total Charge Number Auto
Total Unit Number Auto

Code
Design Design Code Test
Water Billing System

In this table there are no multivalued attributes. So this is in First


Normal Form.

Commercial Bill Table:


Field Name Data Type Size Constraint
Customer Name Text 20
Shop_no Text 20 Primary Key
Street Text 20
Bill_no Integer Auto Foreign Key
Bill Amount Integer Auto
Bill Date Date

These are the tables, which are used in the project development for
storing different record. Every table has a primary key for storing
unique record . we have also used foreign key for making relationship
between the tables.
6.2 Input Stream:
Input stream shows the way by which information are passed in to the
table as record. We have used mainly two forms in the project
inputting the record in the table first is commercial bill record form
and second is domestic bill record form. By these form we input the
records of the table name, address, service centre, customer_id etc
6.3 Output Stream:
Input stream shows the way by which information viewed by the user
which are stored in the database.
Water Billing System

Commercial bill calculation form and domestic bill calculation forms


are used as an output stream we can see the record and also can see
the name , bill_date,total_bill etc.
Commercial report form and home report form are used for getting
the total record of the domestic bill and commercial bill in printed
form.

7. ARCHITECTURAL DESIGN:

7.1 SDLC(System Development Life Cycle):


System development life cycle is a sequence of events carried out by
analyst, designers and users to develop and important an information
system.
Activities are carried out in different stages.
The phases are as follows:
1. Preliminary Investigation (Feasibility Study)
2. Determination Of System Requirement
3. Design Of The System
4. Design Of The System
5. Development Of Software
6. System Testing
7. System Implementation
8. System Maintenance
Water Billing System

1. Preliminary Investigation (Feasibility Study):


An important outcome of this preliminary investigation is determining
whether the System requested is feasible or not.
The major purpose of this study are listed below:

Identify the responsible users and develop an initial scope of the


system.
Identify current deficiencies in the user’s environment determine
objectives for the new system
Determine whether it is feasible to automate the system and if so
suggest some acceptable options:
The three major areas to consider while determining the feasibility
of a project are:
 Technical Feasibility
 Economical Feasibility
 Operational Feasibility
Technical Feasibility:
The Analyst finds out whether current technical resources, which are
available in the organization, is capable of Handling user
requirements.
Economical Feasibility:
Economical or financial feasibility is second part of resource
determination. Basic resources to consider are:
Water Billing System

 Management time
 Time spent by system analysis team
 Cost of doing the full system study
 Estimated cost of hardware
 Estimated cost of software
Operational Feasibility:
Operational feasibility is dependent upon determining human
resources for the project. It refers to projecting whether the system
will operate and be used once it is installed.

The document to be produced at the end of this activity is called


“FEASIBILITY STUDY REPORT”

2. Determination Of Requirements (Analysis)


Determination of system requirement involves studying the current
business system in Great detail to find out how it works and where
improvements have to be made.
This activity is carried out in two phases
 Detailed investigation
 Analysis or determination of system requirement
Detailed investigation
The heart of the system analysis is aimed at having a detailed
understanding of all-important facts of the project under
Water Billing System

consideration. Analyst working closely with employees and managers


must be able to answer the following key question:
What is being done by the current system?
How is being done?
How frequently does it occur?
How big is the volume of transactions or decisions?
How well is the task being performed?
Does a problem exist?
If problem exists, how serious is it?
If a problem exists, what is the underlying cause?
To answer the above question system analyst talks to a variety of
people to gather details about the project. Questionnaires are used to
collect this information from large groups of people who Cannot be
interviewed individually. Detailed investigations also require the study
of Manual and reports, actual observation of work activities and
collection of existing Forms and document to fully understand the
project.
Analysis or determination of system requirement
It is during this phase that the analyst and the user come to an
agreement on
what Functions the proposed system has to perform.
A detailed document has to prepare by system analyst containing the
following:
 Inputs that must be received by the system
Water Billing System

 The outputs to be produced by the system


 The data to be retained
 The procedures to get the output from the given inputs
 Audit and control requirements
 System acceptance criteria
This detailed document is called functional specification or proposed
procedures
3. Design Of The System
The design process should take care of the following:
 Identification of reports and outputs the new system should
produce.
 Scrutinize the data present on each report/output
 Sketch the form or display as expected to appear at the end of
completion of the system. This may be done on paper or on a
computer display using one of the automated system design
tools description of data to be input calculated or stored
individual data items and calculation procedure written in detail.
 The procedures written should tell how to process the data and
produce the output
The document produced at the end of this activity is called design
specification
4. Development Of Software
Water Billing System

In this stage the actual coding / writing of the program is done.


Analyst – programmers do analyst and designs well as code programs
programmers are responsible for documenting the program including
comments that explain both
how and why certain procedure was coded in specific way. Programs
are individually tested using some test data. Documentation is also
essential to test the programs and carry out maintenance once the
application has been installed.
This activity of system development life cycle produces tested
programs.
5. System Testing
Once the programs are tested individually the system as a whole
needs to tested. During testing the system is used experimentally to
ensure that the software does not Fail that it will run according to its
specifications and in the way user accept it too. special test data is
prepared as input for processing and the result are examined to
Locate unexpected result.
6. System Implementation
in this stage the system analyst uses new software, which has been
tested into use. user personnel are trained and any files of data
needed by the new system are constructed. Thus new software is
installed and then used.
7. System Maintenance
Water Billing System

Once installed the software is often used for many years. However
both the organization and user change. The environment may also
change over a period of time; therefore The software has to be
maintained.
7.2 DFD(Data Flow Diagram):
They are the versatile diagramming tools used for structured
system analysis. They are specifically used for process modeling
which involves graphically representing the function or process,
which captures, manipulate, store, and distribute data between a
system and its environment and between components within a
system.
7.3 CONTEXT DIAGRAM:
This is the start point of data flow diagramming process. It is denoted
as the highest-level diagram. It gives an overview of an organizational
system that shows the system boundaries, external entities that
interact with the system and the major information flows between
the entities and the system

8. DETAIL DESIGN OF PROPOSED SYSTEM:

8.1 MODULE:
There are mainly four module in our project. These are as follows:
Water Billing System

1. Domestic bill information module.


2. Commercial bill information module.
3. Domestic customer record module.
4. Commercial customer record module.

1. Domestic Bill Information Module:


In this module, we can see information related to the domestic bill
like customer’s name, address, its customer id, service centre, his
Water bill description, which contain bill no, bill date, total bill etc. we
can also calculate total bill of the customer according to total unit, bill
charge of the bill.

2. Commercial Bill Information Module:


There is no difference between domestic bill information module and
this module except that, this module is for commercial purpose. We
can see information related to the commercial bill like customer’s
name, shop no, address, its customer id, service centre his Water bill
description, which contain bill no, bill date, total bill etc. we can also
calculate total bill of the customer according to total unit, bill charge
of the bill.

3. Domestic Customer Record Module:


Water Billing System

In this module, we can create the record related to the domestic


customer like his name, address, customer id. This module can also
perform deleting a record modifying existing record etc

4. Commercial Customer Record Module:


In this module, we can create the record related to the customer like
his name, address, customer id. This module can also perform
deleting a record, modifying existing record etc. We can also see the
existing record by next and previous button.

LOGIN FORM
Water Billing System
Water Billing System

MDI FORM OF PROJECT

DESCRIPTION FORM FOR ELECTRIC CHARGES


Water Billing System

DOMESTIC BILL CALCULATION FORM


Water Billing System

COMERCIAL BILL CALCULATION FORM


Water Billing System

DOMESTIC CUSTOMER RECORD FORM


Water Billing System
Water Billing System

COMMERCIAL BILL RECORD FORM


Water Billing System

DOMESTIC BILL REPORT FORM


Water Billing System

COMMERCIAL BILL REPORT FORM


Water Billing System

8.2 DATA DICTIONARY:

This is normally represented as the data about data. It is also termed


as metadata some times which gives the data about the data stored in
the database. It defines each data term encountered during the
analysis and design of a new system. Data elements can describe files
or the processes.
Following are some major symbols used in the data dictionary
 = equivalent to
 + and
 [] either/ or
 () Optional entry

Following are some rules, which defines the construction of data


dictionary entries:
1. Words should be defined to understand for what they need
and not the variable need by which they may be described in
the program .
2. Each word must be unique. We cannot have two definition of
the same client.
Water Billing System

3. Aliases or synonyms are allowed when two or more enters


shows the same meaning. For example a vendor number may
also be called as customer number.
4. A self-defining word should not be decomposed. It means that
the reduction of any information in to subpart should be done
only if it is really required that is it is not easy to understand
directly.
Data dictionary includes information such as the number of records in
file, the frequency a process will run, security factor like pass word
which user must enter to get excess to the information.
Water Billing System

9. CODING:
9.1 Coding of Login Form:
Private Sub cmdCancle_Click()
End
End Sub

Private Sub cmdOk_Click()


If txtPassword.Text = "reema" Then
Loginform.Hide
MDIForm1.Show
Else
MsgBox "invalid password", vbOKOnly, "alert"
txtname.Text = ""
txtPassword.Text = ""
txtname.SetFocus
End If
End Sub
9.2 Coding of MDI Form:
Dim RetVal
Private Sub MDIForm_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As
Single)
If Button = vbRightButton Then
MDIForm1.PopupMenu mnuEnd
End If
End Sub

Private Sub mnuEndexit_Click()


Unload Me
End Sub
Water Billing System

Private Sub mnuExit_Click()


End
End Sub

Private Sub mnuFileCombilFrm_Click()


Comercialbillfrm.Show
End Sub

Private Sub mnufilecomreport_Click()


comercialreport.Show
End Sub

Private Sub mnuFileCusRecfrm_Click()


domRecfrm.Show
End Sub

Private Sub mnuFileDBillfrm_Click()


dombillcalfrm.Show
End Sub

Private Sub mnuFileDesfrm_Click()


descriptionfrm.Show
End Sub

Private Sub mnufilehomerep_Click()


homebillreport.Show
End Sub

Private Sub mnufileopencomercialrec_Click()


comercialrecfrm.Show
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Key
Case Is = "topen"
descriptionfrm.Show
Case Is = "texit"
Unload Me
End Select
End Sub

9.3 Coding of Commercial Bill Calculation Form


Water Billing System

Dim u, u1 As Long
Dim X, Y, s, d1, d2, d, f As String
Private Sub cmdcclear_Click()
txtcfix.Text = ""
txtced.Text = ""
txtctotal.Text = ""
txtced.Text = ""
txtcsc.Text = ""
txtcec.Text = ""
txtcunit.Text = ""
txtcunit.SetFocus
End Sub

Private Sub cmdcexit_Click()


End
End Sub

Private Sub cmdclear_Click()


txtName.Text = ""
txtAddress.Text = ""
txtScenter.Text = ""
txtBillmonth.Text = ""
txtBilldate.Text = ""
txtBddate.Text = ""
txtTotalbill.Text = ""
txtShopno.Text = ""
txtBillpay.Text = ""
End Sub

Private Sub cmdcOk_Click()


If txtcunit.Text = "" Then
MsgBox "please enter unit"
txtcunit.Text = 0
End If
txtcfix.Text = "Rs 100.00"
f = 100
u = CInt(txtcunit.Text)
If u <= 100 Then
X=u*4
txtcec.Text = "Rs " & X
txtcsc.Text = "Rs " & CStr(u * 0.1)
s = u * 0.1
d = (X * 11) / 100
txtced.Text = "Rs " & d
txtctotal.Text = "Rs " & (X + s + f + d)
Water Billing System

ElseIf u > 100 Then


X = 100 * 4
d1 = (X * 11) / 100
u1 = u - 100
Y = u1 * 4.25
d2 = (Y * 11.5) / 100
d = d1 + d2
txtcec.Text = "Rs" & (X + Y)
s = u * 0.1
txtcsc.Text = "Rs" & s
txtced.Text = "Rs" & d

End If

txtctotal.Text = "Rs" & (X + Y + s + d + f)


End Sub

Private Sub cmdOk_Click()


If txtBillpay.Text = "" Then
txtTotalbill.Text = txtctotal.Text
Else
txtTotalbill.Text = "Rs" & (X + Y + s + d + f) - Val(txtBillpay.Text)
End If
End Sub

Private Sub cmdprevious_Click()


Comercialbillfrm.Hide
MDIForm1.Show
End Sub

Private Sub Form_Load()

End Sub

9.3 Coding of Domestic Bill Form:


Private Sub cmd1First_Click()
adocom.Recordset.MoveFirst
adobill.Recordset.MoveFirst
cmd1First.Enabled = False
cmd4Last.Enabled = True
End Sub

Private Sub cmd2Next_Click()


adocom.Recordset.MoveNext
Water Billing System

adobill.Recordset.MoveNext
cmd1First.Enabled = True
cmd4Last.Enabled = True
If (adocom.Recordset.AbsolutePosition) = adPosEOF And
adobill.Recordset.AbsolutePosition = adPosEOF Then
MsgBox ("no other record")
adocom.Refresh
adobill.Refresh
End If
End Sub

Private Sub cmd3Previous_Click()


adocom.Recordset.MovePrevious
adobill.Recordset.MovePrevious
cmd1First.Enabled = True
cmd4Last.Enabled = True
If adocom.Recordset.AbsolutePosition = adPosBOF And
adobill.Recordset.AbsolutePosition = adPosBOF Then
MsgBox ("no other record")
adocom.Refresh
adobill.Refresh
End If
End Sub

Private Sub cmd4Last_Click()


adocom.Recordset.MoveLast
adobill.Recordset.MoveLast
cmd1First.Enabled = True
cmd4Last.Enabled = False
End Sub

Private Sub cmdDelete_Click()


Dim res As String
res = MsgBox("you want to delete the record", vbYesNo + vbQuestion, "alert")
If res = vbYes Then
adocom.Recordset.Delete
adobill.Recordset.Delete
MsgBox "Record is Deleted"
adocom.Refresh
adobill.Refresh
Else
adocom.Refresh
adobill.Refresh
End If
End Sub
Water Billing System

Private Sub cmdlastfive_Click()


DataGrid1.Visible = True
Adodc1.RecordSource = "select top 5 billm,totalbill from cosbdes where=" &
Val(txtShopn)
'Adodc1.Refresh
DataGrid1.Refresh
End Sub

Private Sub cmdNew_Click()


adocom.Recordset.AddNew
adobill.Recordset.AddNew
txtCname.SetFocus
End Sub

Private Sub cmdSave_Click()


Dim res As String
res = MsgBox("you want to save the record", vbYesNo + vbQuestion, "alert")
If res = vbYes Then
adocom.Recordset.Update
adobill.Recordset.Fields("shop_no") = adocom.Recordset.Fields("shop_no")
adobill.Recordset.Update
MsgBox "Record is Updated"
adocom.Refresh
adobill.Refresh
Else
adocom.Recordset.CancelUpdate
adobill.Recordset.CancelUpdate
adocom.Refresh
adobill.Refresh
End If
End Sub

Private Sub comerfram_DragDrop(Source As Control, X As Single, Y As Single)

End Sub

Private Sub Form_Load()


DataGrid1.Visible = False
End Sub

9.4 Coding of Description Form:


Private Sub cmdExit_Click()
Unload Me
Water Billing System

End Sub

Private Sub cmdOk_Click()


If detailcb.ListIndex = 0 Then
Text1.Text = "1.30 Rs"
Text2.Text = "3.00 Rs"
Text3.Text = "3.50 Rs"
Text4.Text = "60.00 Rs"
ElseIf detailcb.ListIndex = 1 Then
Text1.Text = "4.00 Rs"
Text2.Text = "4.25 Rs"
Text3.Text = "4.50 Rs"
Text4.Text = "100.00 Rs"
End If

End Sub

Private Sub Form_Load()


detailcb.AddItem ("DOMESTIC 0")
detailcb.AddItem ("COMERCIAL 1")
End Sub
9.5 Coding of Domestic Bill Calculation Form:
Dim u, u1, u2 As Long
Dim X, Y, z, p, d, f As String
Private Sub cmd1exit_Click()
Unload Me
End Sub

Private Sub cmdAdd_Click()


adodesc.Recordset.AddNew
bmtxt.SetFocus
End Sub

Private Sub cmdCancle_Click()


bmtxt.Text = ""
bdtxt.Text = ""
tbtxt.Text = ""
bntxt.Text = ""
bntxt.Text = ""
pdtxt.Text = ""
txtbp.Text = ""
End Sub

Private Sub cmdclear_Click()


Water Billing System

txtfix.Text = ""
txted.Text = ""
txttotal.Text = ""
txted.Text = ""
txtsc.Text = ""
txtec.Text = ""
txtunit.Text = ""
tbtxt.Text = ""
txtunit.SetFocus
End Sub

Private Sub cmdDelete_Click()


Dim res As String
res = MsgBox("u w to delete the rec!", vbYesNo, "alert")
If res = vbYes Then
adodesc.Recordset.Delete
MsgBox "record is deleted"
adodesc.Refresh
Else
adodesc.Refresh
End If

End Sub

Private Sub cmdExit_Click()


bmtxt.SetFocus
End Sub

Private Sub cmdFilter_Click()


Dim res
res = InputBox("Enter The Criteria", "Filter")
adodesc.RecordSource = "select * from Billdec where" & res
End Sub

Private Sub cmdFind_Click()


Dim res As String
res = InputBox("enter the criteria for a rec", "find")
adodesc.Recordset.Find res, , adSearchForward, 1
End Sub

Private Sub cmdOk_Click()


If txtunit.Text = "" Then
MsgBox "please enter unit"
txtunit.Text = 0
End If
Water Billing System

txtfix.Text = "Rs 60.00"


f = 60
u = CInt(txtunit.Text)
If u <= 50 Then
X = u * 1.3
txtec.Text = "Rs " & X
txtsc.Text = "Rs " & CStr(u * 0.1)
p = u * 0.1
d = (X * 14) / 100
txted.Text = "Rs " & d
txttotal.Text = "Rs " & (X + p + f + d)
ElseIf (u > 50 And u <= 300) Then
X = 50 * 1.3
u1 = u - 50
Y = u1 * 3
txtec.Text = "Rs" & (X + Y)
p = u * 0.1
txtsc.Text = "Rs" & p
If u <= 100 Then
d = ((X + Y) * 15) / 100
Else
d = ((X + Y) * 23) / 100
End If
txted.Text = "Rs" & d
txttotal.Text = "Rs" & (X + Y + p + d + f)
ElseIf u > 300 Then
X = 50 * 1.3
Y = 250 * 3
z = (u - 300) * 3.5
txtec.Text = "Rs" & (X + Y + z)
p = CStr(u * 0.1)
txtsc.Text = "Rs" & p
If u <= 100 Then
d = ((X + Y + z) * 15) / 100
Else
d = ((X + Y + z) * 23) / 100
End If
txted.Text = "Rs" & d
txttotal.Text = "Rs" & (X + Y + z + p + d + f)
End If
End Sub

Private Sub cmdoko_Click()


If txtbp.Text = "" Then
tbtxt.Text = txttotal.Text
Water Billing System

Else
tbtxt.Text = "Rs" & (X + Y + z + p + d + f) - Val(txtbp.Text)
End If
End Sub

Private Sub cmdprevious_Click()


MDIForm1.Show
Unload Me
End Sub

Private Sub cmdSave_Click()


Dim res As String
res = MsgBox("u w to save the rec", vbYesNo + vbQuestion, "alert")
If res = vbYes Then
adodesc.Recordset.Update
MsgBox "record is updated"
'adodesc.Refresh
Else
adodesc.Recordset.CancelUpdate
adodesc.Refresh
End If
End Sub

Private Sub Form_Activate()


txtName.SetFocus
End Sub
Private Sub cmd1First_Click()
adocust.Recordset.MoveFirst
cmd1First.Enabled = False
cmd4Last.Enabled = True
End Sub

Private Sub cmd2Next_Click()


adocust.Recordset.MoveNext
cmd1First.Enabled = True
cmd4Last.Enabled = True
If (adocust.Recordset.AbsolutePosition) = adPosEOF Then
MsgBox ("no other record")
adocust.Refresh
End If
End Sub

Private Sub cmd3Previous_Click()


adocust.Recordset.MovePrevious
cmd1First.Enabled = True
Water Billing System

cmd4Last.Enabled = True
If adocust.Recordset.AbsolutePosition = adPosBOF Then
MsgBox ("no other record")
adocust.Refresh
End If
End Sub

Private Sub cmd4Last_Click()


adocust.Recordset.MoveLast
cmd1First.Enabled = True
cmd4Last.Enabled = False
End Sub

9.6 Coding of Commercial Bill Record Form:


Private Sub cmd1_Click()
adodesc.Recordset.MoveFirst
cmd1.Enabled = False
cmd4.Enabled = True
adodesc.Refresh
End Sub

Private Sub cmd1First_Click()


adocust.Recordset.MoveFirst
cmd1First.Enabled = False
cmd4Last.Enabled = True
End Sub

Private Sub cmd2_Click()


Dim i As Integer
If adocust.Recordset.Fields("cus_id") = adodesc.Recordset.Fields("cus_id") Then
adodesc.Recordset.MoveNext
cmd1.Enabled = True
cmd4.Enabled = True
End If
If adodesc.Recordset.AbsolutePosition = adPosEOF Then
MsgBox ("no other record")
End If
adodesc.Refresh
End Sub
Private Sub cmd2Next_Click()
adocust.Recordset.MoveNext
cmd1First.Enabled = True
cmd4Last.Enabled = True
If adocust.Recordset.AbsolutePosition = adPosEOF Then
Water Billing System

MsgBox ("no other record")


adocust.Refresh
End If
End Sub
Private Sub cmd3_Click()
adodesc.Recordset.MovePrevious
cmd1.Enabled = True
cmd4.Enabled = True
If adodesc.Recordset.AbsolutePosition = adPosBOF Then
MsgBox ("no other record")
adodesc.Refresh
End If
End Sub
Private Sub cmd3Next_Click()
dombillcalfrm.Show
Unload Me
End Sub

Private Sub cmd3Previous_Click()


adocust.Recordset.MovePrevious
cmd1First.Enabled = True
cmd4Last.Enabled = True
If adocust.Recordset.AbsolutePosition = adPosBOF Then
MsgBox "no other record"
adocust.Refresh
End If
End Sub

Private Sub cmd4_Click()


adodesc.Recordset.MoveLast
cmd1.Enabled = True
cmd4.Enabled = False
End Sub

Private Sub cmd4Last_Click()


adocust.Recordset.MoveLast
cmd1First.Enabled = True
cmd4Last.Enabled = False
End Sub

Private Sub cmdDelete_Click()


Dim res As String
res = MsgBox("you want to delete the record", vbYesNo + vbQuestion, "alert")
If res = vbYes Then
adocust.Recordset.Delete
Water Billing System

adodesc.Recordset.Delete
MsgBox "Record is Deleted"
adocust.Refresh
adodesc.Refresh
Else
adocust.Refresh
adodesc.Refresh
End If
End Sub

Private Sub cmdExit_Click()


Unload Me
End Sub

Private Sub cmdfirst_Click()


adodesc.Recordset.MoveFirst
cmdfirst.Enabled = False
cmdlast.Enabled = True
End Sub

Private Sub cmdnext_Click()


adodesc.Recordset.MoveNext
cmdfirst.Enabled = True
cmdlast.Enabled = True
If adodesc.Recordset.AbsolutePosition = adPosEOF Then
MsgBox ("no other record")
adodesc.Refresh
End If
End Sub

Private Sub cmdFilter_Click()


Dim res As String
res = InputBox("Enter The Criteria", "Filter")
'adodesc.Recordset.Fields("cus_id") = adocust.Recordset.Fields("cus_id")
adocust.RecordSource = "select * from bill where" & res
'adodesc.RecordSource = "select billdec.billmonth,billdec.totalbill from billdec where" &
res
End Sub

Private Sub cmdlastfive_Click()


DataGrid1.Visible = True
Adodc1.RecordSource = "select top 5 totalbill,billmonth from billdec where cus_id =" &
Val(txtcusid)
Adodc1.Refresh
DataGrid1.Refresh
Water Billing System

End Sub

Private Sub cmdNew_Click()


adocust.Recordset.AddNew
adodesc.Recordset.AddNew
txtname.SetFocus
End Sub

Private Sub cmdPrev_Click()


MDIForm1.Show
Unload Me
End Sub

Private Sub cmdprevious_Click()


adodesc.Recordset.MovePrevious
cmdfirst.Enabled = True
cmdlast.Enabled = True
If adodesc.Recordset.AbsolutePosition = adPosBOF Then
MsgBox ("no other record")
adodesc.Refresh
End If
End Sub

Private Sub cmdlast_Click()


adodesc.Recordset.MoveLast
cmdfirst.Enabled = True
cmdlast.Enabled = False
End Sub

Private Sub cmdSave_Click()


Dim res As String
res = MsgBox("you want to save the record", vbYesNo + vbQuestion, "alert")
If res = vbYes Then
adocust.Recordset.Update
adodesc.Recordset.Fields("cus_id") = adocust.Recordset.Fields("cus_id")
adodesc.Recordset.Update
MsgBox "Record is Updated"
adocust.Refresh
adodesc.Refresh
Else
adocust.Recordset.CancelUpdate
adodesc.Recordset.CancelUpdate
adocust.Refresh
adodesc.Refresh
End If
Water Billing System

End Sub

10. TESTING AND DEBUGGING:

Testing is vital for the success of any software. no system design is


ever perfect. Testing is also carried in two phases. first phase is during
the software engineering that is during the module creation. second
phase is after the completion of software. this is system testing which
verifies that the whole set of programs hanged together.
10.1 White Box Testing:
In this technique, the close examination of the logical parts through
the software are tested by cases that exercise species sets of
conditions or loops. all logical parts of the software checked once.
errors that can be corrected using this technique are typographical
errors, logical expressions which should be executed once may be
getting executed more than once and error resulting by using wrong
controls and loops.

When the box testing tests all the independent part within a module a
logical decisions on their true and the false side are exercised , all
loops and bounds within their operational bounds were exercised and
internal data structure to ensure their validity were exercised once.

10.2 Black Box Testing:


Water Billing System

This method enables the software engineer to device sets of input


techniques that fully exercise all functional requirements for a
program. black box testing tests the input, the output and the
external data. it checks whether the input data is correct and whether
we are getting the desired output.
10.3 Alpha Testing:
Acceptance testing is also sometimes called alpha testing. Be spoke
systems are developed for a single customer. The alpha testing
proceeds until the system developer and the customer agree that the
provided system is an acceptable implementation of the system
requirements.
10.4 Beta Testing:
On the other hand, when a system isto be marked as a software
product, another process called beta testing is often conducted.
During beta testing, a system is delivered among a number of
potential users who agree to use it. The customers then report
problems to the developers. This provides the product for real use
and detects errors which may not have been anticipated by the
system developers.
Testing Approaches:
Unit Testing:
Each module is considered independently. it focuses on each unit of
software as implemented in the source code. it is white box testing.
Water Billing System

Integration Testing:
Integration testing aims at constructing the program structure while
at the same constructing tests to uncover errors associated with
interfacing the modules. modules are integrated by using the top
down approach.
Validation Testing:
Validation testing was performed to ensure that all the functional and
performance requirements are met.
System Testing:
It is executing programs to check logical changes made in it with
intention of finding errors. a system is tested for online response,
volume of transaction, recovery from failure etc. System testing is
done to ensure that the system satisfies all the user requirements.
Water Billing System

11. CONCLUSION

We have tried to develop a system that can be a great help for the
owner of the referred Water department to receiving bill from the
customer. Despite all our efforts there are some bugs in the system,
which are still to be removed. This is possible by the testing being
done in the system.
We have left all the options open so that if there is any other future
requirement in the system by the user for the enhancement of the
system then it is possible to implement them.
In the last we would like to thanks all the persons involved in the
development of the system directly or indirectly. We are also thankful
to the Rajendra Nagar South Division Water Department for so much
taken by them in helping to develop the system.
We hope that the project will serve its purpose for which it is develop
there by underlining success of process.
Water Billing System

12. FUTURE ANALYSIS:


We have left all the options open so that if there is any other
future requirement in the system by the user for the enhancement of
the system then it is possible to implement them.
In the last we would like to thanks all the persons involved in the
development of the system directly or indirectly. We are also thankful
to the Rajendra Nagar South Division Water Department for so much
taken by them in helping to develop the system.
We hope that the project will serve its purpose for which it is develop
there by underlining success of process.

You might also like