Upload
shayani-batabyal
View
225
Download
0
Embed Size (px)
Citation preview
7/29/2019 e Billing Report
1/73
Project Report on,
E-Billing
Submitted by,
Enrollment No. Name of the Students
0802017 Gawad Nikhil P.
0802022 Kadam Sujit S.
0802023 Kamble Omkar V.
0802024 Karkhile Mangal A.
Guided by,
Mr. V. D. Maske
GOVERNMENT POLYTECHNIC, MUMBAI
(AN AUTONOMOUS INSTITUTE)
49, Khearwadi, Ali Yawar Jung Marg, Bandra(E.)
Mumbai-400 051
(2010-2011)
1
7/29/2019 e Billing Report
2/73
GOVERNMENT POLYTECHNIC, MUMBAI(AN AUTONOMOUS INSTITUTE)
49, Khearwadi, Ali Yawar Jung Marg, Bandra(E.)
Mumbai-400 051
CERTIFICATE
This is to certify that the following students have successfully and satisfactorily
completed the project E-Billing and presented their project report in the partial
fulfillment of requirement forDiploma in Computer Engineering fromGovernment Polytechnic, Mumbai. Under the guidance of respective project guide, in the
year 2010-2011.
Enrollment No. Name of the Students
0802017 Gawad Nikhil P.
0802022 Kadam Sujit S.
0802023 Kamble Omkar V.
0802024 Karkhile Mangal A.
Date: / /2011
_______________ _______________
Project Guide (Mr. V. D. Maske) H. O. D. (Mr. J. R. Nikhade)
_______________ ________________
External Examiner : Principal (Mr. D. P. Nathe)
2
7/29/2019 e Billing Report
3/73
INTRODUCTION
E-billing is the electronic delivery of financial documents to the customer
that represents and replaces the conventional paper based document.
E-billing is the delivery of electronic bills to end consumers and providing
a payment option for them.
In previous systems different worksheets were used to maintain product
list, customer list and billing information they are not able to share data
between each other.
This E-billing system is used to overcome the entire problem which they
are facing in older billing system, and making complete atomization of
manual billing system.
3
7/29/2019 e Billing Report
4/73
ACKNOWLEDGEMENT
The work is an accomplishment for the project works under the
invaluable guidance of Mr.V.D.MHASKE of department of ComputerEngineering. Behind every success there is a source of inspiration. In our case,
that source was our HOD MR.NIKHADE sir whose inspiration and
encouragement led us to complete this assignment to our satisfaction. In spite
of the busy schedule of department work they spend their valuable time for us
and acted as a friend and guide.
We also like to thank of staff member of our department and
classmates for the help they provide us.
Hence we drive a sense of satisfaction and pleasure in submitting
this project. We would like sincerely thank our guide for their guidance and
encouragement in completing this project.
We are equally thankful to assistance who are directly or
indirectly for developing the project. We are also thankful to the non teaching
staff of our Computer Department for helping us in our project.
4
7/29/2019 e Billing Report
5/73
TABLE OF CONTENTS
SrNo. Contents
PageNo.
1 Description of the Current System 6
2 Limitation of the Current System 6
3 Proposed System (Our System) 7-8
4 Advantages of Proposed System 9
5 Hardware and Software Requirements 10
6 Entity-Relationship Diagram 11
7 Data Flow Diagram 12
8 Program List 13-14
9 Table List 15-17
10 Screenshot of Forms 18-26
11 System Coding 27-70
12 Screenshots of Report 71
13 Conclusion and Future Enhancement 7214 Bibliography 73
5
7/29/2019 e Billing Report
6/73
DESCRIPTION OF THE CURRENT SYSTEM
The client uses MS Excel, and maintains their product list,
customer list, and prints the invoice, however it is not possible them to share
the data from multiple system in multi user environment, there is lot of
duplicate work, and chance of mistake. When the product price are changedthey need to update each and every excel file. There is no option to find and
print previous saved invoice. There is no security; anybody can access any
report and sensitive data, also no reports to find out the sales volume, stock
list, and summary report. This eBilling and invoicing system is used to
overcome the entire problem which they are facing currently, and making
complete atomization of manual billing and invoicing system
Then the world move towards electronic billing which creates,
processes, stores & print bill electronically by one single application. But thissystem also has some disadvantages.
The programmer then needs to build different application for
different store and the retailers. If suppose two customers needs billing
software each having different retail store the developer then needs to produce
separate application which was wastage of time.
After the deployment of the software if customer specified or
requested for a change then the developer has to recompute the logic. Suppose
there are 10 sub stores and the owner decided to add new substore containing
different products. Then the owner need to inform the developer about the
specified change and then the developer update the software by adding
requested changes. In this way the owner need to pay the extra cost for
expanding his billing software.
LIMITATIONS OF THE CURRENT SYSTEM
Current system is complex, hard to manage & time consuming.
Replication is another disadvantage of the current system.
It is tedious task to manage large amount of data.
Cannot be used for more than one retail store or shop.
Security of data & transaction is very poor.
6
7/29/2019 e Billing Report
7/73
PROPOSED SYSTEM
Customer comes in store and order for some products.Computer
operator takes customers details such as customer name and customers contact
number. Then computer operator creates bill of customer by adding product
name and quantity. The amount will generate automatically by multiplicationof quantity and rate of the product.Total amount will generate automatically
by addition of amount of each product. Computer operator do not need of
calculator to calculate the amount of the product. The person who is having
the basic knowledge about the computer can operate computer easily.By
simple clicking and editing text transactions can complete easily and
faster.The computer operator can easily see the report and print it whenever
he/she wants.
The Security is further enhanced by giving separate privileges to
Administrator & local user. The Administrator will be having all the rights
whereas local user has limited functions. So if there are major changes to
make only the administrator can perform it. Such as Backing up & Restoring
database. The product details can be easily managed by local user to add new
stock or updating existing stock details.
We have provided some utilities to secure the data and application
such as Restore, Backup, Change password. The Add/Modify store info
Utility expand the capability of the Project And provides flexibility to the user
by adding new store in the application this is the main advantage of ourproject which is not provided by traditional softwares. Here we can add more
than one store and maintain the transactions of each store separately. Only one
store will perform its operation at a time and the user can rapidly switch to
another store and perform the operations associated with it.
7
7/29/2019 e Billing Report
8/73
OBJECTIVES OF E-BILLING
Add and maintain records of available products.
Add and maintain customer details.
Add and maintain description of new products.
Add and maintain new entered category of products.
Add and maintain transactions of more than one store.
Provides economic/financial reports to the owner when he requested.
Provides a convenient solution of billing pattern.
Make an easy to use environment for users and customers.
8
7/29/2019 e Billing Report
9/73
ADVANTAGES OF PROPOSED SYSTEM
Its environment friendly.
Improves customer relationship managements.
Keeps billing records organized.
Supports for multiple stores.
It has user friendly interface.
Smart and simple.
Large capacity of storage.
Work is done at faster rate and speedy output is obtained.
Quick response to any action performed.
Searching of bill becomes easy.
Calculation can be done faster and efficiently.
Security is enhanced using advanced development tools SQL and
utilities like Backup and Restore.
9
7/29/2019 e Billing Report
10/73
HARDWARE AND SOFTWARE REQUIREMENTS
HARDWARE REQUIREMENTS
10 GB Hard disk.
P2, P3, P4 and other advance version processor. 128 MB of RAM.
SYSTEM REQUIREMENTS
Windows 98, or Windows 2000, or Windows NT, or Windows XP, or Windows VISTA
SOFTWAREDEVELOPMENT TOOLS
Front End
1. VB 6
Why vb6?
Rapid application development tool.
Simplified packaging and deployment.
Powerful & easy data access.
Improved coding.
Easy to design form.
Back End
1. SQL server 2005
Why SQL server 2005?
Easy to use and deployment.
Supported by windows OS. Centralized management.
Reliability.
Automating Tasks.
Scalability.
Provide more security.
10
7/29/2019 e Billing Report
11/73
ENTITY-RELATIONSHIP DIAGRAM
11
7/29/2019 e Billing Report
12/73
DATA FLOW DIAGRAM (DFD)
12
7/29/2019 e Billing Report
13/73
PROGRAM LIST
1. Frmsplash: - It is used as simple startup form which contains name of our
Project.
2. frmlogin: - Provide access to Project only to authenticate user. The user
login into application using password.
3. MDIForm1: - The main transactions start from this form. It is the main
from that provide access to other forms.
4. Product_list: - It is used to add, modify or delete a product details from
particular Retail Store or Shop.
5. Bill_frm: - Used to generate bills corresponding to that store and print it.
6. Bill_product: - It shows the stock of available products and enable user to
enter the quantity that he wanted. The details then added to Bill form.
7. frmfind_bill: - Used to find the previous Bills stored in Database. It can
also be act as Reports. The user can search Bills by Bill no., Customers name
or Date that he specifies.
8. frmutility: - Provides utility tools such as backup database, restoredatabase, change password that help to secure the data.
9. Backup: - User can take backup of database using this form. So you can
store multiple copies of data.
13
7/29/2019 e Billing Report
14/73
10. Restore: - In case the database is corrupted or deleted then using this
utility you can restore backup file.
11. Change_passwd: - This form enable user to change his password for
security purpose.
12. Store_info: - Shows the number of stores present in application and its
details. Users can also add/modify/delete store information.
13. frmchange_store: - If there are more than one store in application user
can rapidly switch among the stores without logging out.
14. frmAbout_us: - Shows name of the Project Developer and Project Guide.
14
7/29/2019 e Billing Report
15/73
TABLE LIST
Database Name: - EBilling.sql
1. Bill_Details:-
Column Name Data Type Primary Key Foreign Key Size
Bill_No int No No -
Prod_nm varchar No No 70
Rate float No No -
Qty int No No -
Amount float No No -
2. Bill_Info:-
Column Name Data Type Primary Key Foreign Key Size
Bill_No int Yes No -
Bill_Date varchar No No 15
Cust_Name varchar No No 30
Cont_No varchar No No 13
Total_Amnt float No No -
store_id int No No -
3. Log_in:-
Column Name Data Type Primary Key Foreign Key Size
user_nm varchar No No 25
passwd varchar No No 25
15
7/29/2019 e Billing Report
16/73
4. Product_List:-
Column Name Data Type Primary Key Foreign Key Size
Prod_ID int Yes No -Prod_Type varchar No No 30
Prod_Name varchar No No 70
Rate float No No -
Qty int No No -
Store_ID int No No -
5. Store_Info:-
Column Name Data Type Primary Key Foreign Key Size
store_id int Yes No -
Store_nm varchar No No 25
Addr varchar No No 75
City varchar No No 20
Pin int No No -
Phno varchar No No 13
6. Temp_Bill_Details:-
Column Name Data Type Primary Key Foreign Key Size
Product_Name varchar No No 70
Rate float No No -
Quantity int No No -
Amount float No No -
16
7/29/2019 e Billing Report
17/73
7. Temp_Bill_Info:-
Column Name Data Type Primary Key Foreign Key Size
Bill_No int No No -
Bill_Date varchar No No 15Cust_Name varchar No No 30
Cont_No varchar No No 13
Total_Amnt float No No -
17
7/29/2019 e Billing Report
18/73
SCREENSHOT OF FORMS
Frmsplash: -
Frmlogin: -
18
7/29/2019 e Billing Report
19/73
MDIForm1: -
Product_List: -
19
7/29/2019 e Billing Report
20/73
Bill_frm: -
20
7/29/2019 e Billing Report
21/73
Bill_product: -
21
7/29/2019 e Billing Report
22/73
FrmFind_bill: -
22
7/29/2019 e Billing Report
23/73
Frmutility: -
Backup: -
23
7/29/2019 e Billing Report
24/73
Restore: -
Change_passwd: -
24
7/29/2019 e Billing Report
25/73
Store_info: -
25
7/29/2019 e Billing Report
26/73
FrmChange_store: -
Frmabout_us: -
26
7/29/2019 e Billing Report
27/73
SYSTEM COADING
frmsplash
Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1 + 1
Label5.Caption = ProgressBar1.Value & "%"If ProgressBar1.Value = 100 Then
Unload Me
frmLogin.Show
End If
End Sub
Private Sub Timer2_Timer()
If Label7.Visible = True Then
Label7.Visible = FalseElse
Label7.Visible = True
End If
End Sub
frmlogin
Option Explicit
Public LoginSucceeded As Boolean
Private Sub cmdcancel_Click()
'set the global var to false
'to denote a failed login
LoginSucceeded = False
End
End Sub
Private Sub cmdlogin_Click()
'check for correct password which is in database
If Combo1.Text = "" Then
MsgBox "Please select a Store Name from list..!", vbExclamation, "E-Billing"
ElseIf Combo2.Text = "" Then
MsgBox "Please select User Type from list..!", vbExclamation, "E-Billing"
27
7/29/2019 e Billing Report
28/73
ElseIf txtPassword.Text = "" Then
MsgBox "Please Enter your Password..!", vbExclamation, "E-Billing"
Else
Dim pqr As String
pqr = "select passwd from log_in where user_nm='" & Combo2.Text & "'"
If Adodc2.Recordset.State = adStateOpen Then Adodc2.Recordset.Close
Adodc2.Recordset.Open pqr, "Provider=SQLNCLI.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data
Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
If txtPassword = Adodc2.Recordset("passwd") Then
Me.Hide
MDIForm1.Show
Else
MsgBox "Invalid Password, try again!", vbCritical, "Login Error"
txtPassword.SetFocus
End IfEnd If
End Sub
Private Sub Combo1_Change()
Combo3.Text = Combo1.Text
Dim sql As String
sql = "select store_id from store_info where store_nm='" & Combo3.Text & "'"
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
If Adodc1.Recordset.RecordCount > 0 Then
txtstore_id.Text = Adodc1.Recordset("store_id")
Else
txtstore_id.Text = ""
End If
End Sub
Private Sub Combo1_Click()
Combo1_Change
End Sub
Private Sub Combo2_Change()
txtPassword.Text = ""
28
7/29/2019 e Billing Report
29/73
txtPassword.SetFocus
End Sub
Private Sub Combo2_Click()
Combo2_Change
End Sub
Private Sub Form_Load()
'Enter store names in store name combo box to see the available stores
txtstore_id.Text = ""
Combo1.Clear
Combo2.Clear
txtPassword.Text = ""
Dim abc As String
abc = "select Store_nm from Store_info order by store_id"
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;PersistSecurity Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
While Adodc1.Recordset.EOF = False
Combo1.AddItem Adodc1.Recordset("store_nm")
Adodc1.Recordset.MoveNext
Wend
Adodc1.Refresh
Combo2.AddItem "Admin"
Combo2.AddItem "User"
End Sub
MDIForm1
Private Sub MDIForm_Activate()
Label2.Caption = frmLogin.Combo1.Text
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
If Button.Key = "exit" Then
End
ElseIf Button.Key = "product_list" Then
product_list.Show
29
7/29/2019 e Billing Report
30/73
ElseIf Button.Key = "bill" Then
bill_frm.Show
ElseIf Button.Key = "utilities" Then
frmutility.Show
ElseIf Button.Key = "change_store" Then
frmchange_store.Show
ElseIf Button.Key = "logout" Then
If MsgBox("Are You Sure You want to Logout?", vbYesNo + vbQuestion,
"Logout") = vbYes Then
Unload Me
frmLogin.Show
frmLogin.txtstore_id.Text = ""
frmLogin.Combo1.Clear
frmLogin.Combo2.Clear
frmLogin.txtPassword.Text = ""
Dim abc As String
abc = "select Store_nm from Store_info order by store_id"
If frmLogin.Adodc1.Recordset.State = adStateOpen Then
frmLogin.Adodc1.Recordset.Close
frmLogin.Adodc1.Recordset.Open abc, "Provider=SQLNCLI.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data
Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
While frmLogin.Adodc1.Recordset.EOF = False
frmLogin.Combo1.AddItem frmLogin.Adodc1.Recordset("store_nm")
frmLogin.Adodc1.Recordset.MoveNext
Wend
frmLogin.Adodc1.Refresh
frmLogin.Combo2.AddItem "Admin"
frmLogin.Combo2.AddItem "User"
Else:
MDIForm1.Enabled = True
End If
Exit Sub
ElseIf Button.Key = "about_us" Then
frmabout_us.ShowEnd If
MDIForm1.Enabled = False
End Sub
30
7/29/2019 e Billing Report
31/73
Product_List
Option Explicit
Dim addedit As String
Dim newPID As Integer
Private Sub cancel_Click()save.Visible = False
cancel.Visible = False
cmdnew.Visible = True
edit.Visible = True
delete.Visible = True
cmdclose.Visible = True
Combo1.Enabled = True
List1.Enabled = True
Text1.Enabled = False
Combo2.Enabled = FalseText3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
DisplayRecord
End Sub
Private Sub Combo1_Change()
Dim sql As String
If frmLogin.txtstore_id.Text = "0" ThenIf Combo1.Text = "ALL" Then
sql = "select Prod_Name from Product_List order by prod_ID"
Else
sql = "select Prod_Name from Product_List where Prod_Type='" & Combo1.Text
& "' order by Prod_ID"
End If
Else
If Combo1.Text = "ALL" Then
sql = "select Prod_Name from Product_List where store_id='" &
frmLogin.txtstore_id.Text & "' order by prod_ID"Else
sql = "select Prod_Name from Product_List where Prod_Type='" & Combo1.Text
& "' and store_id='" & frmLogin.txtstore_id.Text & "' order by Prod_ID"
End If
End If
List1.Clear
31
7/29/2019 e Billing Report
32/73
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
While Adodc1.Recordset.EOF = False
List1.AddItem Adodc1.Recordset("prod_Name")
Adodc1.Recordset.MoveNext
Wend
Adodc1.Refresh
If List1.ListCount > 0 Then
List1.ListIndex = 0
DisplayRecord
End If
End Sub
Private Sub Combo1_Click()
Combo1_Change
End Sub
Private Sub cmdnew_Click()
save.Visible = True
cancel.Visible = True
cmdnew.Visible = False
edit.Visible = False
delete.Visible = False
cmdclose.Visible = False
Combo1.Enabled = False
List1.Enabled = False
Text1.Enabled = False
Combo2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = TrueText1.Text = ""
Combo2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
addedit = "ADD"
32
7/29/2019 e Billing Report
33/73
Dim abc As String
If frmLogin.txtstore_id.Text = "0" Then
abc = "select distinct Prod_Type from Product_List order by Prod_Type"
Else
abc = "select distinct Prod_Type from Product_List where store_id='" &
frmLogin.txtstore_id.Text & "' order by Prod_Type"
End If
Combo2.Clear
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
While Adodc1.Recordset.EOF = False
Combo2.AddItem Adodc1.Recordset("Prod_Type")
Adodc1.Recordset.MoveNextWend
Adodc1.Refresh
'generate id automatically for new product
If Adodc1.Recordset.RecordCount
7/29/2019 e Billing Report
34/73
ElseIf IsNumeric(Text5.Text) = False Then
MsgBox "Enter Quantity Numeric only...!", vbExclamation, "E-Billing"
'all conditions are true now save the record
Else
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open "select *from Product_list",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic,
adLockOptimistic
Adodc1.Recordset.AddNew
Adodc1.Recordset("Prod_ID") = Text1.Text
Adodc1.Recordset("Prod_Type") = Combo2.Text
Adodc1.Recordset("Prod_Name") = Text3.Text
Adodc1.Recordset("Rate") = Val(Text4.Text)
Adodc1.Recordset("Qty") = Val(Text5.Text)
Adodc1.Recordset("store_id") = Val(frmLogin.txtstore_id.Text)
Adodc1.Recordset.Update
Adodc1.RefreshDisplayRecord
MsgBox "Record saved successfully", vbInformation, "Success!"
Unload Me
product_list.Show
save.Visible = False
cancel.Visible = False
cmdnew.Visible = True
edit.Visible = True
delete.Visible = True
cmdclose.Visible = True
Combo1.Enabled = True
List1.Enabled = True
Text1.Enabled = False
Combo2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
End If
'check the condition for editElse
If Combo2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = ""
Then
MsgBox "Please Enter the values in all the Fields...!", vbExclamation
ElseIf IsNumeric(Text4.Text) = False Then
MsgBox "Enter Rate Numeric only", vbExclamation, "E-Billing"
34
7/29/2019 e Billing Report
35/73
ElseIf IsNumeric(Text5.Text) = False Then
MsgBox "Enter Quantity Numeric only", vbExclamation, "E-Billing"
'all conditions are true now save the updated record
Else:
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open "select * from Product_List where Prod_ID=" &
Val(Text1.Text), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS",
adOpenDynamic, adLockOptimistic
Adodc1.Recordset("Prod_Type") = Combo2.Text
Adodc1.Recordset("Prod_Name") = Text3.Text
Adodc1.Recordset("Rate") = Val(Text4.Text)
Adodc1.Recordset("Qty") = Val(Text5.Text)
Adodc1.Recordset.Update
MsgBox "Record updated successfully", vbInformation, "Success!"
Unload Me
product_list.Show
save.Visible = Falsecancel.Visible = False
cmdnew.Visible = True
edit.Visible = True
delete.Visible = True
cmdclose.Visible = True
Combo1.Enabled = True
List1.Enabled = True
Text1.Enabled = False
Combo2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
End If
End If
End Sub
Private Sub delete_Click()
If Text1.Text = "" Then
MsgBox "Please select a product that you want to remove...!", vbInformation,"Operation Not Allowed"
Else:
If MsgBox("Are you sure, you want to delete the product ?", vbQuestion + vbYesNo,
"E-Billing") = vbYes Then
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
35
7/29/2019 e Billing Report
36/73
Adodc1.Recordset.Open "select * from Product_List where Prod_ID=" &
Val(Text1.Text), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS",
adOpenDynamic, adLockOptimistic
Adodc1.Recordset.delete
Adodc1.Refresh
Unload Me
product_list.Show
MsgBox "Record Deleted Successfully...!", vbInformation, "Success!"
DisplayRecord
End If
End If
End Sub
Private Sub edit_Click()
If Text1.Text = "" Then
MsgBox "Please select a product that you want to edit...!", vbInformation, "Operation
Not Allowed"Else:
If edit.Value = True Then
save.Visible = True
cancel.Visible = True
cmdnew.Visible = False
edit.Visible = False
delete.Visible = False
cmdclose.Visible = False
Combo1.Enabled = False
List1.Enabled = False
Combo2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
addedit = "EDIT"
Dim abc As String
If frmLogin.txtstore_id.Text = "0" Then
abc = "select distinct Prod_Type from Product_List order by Prod_Type"
Elseabc = "select distinct Prod_Type from Product_List where store_id='" &
frmLogin.txtstore_id.Text & "' order by Prod_Type"
End If
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
36
7/29/2019 e Billing Report
37/73
Adodc1.Recordset.Open abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
While Adodc1.Recordset.EOF = False
Combo2.AddItem Adodc1.Recordset("Prod_Type")
Adodc1.Recordset.MoveNext
Wend
Adodc1.Refresh
End If
End If
End Sub
Private Sub cmdclose_Click()
MDIForm1.Enabled = True
Unload Me
MDIForm1.Show
End Sub
Private Sub DisplayRecord()
Dim sql As String
sql = "select * from Product_List where Prod_Name='" & List1.Text & "' "
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
If Adodc1.Recordset.RecordCount > 0 Then
Text1.Text = Adodc1.Recordset("Prod_ID")
Combo2.Text = Adodc1.Recordset("Prod_Type")
Text3.Text = Adodc1.Recordset("Prod_Name")
Text4.Text = Adodc1.Recordset("Rate")
Text5.Text = Adodc1.Recordset("Qty")
Else
Text1.Text = ""
Combo2.Text = ""
Text3.Text = ""
Text4.Text = ""Text5.Text = ""
End If
End Sub
Private Sub Form_Load()
Dim abc As String
If frmLogin.txtstore_id.Text = "0" Then
37
7/29/2019 e Billing Report
38/73
abc = "select distinct Prod_Type from Product_List order by Prod_Type"
Else
abc = "select distinct Prod_Type from Product_List where store_id='" &
frmLogin.txtstore_id.Text & "' order by Prod_Type"
End If
Combo1.Clear
Combo1.AddItem "ALL"
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
While Adodc1.Recordset.EOF = False
Combo1.AddItem Adodc1.Recordset("Prod_Type")
Adodc1.Recordset.MoveNext
Wend
Adodc1.RefreshEnd Sub
Private Sub List1_Click()
DisplayRecord
End Sub
Bill_frm
Private Sub addproduct_Click()
bill_product.Show
bill_frm.Enabled = False
End Sub
Private Sub cancel_Click()
Text1.Text = ""
Text2.Text = ""Text3.Text = ""
Text4.Text = ""
new_bill.Visible = True
cmdclose.Visible = True
cmdfind.Visible = True
addproduct.Visible = False
38
7/29/2019 e Billing Report
39/73
remove_prd.Visible = False
save.Visible = False
cancel.Visible = False
print_bill.Visible = False
cmddel.Visible = False
Label6.Caption = "0"
If Adodc2.Recordset.State = adStateOpen Then Adodc2.Recordset.Close
Adodc2.Recordset.Open "truncate table temp_bill_details",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenStatic,
adLockReadOnly
Text3.Locked = True
Text4.Locked = True
End Sub
Private Sub cmdclose_Click()
If Adodc2.Recordset.State = adStateOpen Then Adodc2.Recordset.Close
Adodc2.Recordset.Open "truncate table temp_bill_details","Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenStatic,
adLockReadOnly
MDIForm1.Enabled = True
Unload Me
End Sub
Private Sub cmddel_Click()
If Text1.Text = "" Then
MsgBox "Please select or find the bill to be deleted..!", vbInformation, "E-Billing"
Exit Sub
End If
If MsgBox("Are you sure, you want to delete all the Bill details..?", vbQuestion +
vbYesNo, "E-Billing") = vbYes Then
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open "select * from bill_info where bill_no=" &
Val(Text1.Text), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS",
adOpenDynamic, adLockOptimisticAdodc1.Recordset.delete
Adodc1.Refresh
If Adodc3.Recordset.State = adStateOpen Then Adodc3.Recordset.Close
Adodc3.Recordset.Open "delete from bill_details where bill_no=" &
Val(Text1.Text), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
39
7/29/2019 e Billing Report
40/73
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS",
adOpenDynamic, adLockOptimistic
Adodc3.Refresh
If Adodc2.Recordset.State = adStateOpen Then Adodc2.Recordset.Close
Adodc2.Recordset.Open "truncate table temp_bill_details",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenStatic,
adLockReadOnly
Text3.Locked = True
Text4.Locked = True
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Label6.Caption = "0"
MsgBox "Bill Deleted Successfully...!", vbInformation, "Success!"
End IfEnd Sub
Private Sub cmdfind_Click()
If Adodc2.Recordset.State = adStateOpen Then Adodc2.Recordset.Close
Adodc2.Recordset.Open "truncate table temp_bill_details",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenStatic,
adLockReadOnly
Frmfind_bill.Show
bill_frm.Enabled = False
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Label7.Caption = frmLogin.Combo3.Text
cmddel.Visible = FalseEnd Sub
Private Sub new_bill_Click()
Text3.Locked = False
Text4.Locked = False
Text1.Text = ""
40
7/29/2019 e Billing Report
41/73
Text2.Text = Date
Text3.Text = ""
Text4.Text = ""
Label6.Caption = "0"
print_bill.Visible = False
new_bill.Visible = False
addproduct.Visible = True
remove_prd.Visible = True
save.Visible = True
cancel.Visible = True
cmdclose.Visible = False
cmdfind.Visible = False
cmddel.Visible = False
If Adodc2.Recordset.State = adStateOpen Then Adodc2.Recordset.Close
Adodc2.Recordset.Open "truncate table temp_bill_details",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenStatic,
adLockReadOnly
Dim sql As String
sql = "select *from temp_Bill_Details"
Adodc2.CommandType = adCmdText
Adodc2.RecordSource = sql
Adodc2.Refresh
Set DataGrid1.DataSource = Adodc2
If Adodc1.Recordset.RecordCount
7/29/2019 e Billing Report
42/73
Private Sub print_bill_Click()
Dim strselect As String
Me.CrystalReport1.Reset
Me.CrystalReport1.DiscardSavedData = True
Me.CrystalReport1.WindowState = crptMaximized
Me.CrystalReport1.WindowShowRefreshBtn = True
Me.CrystalReport1.ReportFileName = App.Path & "\Report1.rpt"
Me.CrystalReport1.Connect = "Provider=SQLNCLI.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data
Source=NIKHIL-176A7816\SQLEXPRESS"
strselect = "{bill_info.Bill_No} = " & Text1.Text & ""
Me.CrystalReport1.ReplaceSelectionFormula (strselect)
Me.CrystalReport1.Action = 1
End Sub
Private Sub remove_prd_Click()
If Adodc2.Recordset.RecordCount = 1 Then
Label6.Caption = "0"Adodc2.Recordset.delete
remove_prd.Enabled = False
Else
Adodc2.Recordset.delete
If bill_frm.Adodc2.Recordset.State = adStateOpen Then
bill_frm.Adodc2.Recordset.Close
bill_frm.Adodc2.Recordset.Open "select sum(amount) from temp_bill_details",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic,
adLockOptimistic
bill_frm.Label6.Caption = bill_frm.Adodc2.Recordset(0)
Dim sql As String
sql = "select *from temp_Bill_Details"
bill_frm.Adodc2.CommandType = adCmdText
bill_frm.Adodc2.RecordSource = sql
bill_frm.Adodc2.RefreshSet bill_frm.DataGrid1.DataSource = bill_frm.Adodc2
End If
End Sub
Private Sub save_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Then
42
7/29/2019 e Billing Report
43/73
MsgBox "Please enter values in all the fields..!", vbInformation, "ERROR"
ElseIf IsNumeric(Text4.Text) = False Then
MsgBox "Enter contact number numeric only..!", vbExclamation, "E-Billing"
ElseIf Label6.Caption = "0" Then
MsgBox "There are no products in the bill..!", vbInformation, "E-Billing"
Else:
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open "select *from bill_info", "Provider=SQLNCLI.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data
Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
Adodc1.Recordset.AddNew
Adodc1.Recordset("bill_no") = Text1.Text
Adodc1.Recordset("bill_date") = Text2.Text
Adodc1.Recordset("cust_name") = Text3.Text
Adodc1.Recordset("cont_no") = Text4.TextAdodc1.Recordset("total_amnt") = Label6.Caption
Adodc1.Recordset("store_id") = frmLogin.txtstore_id.Text
Adodc1.Recordset.Update
If Adodc2.Recordset.State = adStateOpen Then Adodc2.Recordset.Close
Adodc2.Recordset.Open "select *from temp_bill_details",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic,
adLockOptimistic
While Adodc2.Recordset.EOF = False
Adodc3.Recordset.AddNew
Adodc3.Recordset("bill_no") = Val(Text1.Text)
Adodc3.Recordset("prod_nm") = Adodc2.Recordset("product_name")
Adodc3.Recordset("rate") = Adodc2.Recordset("rate")
Adodc3.Recordset("qty") = Adodc2.Recordset("quantity")
Adodc3.Recordset("amount") = Adodc2.Recordset("amount")
Adodc3.Recordset.Update
Adodc2.Recordset.MoveNextWend
Dim prd As String
Adodc2.Recordset.MoveFirst
While Adodc2.Recordset.EOF = False
43
7/29/2019 e Billing Report
44/73
prd = "select *from product_list where prod_name='" &
Adodc2.Recordset("product_name") & "'"
If bill_product.Adodc1.Recordset.State = adStateOpen Then
bill_product.Adodc1.Recordset.Close
bill_product.Adodc1.Recordset.Open prd, "Provider=SQLNCLI.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data
Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
bill_product.Adodc1.Recordset("qty") =
Val(bill_product.Adodc1.Recordset("qty") - Adodc2.Recordset("quantity"))
bill_product.Adodc1.Recordset.Update
Adodc2.Recordset.MoveNext
Wend
Set DataGrid1.DataSource = Adodc2
MsgBox "Bill saved successfully!", vbInformation, "Success"
new_bill.Visible = True
addproduct.Visible = False
save.Visible = Falseprint_bill.Visible = True
remove_prd.Visible = False
cancel.Visible = False
cmdclose.Visible = True
cmdfind.Visible = True
Text3.Locked = True
Text4.Locked = True
End If
End Sub
Bill_product
Private Sub Combo1_Change()
Dim sql As String
If frmLogin.txtstore_id.Text = "0" Then
If Combo1.Text = "ALL" Then
sql = "select Prod_Name from Product_List order by prod_ID"Else
sql = "select Prod_Name from Product_List where Prod_Type='" & Combo1.Text
& "' order by Prod_ID"
End If
Else
If Combo1.Text = "ALL" Then
44
7/29/2019 e Billing Report
45/73
sql = "select Prod_Name from Product_List where store_id='" &
frmLogin.txtstore_id.Text & "' order by prod_ID"
Else
sql = "select Prod_Name from Product_List where Prod_Type='" & Combo1.Text
& "' order by Prod_ID"
End If
End If
List1.Clear
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenStatic, adLockReadOnly
While Adodc1.Recordset.EOF = False
List1.AddItem Adodc1.Recordset("prod_Name")
Adodc1.Recordset.MoveNextWend
Adodc1.Refresh
If List1.ListCount > 0 Then
List1.ListIndex = 0
DisplayRecord
End If
Text4.SetFocus
End Sub
Private Sub Combo1_Click()
Combo1_Change
End Sub
Private Sub Command1_Click()
Dim flag As Integer
flag = 0
If Text1.Text = "" Then
MsgBox "Please Select the Product That you want", vbInformation, "EBilling"
ElseIf Text4.Text = "" Then
MsgBox "Please Enter the quantity of product that you want!", vbOKOnly +
vbInformation, "EBilling"
Text4.SetFocus
45
7/29/2019 e Billing Report
46/73
ElseIf IsNumeric(Text4.Text) = False Then
MsgBox "Enter Quantity, numeric only!", vbExclamation, "EBilling"
Text4.SetFocus
ElseIf Val(Text4.Text) > Val(Text3.Text) Then
MsgBox "The Quantity you have selected is not available!", vbExclamation,
"EBilling"
Text4.SetFocus
Else
If bill_frm.Adodc2.Recordset.State = adStateOpen Then
bill_frm.Adodc2.Recordset.Close
bill_frm.Adodc2.Recordset.Open "select *from temp_Bill_Details",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic,
adLockOptimistic
bill_frm.Enabled = TrueIf bill_frm.Adodc2.Recordset.RecordCount = 0 Then GoTo abc:
bill_frm.Adodc2.Recordset.MoveFirst
While bill_frm.Adodc2.Recordset.EOF = False
If bill_frm.Adodc2.Recordset("Product_Name") = Text1.Text Then
If MsgBox("The Product that you want is already in the list.Do you want to
change it's Quantity..?", vbQuestion + vbYesNo, "E-Billing") = vbYes Then
bill_frm.Adodc2.Recordset("Quantity") = Val(Text4.Text)
bill_frm.Adodc2.Recordset("Amount") = Val(Text2.Text * Text4.Text)
bill_frm.Adodc2.Recordset.Update
flag = 1
Else
Unload Me
flag = 1
End If
End If
bill_frm.Adodc2.Recordset.MoveNext
Wend
abc:If flag = 0 Then
bill_frm.Adodc2.Recordset.AddNew
bill_frm.Adodc2.Recordset("Product_Name") = Text1.Text
bill_frm.Adodc2.Recordset("Rate") = Val(Text2.Text)
bill_frm.Adodc2.Recordset("Quantity") = Val(Text4.Text)
bill_frm.Adodc2.Recordset("Amount") = Val(Text2.Text * Text4.Text)
46
7/29/2019 e Billing Report
47/73
bill_frm.Adodc2.Recordset.Update
End If
bill_frm.remove_prd.Enabled = True
If bill_frm.Adodc2.Recordset.State = adStateOpen Then
bill_frm.Adodc2.Recordset.Close
bill_frm.Adodc2.Recordset.Open "select sum(amount) from temp_bill_details",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic,
adLockOptimistic
bill_frm.Label6.Caption = bill_frm.Adodc2.Recordset(0)
Dim sql As String
sql = "select *from temp_Bill_Details"
bill_frm.Adodc2.CommandType = adCmdText
bill_frm.Adodc2.RecordSource = sql
bill_frm.Adodc2.RefreshSet bill_frm.DataGrid1.DataSource = bill_frm.Adodc2
Unload Me
End If
End Sub
Private Sub Command2_Click()
bill_frm.Enabled = True
Unload Me
End Sub
Private Sub Form_Load()
Dim abc As String
If frmLogin.txtstore_id.Text = "0" Then
abc = "select distinct Prod_Type from Product_List order by Prod_Type"
Else
abc = "select distinct Prod_Type from Product_List where store_id='" &
frmLogin.txtstore_id.Text & "' order by Prod_Type"
End If
Combo1.ClearCombo1.AddItem "ALL"
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenStatic, adLockReadOnly
47
7/29/2019 e Billing Report
48/73
While Adodc1.Recordset.EOF = False
Combo1.AddItem Adodc1.Recordset("Prod_Type")
Adodc1.Recordset.MoveNext
Wend
Adodc1.Refresh
End Sub
Private Sub DisplayRecord()
Dim sql As String
sql = "select Prod_Name,Rate,Qty from Product_List where Prod_Name='" &
List1.Text & "' "
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenStatic, adLockReadOnly
If Adodc1.Recordset.RecordCount > 0 Then
Text1.Text = Adodc1.Recordset("Prod_Name")Text2.Text = Adodc1.Recordset("Rate")
Text3.Text = Adodc1.Recordset("Qty")
Else
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End If
End Sub
Private Sub List1_Click()
DisplayRecord
Text4.SetFocus
End Sub
FrmFind_bill
Private Sub Calendar1_Click()Text3.Text = Calendar1.Value
End Sub
Private Sub Check1_Click()
If Check1.Value = 1 Then
Label3.Visible = True
48
7/29/2019 e Billing Report
49/73
Text2.Visible = True
Text2.Text = ""
Text2.SetFocus
Else
Label3.Visible = False
Text2.Visible = False
Text2.Text = ""
End If
CallCheck
End Sub
Private Sub CallCheck()
If Check1.Value = 1 And Check2.Value = 1 And Text2.Text "" And Text3.Text
"" Then
find_bill.Enabled = True
ElseIf Check1.Value = 1 And Text2.Text "" And Check2.Value = 0 Then
find_bill.Enabled = True
ElseIf Check2.Value = 1 And Text3.Text "" And Check1.Value = 0 Then
find_bill.Enabled = True
Else
find_bill.Enabled = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
Label4.Visible = True
Label5.Visible = True
Text3.Visible = True
Text3.Text = ""
Calendar1.Visible = True
Else
Label4.Visible = False
Label5.Visible = False
Text3.Visible = False
Text3.Text = ""Calendar1.Visible = False
End If
CallCheck
End Sub
Private Sub get_bill1_Click()
49
7/29/2019 e Billing Report
50/73
If IsNumeric(Text1.Text) = False Then
MsgBox "Enter the bill number numeric only..!"
Text1.SetFocus
Exit Sub
End If
If bill_frm.Adodc1.Recordset.State = adStateOpen Then
bill_frm.Adodc1.Recordset.Close
bill_frm.Adodc1.Recordset.Open "select *from bill_info where bill_no=" &
Text1.Text, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS",
adOpenDynamic, adLockOptimistic
If bill_frm.Adodc1.Recordset.RecordCount = 0 Then
MsgBox "No bill found..!", vbExclamation, "E-Billing"
Text1.SetFocus
Else
bill_frm.Text1.Text = bill_frm.Adodc1.Recordset("bill_no")
bill_frm.Text2.Text = bill_frm.Adodc1.Recordset("bill_date")bill_frm.Text3.Text = bill_frm.Adodc1.Recordset("cust_name")
bill_frm.Text4.Text = bill_frm.Adodc1.Recordset("cont_no")
bill_frm.Label6.Caption = bill_frm.Adodc1.Recordset("total_amnt")
Dim sql As String
sql = "select *from temp_Bill_Details"
bill_frm.Adodc2.CommandType = adCmdText
bill_frm.Adodc2.RecordSource = sql
bill_frm.Adodc2.Refresh
Set bill_frm.DataGrid1.DataSource = bill_frm.Adodc2
If bill_frm.Adodc3.Recordset.State = adStateOpen Then
bill_frm.Adodc3.Recordset.Close
bill_frm.Adodc3.Recordset.Open "select *from bill_details where bill_no=" &
Text1.Text, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS",
adOpenDynamic, adLockOptimistic
While bill_frm.Adodc3.Recordset.EOF = False
bill_frm.Adodc2.Recordset.AddNewbill_frm.Adodc2.Recordset("Product_name") =
bill_frm.Adodc3.Recordset("Prod_nm")
bill_frm.Adodc2.Recordset("Rate") = bill_frm.Adodc3.Recordset("Rate")
bill_frm.Adodc2.Recordset("Quantity") = bill_frm.Adodc3.Recordset("qty")
bill_frm.Adodc2.Recordset("Amount") = bill_frm.Adodc3.Recordset("amount")
bill_frm.Adodc2.Recordset.Update
50
7/29/2019 e Billing Report
51/73
bill_frm.Adodc3.Recordset.MoveNext
Wend
bill_frm.Enabled = True
Unload Me
bill_frm.cmddel.Visible = True
bill_frm.new_bill.Visible = True
bill_frm.print_bill.Visible = True
bill_frm.cmdclose.Visible = True
End If
End Sub
Private Sub find_bill_Click()
Dim abc As String
If frmLogin.txtstore_id.Text = "0" Then
If Text2.Text "" And Text3.Text "" Then
abc = "select *from bill_info where cust_name='" & Text2.Text & "' and
bill_date='" & Text3.Text & "'"
ElseIf Text2.Text = "" Thenabc = "select *from bill_info where bill_date='" & Text3.Text & "'"
Else
abc = "select *from bill_info where cust_name='" & Text2.Text & "'"
End If
Else
If Text2.Text "" And Text3.Text "" Then
abc = "select *from bill_info where cust_name='" & Text2.Text & "' and
bill_date='" & Text3.Text & "' and store_id ='" & frmLogin.txtstore_id.Text & "'"
ElseIf Text2.Text = "" Then
abc = "select *from bill_info where bill_date='" & Text3.Text & "' and store_id
='" & frmLogin.txtstore_id.Text & "'"
Else
abc = "select *from bill_info where cust_name='" & Text2.Text & "' and store_id
='" & frmLogin.txtstore_id.Text & "'"
End If
End If
If bill_frm.Adodc1.Recordset.State = adStateOpen Then
bill_frm.Adodc1.Recordset.Closebill_frm.Adodc1.Recordset.Open abc, "Provider=SQLNCLI.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data
Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
If bill_frm.Adodc1.Recordset.RecordCount = 0 Then
Label6.Visible = False
51
7/29/2019 e Billing Report
52/73
Label7.Visible = False
Label8.Visible = False
Label9.Visible = False
close1.Visible = True
get_bill2.Visible = False
close2.Visible = False
Me.Height = 5640
Me.Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
MsgBox "No bill found..!", vbExclamation, "E-Billing"
ElseIf bill_frm.Adodc1.Recordset.RecordCount = 1 Then
bill_frm.Text1.Text = bill_frm.Adodc1.Recordset("bill_no")
bill_frm.Text2.Text = bill_frm.Adodc1.Recordset("bill_date")
bill_frm.Text3.Text = bill_frm.Adodc1.Recordset("cust_name")
bill_frm.Text4.Text = bill_frm.Adodc1.Recordset("cont_no")
bill_frm.Label6.Caption = bill_frm.Adodc1.Recordset("total_amnt")
Dim sql As String
sql = "select *from temp_Bill_Details"
bill_frm.Adodc2.CommandType = adCmdText
bill_frm.Adodc2.RecordSource = sql
bill_frm.Adodc2.Refresh
Set bill_frm.DataGrid1.DataSource = bill_frm.Adodc2
If bill_frm.Adodc3.Recordset.State = adStateOpen Then
bill_frm.Adodc3.Recordset.Close
bill_frm.Adodc3.Recordset.Open "select *from bill_details where bill_no=" &
bill_frm.Text1.Text, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS",
adOpenDynamic, adLockOptimistic
While bill_frm.Adodc3.Recordset.EOF = False
bill_frm.Adodc2.Recordset.AddNew
bill_frm.Adodc2.Recordset("Product_name") =
bill_frm.Adodc3.Recordset("Prod_nm")
bill_frm.Adodc2.Recordset("Rate") = bill_frm.Adodc3.Recordset("Rate")
bill_frm.Adodc2.Recordset("Quantity") = bill_frm.Adodc3.Recordset("qty")bill_frm.Adodc2.Recordset("Amount") = bill_frm.Adodc3.Recordset("amount")
bill_frm.Adodc2.Recordset.Update
bill_frm.Adodc3.Recordset.MoveNext
Wend
bill_frm.Enabled = True
Unload Me
52
7/29/2019 e Billing Report
53/73
bill_frm.cmddel.Visible = True
bill_frm.new_bill.Visible = True
bill_frm.print_bill.Visible = True
bill_frm.cmdclose.Visible = True
Else
If Adodc1_findbill.Recordset.State = adStateOpen Then
Adodc1_findbill.Recordset.Close
Adodc1_findbill.Recordset.Open "truncate table temp_bill_info",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenStatic,
adLockReadOnly
Dim pqr As String
pqr = "select *from temp_Bill_info"
Adodc1_findbill.CommandType = adCmdText
Adodc1_findbill.RecordSource = pqr
Adodc1_findbill.RefreshSet DataGrid1.DataSource = Adodc1_findbill
DataGrid1.Visible = True
While bill_frm.Adodc1.Recordset.EOF = False
Adodc1_findbill.Recordset.AddNew
Adodc1_findbill.Recordset("bill_no") = bill_frm.Adodc1.Recordset("bill_no")
Adodc1_findbill.Recordset("bill_date") = bill_frm.Adodc1.Recordset("bill_date")
Adodc1_findbill.Recordset("cust_name") =
bill_frm.Adodc1.Recordset("cust_name")
Adodc1_findbill.Recordset("cont_no") = bill_frm.Adodc1.Recordset("cont_no")
Adodc1_findbill.Recordset("total_amnt") =
bill_frm.Adodc1.Recordset("total_amnt")
Adodc1_findbill.Recordset.Update
bill_frm.Adodc1.Recordset.MoveNext
Wend
Adodc1_findbill.Recordset.MoveFirst
Label6.Visible = True
Label7.Visible = True
Label7.Caption = Adodc1_findbill.Recordset.RecordCountLabel8.Visible = True
Label9.Visible = True
close1.Visible = False
get_bill2.Visible = True
close2.Visible = True
Me.Height = 9030
53
7/29/2019 e Billing Report
54/73
Me.Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
End If
End Sub
Private Sub close1_Click()
If Adodc1_findbill.Recordset.State = adStateOpen Then
Adodc1_findbill.Recordset.Close
Adodc1_findbill.Recordset.Open "truncate table temp_bill_info",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenStatic,
adLockReadOnly
bill_frm.Enabled = True
bill_frm.Text1.Text = ""
bill_frm.Text2.Text = ""
bill_frm.Text3.Text = ""
bill_frm.Text4.Text = ""
bill_frm.Label6.Caption = "0"
Unload MeEnd Sub
Private Sub get_bill2_Click()
Text1.Text = Adodc1_findbill.Recordset("bill_no")
If Text1.Text = "" Then
MsgBox "Please Select one Record from list..!To Select Record click on the row..!",
vbExclamation, "E - Billing"
Else
If Adodc1_findbill.Recordset.State = adStateOpen Then
Adodc1_findbill.Recordset.Close
Adodc1_findbill.Recordset.Open "truncate table temp_bill_info",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenStatic,
adLockReadOnly
get_bill1_Click
End If
End Sub
Private Sub close2_Click()If Adodc1_findbill.Recordset.State = adStateOpen Then
Adodc1_findbill.Recordset.Close
Adodc1_findbill.Recordset.Open "truncate table temp_bill_info",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenStatic,
adLockReadOnly
54
7/29/2019 e Billing Report
55/73
bill_frm.Enabled = True
bill_frm.Text1.Text = ""
bill_frm.Text2.Text = ""
bill_frm.Text3.Text = ""
bill_frm.Text4.Text = ""
bill_frm.Label6.Caption = "0"
Unload Me
End Sub
Private Sub DataGrid1_Click()
Text1.Text = Adodc1_findbill.Recordset("bill_no")
End Sub
Private Sub Form_Load()
Me.Height = 5640
Dim abc As String
abc = "select *from bill_details"
bill_frm.Adodc3.CommandType = adCmdTextbill_frm.Adodc3.RecordSource = abc
bill_frm.Adodc3.Refresh
Option1.Value = "0"
Option2.Value = "0"
End Sub
Private Sub Option1_Click()
Frame1.Visible = True
Frame2.Visible = False
Check1.Value = 0
Check2.Value = 0
Text1.SetFocus
Text1.Text = ""
If Text1.Text = "" Then
get_bill1.Enabled = False
Else
get_bill1.Enabled = True
End If
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
Label9.Visible = False
close1.Visible = True
get_bill2.Visible = False
55
7/29/2019 e Billing Report
56/73
close2.Visible = False
Me.Height = 5640
Me.Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
End Sub
Private Sub Option2_Click()
Frame2.Visible = True
Frame1.Visible = False
End Sub
Private Sub Text1_Change()
If Text1.Text = "" Then
get_bill1.Enabled = False
Else
get_bill1.Enabled = True
End If
End Sub
Private Sub Text2_Change()
CallCheck
End Sub
Private Sub Text3_Change()
CallCheck
End Sub
frmutility
Private Sub Command1_Click()
backup.Show
frmutility.Enabled = False
End Sub
Private Sub Command2_Click()
restore.Show
frmutility.Enabled = False
End Sub
Private Sub Command3_Click()
56
7/29/2019 e Billing Report
57/73
change_passwd.Show
frmutility.Enabled = False
End Sub
Private Sub Command4_Click()
store_info.Show
frmutility.Enabled = False
End Sub
Private Sub Command5_Click()
MDIForm1.Enabled = True
MDIForm1.Show
Unload Me
End Sub
Private Sub Form_Load()
If frmLogin.Combo2.Text = "User" Then
Command1.Enabled = FalseCommand2.Enabled = False
Else
Command1.Enabled = True
Command2.Enabled = True
End If
If frmLogin.txtstore_id = 0 And frmLogin.Combo2.Text = "Admin" Then
Command4.Enabled = True
Else
Command4.Enabled = False
End If
End Sub
Backup
Option Explicit
Dim fs As New FileSystemObject
Private Sub Command2_Click()
On Error GoTo myer1
Label3.Visible = True
Label4.Visible = True
ProgressBar1.Visible = True
57
7/29/2019 e Billing Report
58/73
fs.CopyFile App.Path & "\EBilling.sql", "C:\EBilling.bak", False
Timer1.Enabled = True
Timer1_Timer
Exit Sub
myer1:
'>> check the folder if the file alreday exist for overwrite
If Err.Number = 58 Then
If MsgBox("File Allready exist in same name , do you want to overwrite the existing
file ..", vbExclamation + vbYesNo + vbDefaultButton1) = vbYes Then
fs.CopyFile App.Path & "\EBilling.sql", "C:\EBilling.bak", True
Label3.Visible = True
Label4.Visible = True
ProgressBar1.Visible = True
Timer1.Enabled = True
Timer1_Timer
End If
ElseMsgBox "Can not complete backup following error occured : " & Err.Description,
vbCritical
End If
End Sub
Private Sub Command3_Click()
frmutility.Enabled = True
Unload Me
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
'>>> center the form
Me.Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
End Sub
Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1 + 1
Label4.Caption = ProgressBar1.Value & "%"If ProgressBar1.Value = 100 Then
Unload Me
frmutility.Enabled = True
frmutility.Show
MsgBox "Backup Process Completed successfully...!", vbInformation
End If
58
7/29/2019 e Billing Report
59/73
End Sub
Restore
Option Explicit
Dim fs As New FileSystemObject
Private Sub cancel_Click()frmutility.Enabled = True
Unload Me
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
Private Sub restore_Click()
On Error GoTo myer1If fs.FileExists("C:\EBilling.bak") = False Then
MsgBox "Could not find any Backup file to Restore..!", vbCritical, "E-Billing"
Exit Sub
End If
Label1.Visible = True
Label2.Visible = True
ProgressBar1.Visible = True
fs.CopyFile "C:\EBilling.bak", App.Path & "\EBilling.sql", False
Timer1.Enabled = TrueTimer1_Timer
Exit Sub
myer1:
'>> check the folder if the file alreday exist warn for overwrite
If Err.Number = 58 Then
If MsgBox("File Allready exist in same name , do you want to overwrite the existing
file ..", vbExclamation + vbYesNo + vbDefaultButton1) = vbYes Then
fs.CopyFile "C:\EBilling.bak", App.Path & "\EBilling.sql", True
Label1.Visible = True
Label2.Visible = TrueProgressBar1.Visible = True
Timer1.Enabled = True
Timer1_Timer
End If
Else
59
7/29/2019 e Billing Report
60/73
MsgBox "Can not complete backup following error occured : " & Err.Description,
vbCritical
End If
End Sub
Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1 + 1
Label2.Caption = ProgressBar1.Value & "%"
If ProgressBar1.Value = 100 Then
Unload Me
frmutility.Enabled = True
frmutility.Show
MsgBox "Database Restored successfully...!", vbInformation
End If
End Sub
Change_passwd
Private Sub cmdok_Click()
If Text1.Text = "" Then
MsgBox "Please enter your old Password..!", vbExclamation, "E-Billing"
Text1.SetFocus
Else
Dim pqr As String
pqr = "select passwd from log_in where user_nm='" & frmLogin.Combo2.Text & "'"
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open pqr, "Provider=SQLNCLI.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data
Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
If Text1.Text Adodc1.Recordset("passwd") Then
MsgBox "Your old password is incorrect..!", vbExclamation, "E-billing"Text1.SetFocus
ElseIf Text2.Text = "" Then
MsgBox "Please enter your new Password..!", vbExclamation, "E-Billing"
Text2.SetFocus
60
7/29/2019 e Billing Report
61/73
ElseIf Text2.Text Text3.Text Then
MsgBox "Confirm Password doesn't match.Please re-type your new password..!",
vbExclamation, "E-Billing"
Text3.SetFocus
Else
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open pqr, "Provider=SQLNCLI.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data
Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
Adodc1.Recordset("passwd") = Text2.Text
Adodc1.Recordset.Update
MsgBox "Password Changed Successfully..!", vbInformation, "Success"
frmutility.Enabled = True
Unload Me
End If
End If
End Sub
Private Sub cancel_Click()
frmutility.Enabled = True
Unload Me
End Sub
Store_info
Option Explicit
Dim newSID As String
Dim addedit As String
Private Sub Command2_Click()
If Adodc1.Recordset.AbsolutePosition > 1 Then
Adodc1.Recordset.MovePrevious
Else
MsgBox "First Record ..", vbInformation
Adodc1.Recordset.MoveFirstEnd If
End Sub
Private Sub cmdcancel_Click()
first.Visible = True
movpre.Visible = True
61
7/29/2019 e Billing Report
62/73
movnext.Visible = True
last.Visible = True
cmdnew.Visible = True
cmdedit.Visible = True
cmddel.Visible = True
cmdcls.Visible = True
cmdsave.Visible = False
cmdcancel.Visible = False
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open "select *from store_info", "Provider=SQLNCLI.1;Integrated
Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data
Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
display_store
Text2.Locked = True
Text3.Locked = True
Text4.Locked = True
Text5.Locked = TrueText6.Locked = True
Frame1.Caption = ""
End Sub
Private Sub cmdcls_Click()
frmutility.Enabled = True
Unload Me
End Sub
Private Sub cmddel_Click()
If MsgBox("Are you sure, you want to delete all the Store details..? The Products that
the store contains will also be deleted...", vbQuestion + vbYesNo, "E-Billing") = vbYes
Then
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open "select * from store_info where store_ID=" &
Val(Text1.Text), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS",
adOpenDynamic, adLockOptimistic
Adodc1.Recordset.deleteAdodc1.Refresh
Text7.Text = Text1.Text
Frame1.Caption = ""
If Adodc2.Recordset.State = adStateOpen Then Adodc2.Recordset.Close
62
7/29/2019 e Billing Report
63/73
Adodc2.Recordset.Open "delete from Product_list where store_ID=" &
Val(Text7.Text), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS",
adOpenDynamic, adLockOptimistic
Adodc2.Refresh
MsgBox "Operation Completed Successfully...!", vbInformation, "Success!"
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open "select *from store_info",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic,
adLockOptimistic
display_store
End If
End Sub
Private Sub cmdedit_Click()
Text2.Locked = FalseText3.Locked = False
Text4.Locked = False
Text5.Locked = False
Text6.Locked = False
first.Visible = False
movpre.Visible = False
movnext.Visible = False
last.Visible = False
cmdnew.Visible = False
cmdedit.Visible = False
cmddel.Visible = False
cmdcls.Visible = False
cmdsave.Visible = True
cmdcancel.Visible = True
Frame1.Caption = "Please Enter The Information Below"
addedit = "EDIT"
End Sub
Private Sub cmdnew_Click()Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
63
7/29/2019 e Billing Report
64/73
Text2.Locked = False
Text3.Locked = False
Text4.Locked = False
Text5.Locked = False
Text6.Locked = False
first.Visible = False
movpre.Visible = False
movnext.Visible = False
last.Visible = False
cmdnew.Visible = False
cmdedit.Visible = False
cmddel.Visible = False
cmdcls.Visible = False
cmdsave.Visible = True
cmdcancel.Visible = True
addedit = "ADD"
Frame1.Caption = "Please Enter The Information Below"
'generate id automatically for new storeIf Adodc1.Recordset.RecordCount
7/29/2019 e Billing Report
65/73
MsgBox "Enter Contact No. Numeric only...!", vbExclamation, "E-Billing"
Else
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open "select *from store_info",
"Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic,
adLockOptimistic
Adodc1.Recordset.AddNew
Adodc1.Recordset("store_id") = Text1.Text
Adodc1.Recordset("store_nm") = Text2.Text
Adodc1.Recordset("addr") = Text3.Text
Adodc1.Recordset("city") = Text4.Text
Adodc1.Recordset("pin") = Text5.Text
Adodc1.Recordset("phno") = Text6.Text
Adodc1.Recordset.Update
MsgBox "Record saved Successfully..!", vbInformation, "Operation Successful"
first.Visible = True
movpre.Visible = True
movnext.Visible = True
last.Visible = True
cmdnew.Visible = True
cmdedit.Visible = True
cmddel.Visible = True
cmdcls.Visible = True
cmdsave.Visible = False
cmdcancel.Visible = False
Text2.Locked = True
Text3.Locked = True
Text4.Locked = True
Text5.Locked = True
Text6.Locked = True
Frame1.Caption = ""
display_storeEnd If
Else
'save the updated store information
65
7/29/2019 e Billing Report
66/73
If Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Or
Text6.Text = "" Then
MsgBox "Please enter the information in all the Fields..!", vbExclamation, "E-
Billing"
ElseIf IsNumeric(Text5.Text) = False Then
MsgBox "Enter Pin code Numeric only...!", vbExclamation, "E-Billing"
ElseIf IsNumeric(Text6.Text) = False Then
MsgBox "Enter Contact No. Numeric only...!", vbExclamation, "E-Billing"
Else
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open "select *from store_info where store_id=" &
Val(Text1.Text), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS",
adOpenDynamic, adLockOptimistic
Adodc1.Recordset("store_nm") = Text2.Text
Adodc1.Recordset("addr") = Text3.Text
Adodc1.Recordset("city") = Text4.Text
Adodc1.Recordset("pin") = Text5.Text
Adodc1.Recordset("phno") = Text6.Text
Adodc1.Recordset.Update
Adodc1.Refresh
MsgBox "Record Updated Successfully..!", vbInformation, "Operation
Successful"
first.Visible = True
movpre.Visible = True
movnext.Visible = True
last.Visible = True
cmdnew.Visible = True
cmdedit.Visible = True
cmddel.Visible = True
cmdcls.Visible = True
cmdsave.Visible = Falsecmdcancel.Visible = False
Text2.Locked = True
Text3.Locked = True
Text4.Locked = True
Text5.Locked = True
Text6.Locked = True
66
7/29/2019 e Billing Report
67/73
display_store
End If
End If
End Sub
Private Sub first_Click()
If Adodc1.Recordset.RecordCount 0 Then
Text1.Text = Adodc1.Recordset("store_id")
Text2.Text = Adodc1.Recordset("store_nm")
Text3.Text = Adodc1.Recordset("addr")
Text4.Text = Adodc1.Recordset("city")
Text5.Text = Adodc1.Recordset("pin")
Text6.Text = Adodc1.Recordset("phno")
Else
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""End If
If Text1.Text = "0" Then
cmddel.Visible = False
Else:
cmddel.Visible = True
67
7/29/2019 e Billing Report
68/73
End If
End Sub
Private Sub last_Click()
If Adodc1.Recordset.RecordCount 1 Then
Adodc1.Recordset.MovePrevious
display_store
Else
MsgBox "First Record ..", vbInformation
Adodc1.Recordset.MoveFirst
display_store
End If
End Sub
FrmChange_store
Private Sub cmdchange_Click()
If Combo1.Text = "" Then
MsgBox "Please select the store from list..!", vbExclamation, "E-Billing"ElseIf Label3.Caption = Combo1.Text Then
MsgBox "You have been already login to this store..!", vbCritical, "EBilling"
Else
Combo1_Change
MDIForm1.Enabled = True
MDIForm1.Label2 = Combo1.Text
68
7/29/2019 e Billing Report
69/73
Unload Me
MsgBox "Operation completed Successfully..!", vbInformation, "Success"
End If
End Sub
Private Sub cmdclose_Click()
MDIForm1.Enabled = True
Unload Me
End Sub
Private Sub Combo1_Change()
frmLogin.Combo3.Text = Combo1.Text
Dim sql As String
sql = "select store_id from store_info where store_nm='" & frmLogin.Combo3.Text &
"'"
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;PersistSecurity Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
If Adodc1.Recordset.RecordCount > 0 Then
frmLogin.txtstore_id.Text = Adodc1.Recordset("store_id")
Else
frmLogin.txtstore_id.Text = ""
End If
End Sub
Private Sub Combo1_Click()
Combo1_Change
End Sub
Private Sub Form_Load()
'Enter store names in store name combo box to see the available stores
Combo1.Clear
Dim abc As String
abc = "select Store_nm from Store_info order by store_id"
If Adodc1.Recordset.State = adStateOpen Then Adodc1.Recordset.Close
Adodc1.Recordset.Open abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist
Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-
176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic
While Adodc1.Recordset.EOF = False
Combo1.AddItem Adodc1.Recordset("store_nm")
69
7/29/2019 e Billing Report
70/73
Adodc1.Recordset.MoveNext
Wend
Adodc1.Refresh
Label3.Caption = frmLogin.Combo3.Text
End Sub
Frmabout_us
Private Sub close_Click()
MDIForm1.Enabled = True
Unload Me
End Sub
70
7/29/2019 e Billing Report
71/73
SCREEN SHOT OF REPORT
71
7/29/2019 e Billing Report
72/73
CONCLUSION AND FUTURE ENHANCEMENT
This project will be developed to fulfill user and business requirement;
however there are lots of scopes to improve the performance of the eBilling
System in the area of user interface, database performance, and queryprocessing time.
Future enhancements for this project are as follows:
Integration with travel agent through Web Services
Electronic Data Interchange (EDI) system between banks, other credit
verification agency and their vendors
In the area of data security and system security.
Provide more online tips and help.
To optimize the query which is embedded in the system.
We can provide more ways for payment of bill.
We can build this project compatible for multiuser environment.
72
7/29/2019 e Billing Report
73/73
BIBLIOGRAPHY
WEBSITES:-
HTTP://WWW.GOOGLE.COM
HTTP://WWW.MICROSOFT.COM
HTTP://WWW.CODEPROJECT.COM
HTTP://WWW.MSDN.COM.
HTTP://WWW.VB123.COM
HTTP://WWW.VBCODE.COM
HTTP://WWW.SQLTUNER.COM
BOOKS:-
MASTERING VISUAL BASIC 6 (PAPERBACK)
MASTERING VISUAL BASIC .NET (PAPERBACK)
VISUAL BASIC BLACK BOOK (PAPERBACK)
SQL BIBLE, 2ND EDITION (PAPERBACK)
DATABASE DEVELOPMENT IN VISUAL BASIC
http://www.google.com/http://www.microsoft.com/http://www.codeproject.com/http://www.msdn.com./http://www.msdn.com./http://www.vb123.com/http://www.vbcode.com/http://www.sqltuner.com/http://www.google.com/http://www.microsoft.com/http://www.codeproject.com/http://www.msdn.com./http://www.vb123.com/http://www.vbcode.com/http://www.sqltuner.com/