E-Billing Project Report Overview
E-Billing Project Report Overview
E-Billing
Submitted by, Enrollment No.
0802017 0802022 0802023 0802024
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)
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 for Diploma in Computer Engineering from Government Polytechnic, Mumbai. Under the guidance of respective project guide, in the year 2010-2011.
Enrollment No.
0802017 0802022 0802023 0802024 Date: / /2011
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.
ACKNOWLEDGEMENT
The work is an accomplishment for the project works under the invaluable guidance of [Link] of department of Computer Engineering. Behind every success there is a source of inspiration. In our case, that source was our HOD [Link] 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.
TABLE OF CONTENTS
Sr No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Contents Description of the Current System Limitation of the Current System Proposed System (Our System) Advantages of Proposed System Hardware and Software Requirements Entity-Relationship Diagram Data Flow Diagram Program List Table List Screenshot of Forms System Coding Screenshots of Report Conclusion and Future Enhancement Bibliography
PROPOSED SYSTEM
Customer comes in store and order for some [Link] 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 multiplication of quantity and rate of the [Link] 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 [Link] simple clicking and editing text transactions can complete easily and [Link] 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 our project 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.
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.
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.
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
Rapid application development tool. Simplified packaging and deployment. Powerful & easy data access. Improved coding. Easy to design form.
Easy to use and deployment. Supported by windows OS. Centralized management. Reliability. Automating Tasks. Scalability. Provide more security.
10
ENTITY-RELATIONSHIP DIAGRAM
11
12
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, restore database, 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
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
TABLE LIST
Database Name: - [Link]
1.
Bill_Details:Column Name Bill_No Prod_nm Rate Qty Amount Data Type Primary Key Foreign Key int No No varchar No No float No No int No No float No No Size 70 -
2.
Bill_Info:Column Name Bill_No Bill_Date Cust_Name Cont_No Total_Amnt store_id Data Type Primary Key Foreign Key int Yes No varchar No No varchar No No varchar No No float No No int No No Size 15 30 13 -
3.
Log_in:Column Name user_nm passwd Data Type Primary Key Foreign Key varchar No No varchar No No Size 25 25
15
4.
Product_List:Column Name Prod_ID Prod_Type Prod_Name Rate Qty Store_ID Data Type Primary Key Foreign Key int Yes No varchar No No varchar No No float No No int No No int No No Size 30 70 -
5.
Store_Info:Column Name store_id Store_nm Addr City Pin Phno Data Type Primary Key Foreign Key int Yes No varchar No No varchar No No varchar No No int No No varchar No No Size 25 75 20 13
6.
Temp_Bill_Details:Column Name Product_Name Rate Quantity Amount Data Type Primary Key Foreign Key Size varchar No No 70 float No No int No No float No No -
16
7.
Temp_Bill_Info:Column Name Bill_No Bill_Date Cust_Name Cont_No Total_Amnt Data Type Primary Key Foreign Key int No No varchar No No varchar No No varchar No No float No No Size 15 30 13 -
17
SCREENSHOT OF FORMS
Frmsplash: -
Frmlogin: -
18
MDIForm1: -
Product_List: -
19
Bill_frm: -
20
Bill_product: -
21
FrmFind_bill: -
22
Frmutility: -
Backup: -
23
Restore: -
Change_passwd: -
24
Store_info: -
25
FrmChange_store: -
Frmabout_us: -
26
SYSTEM COADING
frmsplash
Private Sub Timer1_Timer() [Link] = ProgressBar1 + 1 [Link] = [Link] & "%" If [Link] = 100 Then Unload Me [Link] End If End Sub Private Sub Timer2_Timer() If [Link] = True Then [Link] = False Else [Link] = 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 [Link] = "" Then MsgBox "Please select a Store Name from list..!", vbExclamation, "E-Billing" ElseIf [Link] = "" Then MsgBox "Please select User Type from list..!", vbExclamation, "E-Billing"
27
ElseIf [Link] = "" Then MsgBox "Please Enter your Password..!", vbExclamation, "E-Billing" Else Dim pqr As String pqr = "select passwd from log_in where user_nm='" & [Link] & "'" If [Link] = adStateOpen Then [Link] [Link] pqr, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic If txtPassword = [Link]("passwd") Then [Link] [Link] Else MsgBox "Invalid Password, try again!", vbCritical, "Login Error" [Link] End If End If End Sub Private Sub Combo1_Change() [Link] = [Link] Dim sql As String sql = "select store_id from store_info where store_nm='" & [Link] & "'" If [Link] = adStateOpen Then [Link] [Link] sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic If [Link] > 0 Then txtstore_id.Text = [Link]("store_id") Else txtstore_id.Text = "" End If End Sub Private Sub Combo1_Click() Combo1_Change End Sub Private Sub Combo2_Change() [Link] = ""
28
[Link] 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 = "" [Link] [Link] [Link] = "" Dim abc As String abc = "select Store_nm from Store_info order by store_id" If [Link] = adStateOpen Then [Link] [Link] abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic While [Link] = False [Link] [Link]("store_nm") [Link] Wend [Link] [Link] "Admin" [Link] "User" End Sub
MDIForm1
Private Sub MDIForm_Activate() [Link] = [Link] End Sub Private Sub Toolbar1_ButtonClick(ByVal Button As [Link]) If [Link] = "exit" Then End ElseIf [Link] = "product_list" Then product_list.Show
29
ElseIf [Link] = "bill" Then bill_frm.Show ElseIf [Link] = "utilities" Then [Link] ElseIf [Link] = "change_store" Then frmchange_store.Show ElseIf [Link] = "logout" Then If MsgBox("Are You Sure You want to Logout?", vbYesNo + vbQuestion, "Logout") = vbYes Then Unload Me [Link] frmLogin.txtstore_id.Text = "" [Link] [Link] [Link] = "" Dim abc As String abc = "select Store_nm from Store_info order by store_id" If [Link] = adStateOpen Then [Link] [Link] abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic While [Link] = False [Link] [Link]("store_nm") [Link] Wend [Link] [Link] "Admin" [Link] "User" Else: [Link] = True End If Exit Sub ElseIf [Link] = "about_us" Then frmabout_us.Show End If [Link] = False End Sub
30
Product_List
Option Explicit Dim addedit As String Dim newPID As Integer Private Sub cancel_Click() [Link] = False [Link] = False [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False DisplayRecord End Sub Private Sub Combo1_Change() Dim sql As String If frmLogin.txtstore_id.Text = "0" Then If [Link] = "ALL" Then sql = "select Prod_Name from Product_List order by prod_ID" Else sql = "select Prod_Name from Product_List where Prod_Type='" & [Link] & "' order by Prod_ID" End If Else If [Link] = "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='" & [Link] & "' and store_id='" & frmLogin.txtstore_id.Text & "' order by Prod_ID" End If End If [Link]
31
If [Link] = adStateOpen Then [Link] [Link] sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic While [Link] = False [Link] [Link]("prod_Name") [Link] Wend [Link] If [Link] > 0 Then [Link] = 0 DisplayRecord End If End Sub Private Sub Combo1_Click() Combo1_Change End Sub Private Sub cmdnew_Click() [Link] = True [Link] = True [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = True [Link] = True [Link] = True [Link] = True [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "" addedit = "ADD"
32
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 [Link] If [Link] = adStateOpen Then [Link] [Link] abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic While [Link] = False [Link] [Link]("Prod_Type") [Link] Wend [Link] 'generate id automatically for new product If [Link] <= 0 Then [Link] = 1 Else If [Link] = adStateOpen Then [Link] [Link] "select max(prod_id) +1 from Product_list", "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic newPID = [Link](0) [Link] = newPID End If End Sub Private Sub save_Click() 'check all the conditions in text box for new product If addedit = "ADD" Then If [Link] = "" Or [Link] = "" Or [Link] = "" Or [Link] = "" Then MsgBox "Please Enter the values in all the Fields...!", vbExclamation ElseIf IsNumeric([Link]) = False Then MsgBox "Enter Rate Numeric only...!", vbExclamation, "E-Billing"
33
ElseIf IsNumeric([Link]) = False Then MsgBox "Enter Quantity Numeric only...!", vbExclamation, "E-Billing" 'all conditions are true now save the record Else If [Link] = adStateOpen Then [Link] [Link] "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 [Link] [Link]("Prod_ID") = [Link] [Link]("Prod_Type") = [Link] [Link]("Prod_Name") = [Link] [Link]("Rate") = Val([Link]) [Link]("Qty") = Val([Link]) [Link]("store_id") = Val(frmLogin.txtstore_id.Text) [Link] [Link] DisplayRecord MsgBox "Record saved successfully", vbInformation, "Success!" Unload Me product_list.Show [Link] = False [Link] = False [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False End If 'check the condition for edit Else If [Link] = "" Or [Link] = "" Or [Link] = "" Or [Link] = "" Then MsgBox "Please Enter the values in all the Fields...!", vbExclamation ElseIf IsNumeric([Link]) = False Then MsgBox "Enter Rate Numeric only", vbExclamation, "E-Billing"
34
ElseIf IsNumeric([Link]) = False Then MsgBox "Enter Quantity Numeric only", vbExclamation, "E-Billing" 'all conditions are true now save the updated record Else: If [Link] = adStateOpen Then [Link] [Link] "select * from Product_List where Prod_ID=" & Val([Link]), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic [Link]("Prod_Type") = [Link] [Link]("Prod_Name") = [Link] [Link]("Rate") = Val([Link]) [Link]("Qty") = Val([Link]) [Link] MsgBox "Record updated successfully", vbInformation, "Success!" Unload Me product_list.Show [Link] = False [Link] = False [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False End If End If End Sub Private Sub delete_Click() If [Link] = "" 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 [Link] = adStateOpen Then [Link]
35
[Link] "select * from Product_List where Prod_ID=" & Val([Link]), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic [Link] [Link] Unload Me product_list.Show MsgBox "Record Deleted Successfully...!", vbInformation, "Success!" DisplayRecord End If End If End Sub Private Sub edit_Click() If [Link] = "" Then MsgBox "Please select a product that you want to edit...!", vbInformation, "Operation Not Allowed" Else: If [Link] = True Then [Link] = True [Link] = True [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = True [Link] = True [Link] = True [Link] = 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" Else abc = "select distinct Prod_Type from Product_List where store_id='" & frmLogin.txtstore_id.Text & "' order by Prod_Type" End If If [Link] = adStateOpen Then [Link]
36
[Link] abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic While [Link] = False [Link] [Link]("Prod_Type") [Link] Wend [Link] End If End If End Sub Private Sub cmdclose_Click() [Link] = True Unload Me [Link] End Sub Private Sub DisplayRecord() Dim sql As String sql = "select * from Product_List where Prod_Name='" & [Link] & "' " If [Link] = adStateOpen Then [Link] [Link] sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic If [Link] > 0 Then [Link] = [Link]("Prod_ID") [Link] = [Link]("Prod_Type") [Link] = [Link]("Prod_Name") [Link] = [Link]("Rate") [Link] = [Link]("Qty") Else [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "" End If End Sub Private Sub Form_Load() Dim abc As String If frmLogin.txtstore_id.Text = "0" Then
37
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 [Link] [Link] "ALL" If [Link] = adStateOpen Then [Link] [Link] abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic While [Link] = False [Link] [Link]("Prod_Type") [Link] Wend [Link] End 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() [Link] = "" [Link] = "" [Link] = "" [Link] = "" new_bill.Visible = True [Link] = True [Link] = True [Link] = False
38
remove_prd.Visible = False [Link] = False [Link] = False print_bill.Visible = False [Link] = False [Link] = "0" If [Link] = adStateOpen Then [Link] [Link] "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 [Link] = True [Link] = True End Sub Private Sub cmdclose_Click() If [Link] = adStateOpen Then [Link] [Link] "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 [Link] = True Unload Me End Sub Private Sub cmddel_Click() If [Link] = "" 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 [Link] = adStateOpen Then [Link] [Link] "select * from bill_info where bill_no=" & Val([Link]), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic [Link] [Link] If [Link] = adStateOpen Then [Link] [Link] "delete from bill_details where bill_no=" & Val([Link]), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security
39
Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic [Link] If [Link] = adStateOpen Then [Link] [Link] "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 [Link] = True [Link] = True [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "0" MsgBox "Bill Deleted Successfully...!", vbInformation, "Success!" End If End Sub Private Sub cmdfind_Click() If [Link] = adStateOpen Then [Link] [Link] "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() [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = [Link] [Link] = False End Sub Private Sub new_bill_Click() [Link] = False [Link] = False [Link] = ""
40
[Link] = Date [Link] = "" [Link] = "" [Link] = "0" print_bill.Visible = False new_bill.Visible = False [Link] = True remove_prd.Visible = True [Link] = True [Link] = True [Link] = False [Link] = False [Link] = False If [Link] = adStateOpen Then [Link] [Link] "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" [Link] = adCmdText [Link] = sql [Link] Set [Link] = Adodc2 If [Link] <= 0 Then [Link] = 1 Else If [Link] = adStateOpen Then [Link] [Link] "select max(bill_no) +1 from bill_info", "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic [Link] = [Link](0) End If Dim abc As String abc = "select *from bill_details" [Link] = adCmdText [Link] = abc [Link] End Sub
41
Private Sub print_bill_Click() Dim strselect As String [Link] [Link] = True [Link] = crptMaximized [Link] = True [Link] = [Link] & "\[Link]" [Link] = "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS" strselect = "{bill_info.Bill_No} = " & [Link] & "" [Link] (strselect) [Link] = 1 End Sub Private Sub remove_prd_Click() If [Link] = 1 Then [Link] = "0" [Link] remove_prd.Enabled = False Else [Link] If bill_frm.[Link] = adStateOpen Then bill_frm.[Link] bill_frm.[Link] "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.[Link] = bill_frm.[Link](0) Dim sql As String sql = "select *from temp_Bill_Details" bill_frm.[Link] = adCmdText bill_frm.[Link] = sql bill_frm.[Link] Set bill_frm.[Link] = bill_frm.Adodc2 End If End Sub Private Sub save_Click() If [Link] = "" Or [Link] = "" Or [Link] = "" Or [Link] = "" Then
42
MsgBox "Please enter values in all the fields..!", vbInformation, "ERROR" ElseIf IsNumeric([Link]) = False Then MsgBox "Enter contact number numeric only..!", vbExclamation, "E-Billing" ElseIf [Link] = "0" Then MsgBox "There are no products in the bill..!", vbInformation, "E-Billing" Else: If [Link] = adStateOpen Then [Link] [Link] "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 [Link] [Link]("bill_no") = [Link] [Link]("bill_date") = [Link] [Link]("cust_name") = [Link] [Link]("cont_no") = [Link] [Link]("total_amnt") = [Link] [Link]("store_id") = frmLogin.txtstore_id.Text [Link] If [Link] = adStateOpen Then [Link] [Link] "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 [Link] = False [Link] [Link]("bill_no") = Val([Link]) [Link]("prod_nm") = [Link]("product_name") [Link]("rate") = [Link]("rate") [Link]("qty") = [Link]("quantity") [Link]("amount") = [Link]("amount") [Link] [Link] Wend Dim prd As String [Link] While [Link] = False
43
prd = "select *from product_list where prod_name='" & [Link]("product_name") & "'" If bill_product.[Link] = adStateOpen Then bill_product.[Link] bill_product.[Link] prd, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic bill_product.[Link]("qty") = Val(bill_product.[Link]("qty") - [Link]("quantity")) bill_product.[Link] [Link] Wend Set [Link] = Adodc2 MsgBox "Bill saved successfully!", vbInformation, "Success" new_bill.Visible = True [Link] = False [Link] = False print_bill.Visible = True remove_prd.Visible = False [Link] = False [Link] = True [Link] = True [Link] = True [Link] = True End If End Sub
Bill_product
Private Sub Combo1_Change() Dim sql As String If frmLogin.txtstore_id.Text = "0" Then If [Link] = "ALL" Then sql = "select Prod_Name from Product_List order by prod_ID" Else sql = "select Prod_Name from Product_List where Prod_Type='" & [Link] & "' order by Prod_ID" End If Else If [Link] = "ALL" Then
44
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='" & [Link] & "' order by Prod_ID" End If End If [Link] If [Link] = adStateOpen Then [Link] [Link] sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenStatic, adLockReadOnly While [Link] = False [Link] [Link]("prod_Name") [Link] Wend [Link] If [Link] > 0 Then [Link] = 0 DisplayRecord End If [Link] End Sub Private Sub Combo1_Click() Combo1_Change End Sub Private Sub Command1_Click() Dim flag As Integer flag = 0 If [Link] = "" Then MsgBox "Please Select the Product That you want", vbInformation, "EBilling" ElseIf [Link] = "" Then MsgBox "Please Enter the quantity of product that you want!", vbOKOnly + vbInformation, "EBilling" [Link]
45
ElseIf IsNumeric([Link]) = False Then MsgBox "Enter Quantity, numeric only!", vbExclamation, "EBilling" [Link] ElseIf Val([Link]) > Val([Link]) Then MsgBox "The Quantity you have selected is not available!", vbExclamation, "EBilling" [Link] Else If bill_frm.[Link] = adStateOpen Then bill_frm.[Link] bill_frm.[Link] "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 = True If bill_frm.[Link] = 0 Then GoTo abc: bill_frm.[Link] While bill_frm.[Link] = False If bill_frm.[Link]("Product_Name") = [Link] Then If MsgBox("The Product that you want is already in the [Link] you want to change it's Quantity..?", vbQuestion + vbYesNo, "E-Billing") = vbYes Then bill_frm.[Link]("Quantity") = Val([Link]) bill_frm.[Link]("Amount") = Val([Link] * [Link]) bill_frm.[Link] flag = 1 Else Unload Me flag = 1 End If End If bill_frm.[Link] Wend abc: If flag = 0 Then bill_frm.[Link] bill_frm.[Link]("Product_Name") = [Link] bill_frm.[Link]("Rate") = Val([Link]) bill_frm.[Link]("Quantity") = Val([Link]) bill_frm.[Link]("Amount") = Val([Link] * [Link])
46
bill_frm.[Link] End If bill_frm.remove_prd.Enabled = True If bill_frm.[Link] = adStateOpen Then bill_frm.[Link] bill_frm.[Link] "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.[Link] = bill_frm.[Link](0) Dim sql As String sql = "select *from temp_Bill_Details" bill_frm.[Link] = adCmdText bill_frm.[Link] = sql bill_frm.[Link] Set bill_frm.[Link] = 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 [Link] [Link] "ALL" If [Link] = adStateOpen Then [Link] [Link] abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenStatic, adLockReadOnly
47
While [Link] = False [Link] [Link]("Prod_Type") [Link] Wend [Link] End Sub Private Sub DisplayRecord() Dim sql As String sql = "select Prod_Name,Rate,Qty from Product_List where Prod_Name='" & [Link] & "' " If [Link] = adStateOpen Then [Link] [Link] sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenStatic, adLockReadOnly If [Link] > 0 Then [Link] = [Link]("Prod_Name") [Link] = [Link]("Rate") [Link] = [Link]("Qty") Else [Link] = "" [Link] = "" [Link] = "" End If End Sub Private Sub List1_Click() DisplayRecord [Link] End Sub
FrmFind_bill
Private Sub Calendar1_Click() [Link] = [Link] End Sub Private Sub Check1_Click() If [Link] = 1 Then [Link] = True
48
[Link] = True [Link] = "" [Link] Else [Link] = False [Link] = False [Link] = "" End If CallCheck End Sub Private Sub CallCheck() If [Link] = 1 And [Link] = 1 And [Link] <> "" And [Link] <> "" Then find_bill.Enabled = True ElseIf [Link] = 1 And [Link] <> "" And [Link] = 0 Then find_bill.Enabled = True ElseIf [Link] = 1 And [Link] <> "" And [Link] = 0 Then find_bill.Enabled = True Else find_bill.Enabled = False End If End Sub Private Sub Check2_Click() If [Link] = 1 Then [Link] = True [Link] = True [Link] = True [Link] = "" [Link] = True Else [Link] = False [Link] = False [Link] = False [Link] = "" [Link] = False End If CallCheck End Sub Private Sub get_bill1_Click()
49
If IsNumeric([Link]) = False Then MsgBox "Enter the bill number numeric only..!" [Link] Exit Sub End If If bill_frm.[Link] = adStateOpen Then bill_frm.[Link] bill_frm.[Link] "select *from bill_info where bill_no=" & [Link], "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic If bill_frm.[Link] = 0 Then MsgBox "No bill found..!", vbExclamation, "E-Billing" [Link] Else bill_frm.[Link] = bill_frm.[Link]("bill_no") bill_frm.[Link] = bill_frm.[Link]("bill_date") bill_frm.[Link] = bill_frm.[Link]("cust_name") bill_frm.[Link] = bill_frm.[Link]("cont_no") bill_frm.[Link] = bill_frm.[Link]("total_amnt") Dim sql As String sql = "select *from temp_Bill_Details" bill_frm.[Link] = adCmdText bill_frm.[Link] = sql bill_frm.[Link] Set bill_frm.[Link] = bill_frm.Adodc2 If bill_frm.[Link] = adStateOpen Then bill_frm.[Link] bill_frm.[Link] "select *from bill_details where bill_no=" & [Link], "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic While bill_frm.[Link] = False bill_frm.[Link] bill_frm.[Link]("Product_name") = bill_frm.[Link]("Prod_nm") bill_frm.[Link]("Rate") = bill_frm.[Link]("Rate") bill_frm.[Link]("Quantity") = bill_frm.[Link]("qty") bill_frm.[Link]("Amount") = bill_frm.[Link]("amount") bill_frm.[Link]
50
bill_frm.[Link] Wend bill_frm.Enabled = True Unload Me bill_frm.[Link] = True bill_frm.new_bill.Visible = True bill_frm.print_bill.Visible = True bill_frm.[Link] = True End If End Sub Private Sub find_bill_Click() Dim abc As String If frmLogin.txtstore_id.Text = "0" Then If [Link] <> "" And [Link] <> "" Then abc = "select *from bill_info where cust_name='" & [Link] & "' and bill_date='" & [Link] & "'" ElseIf [Link] = "" Then abc = "select *from bill_info where bill_date='" & [Link] & "'" Else abc = "select *from bill_info where cust_name='" & [Link] & "'" End If Else If [Link] <> "" And [Link] <> "" Then abc = "select *from bill_info where cust_name='" & [Link] & "' and bill_date='" & [Link] & "' and store_id ='" & frmLogin.txtstore_id.Text & "'" ElseIf [Link] = "" Then abc = "select *from bill_info where bill_date='" & [Link] & "' and store_id ='" & frmLogin.txtstore_id.Text & "'" Else abc = "select *from bill_info where cust_name='" & [Link] & "' and store_id ='" & frmLogin.txtstore_id.Text & "'" End If End If If bill_frm.[Link] = adStateOpen Then bill_frm.[Link] bill_frm.[Link] 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.[Link] = 0 Then [Link] = False
51
[Link] = False [Link] = False [Link] = False [Link] = True get_bill2.Visible = False [Link] = False [Link] = 5640 [Link] ([Link] - Width) / 2, ([Link] - Height) / 2 MsgBox "No bill found..!", vbExclamation, "E-Billing" ElseIf bill_frm.[Link] = 1 Then bill_frm.[Link] = bill_frm.[Link]("bill_no") bill_frm.[Link] = bill_frm.[Link]("bill_date") bill_frm.[Link] = bill_frm.[Link]("cust_name") bill_frm.[Link] = bill_frm.[Link]("cont_no") bill_frm.[Link] = bill_frm.[Link]("total_amnt") Dim sql As String sql = "select *from temp_Bill_Details" bill_frm.[Link] = adCmdText bill_frm.[Link] = sql bill_frm.[Link] Set bill_frm.[Link] = bill_frm.Adodc2 If bill_frm.[Link] = adStateOpen Then bill_frm.[Link] bill_frm.[Link] "select *from bill_details where bill_no=" & bill_frm.[Link], "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic While bill_frm.[Link] = False bill_frm.[Link] bill_frm.[Link]("Product_name") = bill_frm.[Link]("Prod_nm") bill_frm.[Link]("Rate") = bill_frm.[Link]("Rate") bill_frm.[Link]("Quantity") = bill_frm.[Link]("qty") bill_frm.[Link]("Amount") = bill_frm.[Link]("amount") bill_frm.[Link] bill_frm.[Link] Wend bill_frm.Enabled = True Unload Me
52
bill_frm.[Link] = True bill_frm.new_bill.Visible = True bill_frm.print_bill.Visible = True bill_frm.[Link] = True Else If Adodc1_findbill.[Link] = adStateOpen Then Adodc1_findbill.[Link] Adodc1_findbill.[Link] "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.Refresh Set [Link] = Adodc1_findbill [Link] = True While bill_frm.[Link] = False Adodc1_findbill.[Link] Adodc1_findbill.Recordset("bill_no") = bill_frm.[Link]("bill_no") Adodc1_findbill.Recordset("bill_date") = bill_frm.[Link]("bill_date") Adodc1_findbill.Recordset("cust_name") = bill_frm.[Link]("cust_name") Adodc1_findbill.Recordset("cont_no") = bill_frm.[Link]("cont_no") Adodc1_findbill.Recordset("total_amnt") = bill_frm.[Link]("total_amnt") Adodc1_findbill.[Link] bill_frm.[Link] Wend Adodc1_findbill.[Link] [Link] = True [Link] = True [Link] = Adodc1_findbill.[Link] [Link] = True [Link] = True [Link] = False get_bill2.Visible = True [Link] = True [Link] = 9030
53
[Link] ([Link] - Width) / 2, ([Link] - Height) / 2 End If End Sub Private Sub close1_Click() If Adodc1_findbill.[Link] = adStateOpen Then Adodc1_findbill.[Link] Adodc1_findbill.[Link] "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.[Link] = "" bill_frm.[Link] = "" bill_frm.[Link] = "" bill_frm.[Link] = "" bill_frm.[Link] = "0" Unload Me End Sub Private Sub get_bill2_Click() [Link] = Adodc1_findbill.Recordset("bill_no") If [Link] = "" Then MsgBox "Please Select one Record from list..!To Select Record click on the row..!", vbExclamation, "E - Billing" Else If Adodc1_findbill.[Link] = adStateOpen Then Adodc1_findbill.[Link] Adodc1_findbill.[Link] "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.[Link] = adStateOpen Then Adodc1_findbill.[Link] Adodc1_findbill.[Link] "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
bill_frm.Enabled = True bill_frm.[Link] = "" bill_frm.[Link] = "" bill_frm.[Link] = "" bill_frm.[Link] = "" bill_frm.[Link] = "0" Unload Me End Sub Private Sub DataGrid1_Click() [Link] = Adodc1_findbill.Recordset("bill_no") End Sub Private Sub Form_Load() [Link] = 5640 Dim abc As String abc = "select *from bill_details" bill_frm.[Link] = adCmdText bill_frm.[Link] = abc bill_frm.[Link] [Link] = "0" [Link] = "0" End Sub Private Sub Option1_Click() [Link] = True [Link] = False [Link] = 0 [Link] = 0 [Link] [Link] = "" If [Link] = "" Then get_bill1.Enabled = False Else get_bill1.Enabled = True End If [Link] = False [Link] = False [Link] = False [Link] = False [Link] = True get_bill2.Visible = False
55
[Link] = False [Link] = 5640 [Link] ([Link] - Width) / 2, ([Link] - Height) / 2 End Sub Private Sub Option2_Click() [Link] = True [Link] = False End Sub Private Sub Text1_Change() If [Link] = "" 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() [Link] [Link] = False End Sub Private Sub Command2_Click() [Link] [Link] = False End Sub Private Sub Command3_Click()
56
change_passwd.Show [Link] = False End Sub Private Sub Command4_Click() store_info.Show [Link] = False End Sub Private Sub Command5_Click() [Link] = True [Link] Unload Me End Sub Private Sub Form_Load() If [Link] = "User" Then [Link] = False [Link] = False Else [Link] = True [Link] = True End If If frmLogin.txtstore_id = 0 And [Link] = "Admin" Then [Link] = True Else [Link] = False End If End Sub
Backup
Option Explicit Dim fs As New FileSystemObject Private Sub Command2_Click() On Error GoTo myer1 [Link] = True [Link] = True [Link] = True
57
[Link] [Link] & "\[Link]", "C:\[Link]", False [Link] = True Timer1_Timer Exit Sub myer1: '>> check the folder if the file alreday exist for overwrite If [Link] = 58 Then If MsgBox("File Allready exist in same name , do you want to overwrite the existing file ..", vbExclamation + vbYesNo + vbDefaultButton1) = vbYes Then [Link] [Link] & "\[Link]", "C:\[Link]", True [Link] = True [Link] = True [Link] = True [Link] = True Timer1_Timer End If Else MsgBox "Can not complete backup following error occured : " & [Link], vbCritical End If End Sub Private Sub Command3_Click() [Link] = True Unload Me End Sub Private Sub Form_Load() [Link] = False '>>> center the form [Link] ([Link] - Width) / 2, ([Link] - Height) / 2 End Sub Private Sub Timer1_Timer() [Link] = ProgressBar1 + 1 [Link] = [Link] & "%" If [Link] = 100 Then Unload Me [Link] = True [Link] MsgBox "Backup Process Completed successfully...!", vbInformation End If
58
End Sub
Restore
Option Explicit Dim fs As New FileSystemObject Private Sub cancel_Click() [Link] = True Unload Me End Sub Private Sub Form_Load() [Link] = False End Sub Private Sub restore_Click() On Error GoTo myer1 If [Link]("C:\[Link]") = False Then MsgBox "Could not find any Backup file to Restore..!", vbCritical, "E-Billing" Exit Sub End If [Link] = True [Link] = True [Link] = True [Link] "C:\[Link]", [Link] & "\[Link]", False [Link] = True Timer1_Timer Exit Sub myer1: '>> check the folder if the file alreday exist warn for overwrite If [Link] = 58 Then If MsgBox("File Allready exist in same name , do you want to overwrite the existing file ..", vbExclamation + vbYesNo + vbDefaultButton1) = vbYes Then [Link] "C:\[Link]", [Link] & "\[Link]", True [Link] = True [Link] = True [Link] = True [Link] = True Timer1_Timer End If Else
59
MsgBox "Can not complete backup following error occured : " & [Link], vbCritical End If End Sub Private Sub Timer1_Timer() [Link] = ProgressBar1 + 1 [Link] = [Link] & "%" If [Link] = 100 Then Unload Me [Link] = True [Link] MsgBox "Database Restored successfully...!", vbInformation End If End Sub
Change_passwd
Private Sub cmdok_Click() If [Link] = "" Then MsgBox "Please enter your old Password..!", vbExclamation, "E-Billing" [Link] Else Dim pqr As String pqr = "select passwd from log_in where user_nm='" & [Link] & "'" If [Link] = adStateOpen Then [Link] [Link] pqr, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic If [Link] <> [Link]("passwd") Then MsgBox "Your old password is incorrect..!", vbExclamation, "E-billing" [Link] ElseIf [Link] = "" Then MsgBox "Please enter your new Password..!", vbExclamation, "E-Billing" [Link]
60
ElseIf [Link] <> [Link] Then MsgBox "Confirm Password doesn't [Link] re-type your new password..!", vbExclamation, "E-Billing" [Link] Else If [Link] = adStateOpen Then [Link] [Link] pqr, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic [Link]("passwd") = [Link] [Link] MsgBox "Password Changed Successfully..!", vbInformation, "Success" [Link] = True Unload Me End If End If End Sub Private Sub cancel_Click() [Link] = True Unload Me End Sub
Store_info
Option Explicit Dim newSID As String Dim addedit As String Private Sub Command2_Click() If [Link] > 1 Then [Link] Else MsgBox "First Record ..", vbInformation [Link] End If End Sub Private Sub cmdcancel_Click() [Link] = True [Link] = True
61
[Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = False [Link] = False If [Link] = adStateOpen Then [Link] [Link] "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 [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = "" End Sub Private Sub cmdcls_Click() [Link] = 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 [Link] = adStateOpen Then [Link] [Link] "select * from store_info where store_ID=" & Val([Link]), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic [Link] [Link] [Link] = [Link] [Link] = "" If [Link] = adStateOpen Then [Link]
62
[Link] "delete from Product_list where store_ID=" & Val([Link]), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic [Link] MsgBox "Operation Completed Successfully...!", vbInformation, "Success!" If [Link] = adStateOpen Then [Link] [Link] "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() [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = True [Link] = True [Link] = "Please Enter The Information Below" addedit = "EDIT" End Sub Private Sub cmdnew_Click() [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = ""
63
[Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = False [Link] = True [Link] = True addedit = "ADD" [Link] = "Please Enter The Information Below" 'generate id automatically for new store If [Link] <= 0 Then [Link] = 1 Else If [Link] = adStateOpen Then [Link] [Link] "select max(store_id) +1 from store_info", "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic [Link] = [Link](0) End If End Sub Private Sub cmdsave_Click() 'save the new store If addedit = "ADD" Then If [Link] = "" Or [Link] = "" Or [Link] = "" Or [Link] = "" Or [Link] = "" Then MsgBox "Please enter the information in all the Fields..!", vbExclamation, "EBilling" ElseIf IsNumeric([Link]) = False Then MsgBox "Enter Pin code Numeric only...!", vbExclamation, "E-Billing" ElseIf IsNumeric([Link]) = False Then
64
MsgBox "Enter Contact No. Numeric only...!", vbExclamation, "E-Billing" Else If [Link] = adStateOpen Then [Link] [Link] "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 [Link] [Link]("store_id") = [Link] [Link]("store_nm") = [Link] [Link]("addr") = [Link] [Link]("city") = [Link] [Link]("pin") = [Link] [Link]("phno") = [Link] [Link] MsgBox "Record saved Successfully..!", vbInformation, "Operation Successful" [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = False [Link] = False [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = "" display_store End If Else 'save the updated store information
65
If [Link] = "" Or [Link] = "" Or [Link] = "" Or [Link] = "" Or [Link] = "" Then MsgBox "Please enter the information in all the Fields..!", vbExclamation, "EBilling" ElseIf IsNumeric([Link]) = False Then MsgBox "Enter Pin code Numeric only...!", vbExclamation, "E-Billing" ElseIf IsNumeric([Link]) = False Then MsgBox "Enter Contact No. Numeric only...!", vbExclamation, "E-Billing" Else If [Link] = adStateOpen Then [Link] [Link] "select *from store_info where store_id=" & Val([Link]), "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL-176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic [Link]("store_nm") = [Link] [Link]("addr") = [Link] [Link]("city") = [Link] [Link]("pin") = [Link] [Link]("phno") = [Link] [Link] [Link] MsgBox "Record Updated Successfully..!", vbInformation, "Operation Successful" [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True [Link] = False [Link] = False [Link] = True [Link] = True [Link] = True [Link] = True [Link] = True
66
display_store End If End If End Sub Private Sub first_Click() If [Link] <= 0 Then Exit Sub [Link] display_store End Sub Private Sub Form_Load() [Link] = False [Link] = False If [Link] = adStateOpen Then [Link] [Link] "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 Sub Private Sub display_store() If [Link] > 0 Then [Link] = [Link]("store_id") [Link] = [Link]("store_nm") [Link] = [Link]("addr") [Link] = [Link]("city") [Link] = [Link]("pin") [Link] = [Link]("phno") Else [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "" End If If [Link] = "0" Then [Link] = False Else: [Link] = True
67
End If End Sub Private Sub last_Click() If [Link] <= 0 Then Exit Sub [Link] display_store End Sub Private Sub movnext_Click() If [Link] < [Link] Then [Link] display_store Else MsgBox "Last Record ..", vbInformation [Link] display_store End If End Sub Private Sub movpre_Click() If [Link] > 1 Then [Link] display_store Else MsgBox "First Record ..", vbInformation [Link] display_store End If End Sub
FrmChange_store
Private Sub cmdchange_Click() If [Link] = "" Then MsgBox "Please select the store from list..!", vbExclamation, "E-Billing" ElseIf [Link] = [Link] Then MsgBox "You have been already login to this store..!", vbCritical, "EBilling" Else Combo1_Change [Link] = True MDIForm1.Label2 = [Link]
68
Unload Me MsgBox "Operation completed Successfully..!", vbInformation, "Success" End If End Sub Private Sub cmdclose_Click() [Link] = True Unload Me End Sub Private Sub Combo1_Change() [Link] = [Link] Dim sql As String sql = "select store_id from store_info where store_nm='" & [Link] & "'" If [Link] = adStateOpen Then [Link] [Link] sql, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic If [Link] > 0 Then frmLogin.txtstore_id.Text = [Link]("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 [Link] Dim abc As String abc = "select Store_nm from Store_info order by store_id" If [Link] = adStateOpen Then [Link] [Link] abc, "Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=E_Billing;Data Source=NIKHIL176A7816\SQLEXPRESS", adOpenDynamic, adLockOptimistic While [Link] = False [Link] [Link]("store_nm")
69
Frmabout_us
Private Sub close_Click() [Link] = True Unload Me End Sub
70
71
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.
72
BIBLIOGRAPHY
WEBSITES:
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
73









