Late Shri Vishnu Waman Thakur Charitable Trust

114
PETROLPUMP Late Shri Vishnu Waman Thakur Charitable Trust’s Bhaskar Waman Thakur College of Science, Yashwant Keshav Patil College of Commerce, Vidya Dayanand Patil College of Arts. Virar(W). Course:Computer Science Seat No:.________ CERTIFICATE This is to certify that _________________________________ Roll no.____of T.Y.B.Sc (Comp. Sci.) class, has successfully completed the project on “_________________________________________“of GROUP-IV as prescribe by the University of Mumbai in the academic year 2010-2011. _____________ _____________ _____________ Project Guide Examiner Head of Dept. JATIN SATVI

Transcript of Late Shri Vishnu Waman Thakur Charitable Trust

Page 1: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Late Shri Vishnu Waman Thakur Charitable Trust’sBhaskar Waman Thakur College of Science,

Yashwant Keshav Patil College of Commerce,Vidya Dayanand Patil College of Arts.

Virar(W).

Course:Computer Science Seat No:.________

CERTIFICATE

This is to certify that_________________________________

Roll no.____of T.Y.B.Sc (Comp. Sci.) class, has successfully completed the project on “_________________________________________“of GROUP-IV as prescribe by the University of Mumbai in the academic year 2010-2011.

_____________ _____________ _____________

Project Guide Examiner Head of Dept.

Date: Date: Date:

JATIN SATVI

Page 2: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

INDEX

Sr.no. Name of the Project Document Page no.

1. Acknowledgement 4

2. Preliminary Investigation 5

1. Organization Overview 6

2. Description of System 7

3. Limitation of present system 8

4. Advantage of proposed system 9

5. Feasibility study 10

6. Stakeholder 15

7. Gantt chart 16

3. System Analysis 17

1. Fact finding techniques 18

2. Event table 20

3. Use case diagram 21

4. ERD 22

5. Activity diagram 23

6. Class diagram 24

7. Object diagram 25

8. Sequence diagram 26

9. State diagram 27

4. System design 28

JATIN SATVI

Page 3: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

1. Converting ER to tables 29

2. Component diagram 30

3. Package diagram 31

4. System flow chart 32

5. Structure chart 33

5. System coding 34

1. Menu tree 37

2. List of tables with attributes 38

3. Validation 41

4. Test cases, test data and test result 46

5. Screen layout & Report layout 48

6. System listing/uploading

7. Future Enhancement

8. References and bibliography

JATIN SATVI

Page 4: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

ACKNOWLEDGEMENT

It is always confusing as to how to acknowledge people who have always been a

constant support to me. But still I have made an attempt towards it.

I am very thankful to my project guide and our Head of Department of Computer

Science Mr. Rajesh Gaikwad. He has always been a constant support to all of us.

He has always been guiding us with his valuable ideas and directions. Without his

support it wouldn’t have been possible to complete the Project in the stipulated

time. He has always been there for me at any time.

I am also very thankful to the Mr. Sandesh Akre , Hemant Wani and other

teachers of our Department for their unprecedented support.

Last but not the least; I would like to thank all my friends who have given me their support. Also, I would like o thank my parents for believing my abilities.

JATIN SATVI

Page 5: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

PHASE 1: - PRELIMIANARY

INVESTIGATION

JATIN SATVI

Page 6: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

SATVI JATIN DAMODAR

T.YC.S

JATIN SATVI

PETROL PUMP MANAGEMENT

SYSTEM

Page 7: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI

PRELIMINARY INVESTIGATION

ORGANISATION OVERVIEWEXISTING SYSTEMDISADVANTAGES OF EXISTING SYSTEMPROPOSE SYSTEMADVANTAGE OF PROPOSE SYSTEMFEASIBILITY STUDYSTACK HOLDERGANT CHART

Page 8: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI

ORGANISATION OVERVIEW

HISTORYIT IS ESTABLISHED LAST 15TH YEAR’S AGO,IT’S OPEN IN NOVEMBER 1995IT IS BRANCH OF BHARAT PETROLIUM PVT.LTD

LOCATIONTHIS PETROL PUMP IS LOCATED ON N.H.NO 8AT-KUDE, N.H.NO 8, MANOR,PALGHAR 401404

SERVICES PROVIDEREMPLOYEE’S,MANAGER,SUPLIEROWNER/DIRECTORNAME OF OWNER IS GANAPAT M. PICHAD

Page 9: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI

EXISTING SYSTEMALL DATA STORED IN REGISTERMAINTAINE EVERY TRANSACTIONMAINTAINING DAILY REPORT SHITBILL’S TAKING BY CASH AND CARDMAINTAINE DETAIL’S ONLY DAILY CUSTOMERGIVE THE BILL’S ONLY THOSE WANTMAINTAINE SUPLIER DETAIL’S NAME OF THE SUPLIER IS BHARAT PETROLIUM COMPANY

Page 10: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI

DISADVANTAGES OF EXISTING SYSTEM

ALL DATA STORED IN BIG AND LARGE REGISTERTIME CONSUMINGNO FURTHER MODIFICATIONS AS POSSIBLEIT’S VERY DIFFICULT TO SEARCH ZERO SECURITY TO THE REGISTER SYSTEMSBILL NOT PROVIDING EVERY CUSTOMER

Page 11: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI

PROPOSE SYSTEM

THE SYSTEM IS WINDOW BASED,USER FRIENDLY AND SECURABLE.IT’S SOFTWARE PACKAGE TRACKS WORKTHEY DECIDED TO BUILD IT’S OWNAND RECORD ALL EVENT’S.THEY DECIDED TO BUILD IT’S OWN SYSTEM TO AVOID LIMITATION OF EXISTING SYSTEM’S ERRORIT ALSO TRACK THE SUPLIER INFORMATIONIT ALSO TRACK THE CUSTOMER AND EMPLOYEE INFORMATIONIT’S RECORD DAILY REPORT AND EASY TO USING SOFTWARE.

Page 12: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI

ADVANTAGE OF PROPOSE SYSTEM

THIS SYSTEM HAS BEEN DEVELOPED TO BE SIMPLE AND USER FRIENDLYEVEN A NON-TECHNICAL USER CAN BE USE THE SYSTEM EFECTIVLY AND WINDOW ANY DIFFICULTY.IT IS UPGRADABLE, HENCE FURTHER THE SYSTEM IS POSSIBLEEASY DATA ENTRY AND COMPUTER BILL SYSTEM EVALUTION IS FURTHER AND ERROR FREE STANDARD OPERATING PROCEDURES IT IS EASY TO UNDERSTANDTHE SYSTEM RECORD AND RETRIVE ALL INFORMATION

Page 13: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI

FEASIBILITY STUDY

THE SYSTEM PROVIDED TO THE ORGANISATION IS CAN PROVE TO BE VERY BENIFICIAL DUE TO IT’S ADVANTAGES AND OTHER FEATUR’STECHNICAL FEASIBILITYIT CONSIST OF ALL THE NECESSARY FEATURES REQUIRED TO THE ORGANISATIONEASY BILL PAYMENT INTERACTION AND MANY MOREHAVING ALL TECHNICAL CAPACITYIT’S REQUIRES LESS SPACE AND WORK’S ON EVERY OPERATING SYSTEM

Page 14: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

ECONOMICAL FEASIBILITY

The system is economically feasible and reasonable.

The travelling expenses and the other expenses utilized are achievable.

The hardware and Software requirement are also reasonable

JATIN SATVI

Page 15: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

STAKE HOLDERS

Mr.Ganpat pichad owner of the Petrol pump and would affect more and more people.

Manager, Employee’s are user of the proposed System.

JATIN SATVI

Customer & suplier

Manager& Employee’s

Director of petrolpump

Page 16: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Figure:-Stack holder for the petrolpump

GANTT CHART

JATIN SATVI

Page 17: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

PHASE 2SYSTEM ANALYSIS

JATIN SATVI

Page 18: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

FACT FINDING TECHNIQUES

QUESTIONARIES

OPEN ENDED:-

1. What are the main modules and attributes of your current system?

2. Is your current System economically, functionally & technically feasible?

3. What are the limitations of your current system?

4. How does your current process work?

5. What is your organization name?

6. Does the organization have any branches?

7. At what respective position do you work in your office?

8. On which platform your manual report is prepared?

9. How many days it take to complete the whole process activity of survey?

10. With respective to accuracy how much will you rate your current System?

EXCELLENT GOOD AVERAGE POOR

11. What if my software will be ease your work and be less time Consuming?

JATIN SATVI

Page 19: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

12. What is the time duration to submit the software to the Organization?

JATIN SATVI

Page 20: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

EVEN TABLEEvents Trigger Source Activity Response Destination

Create a Dealer’s details

Creating new dealers record

Employee Create the record

Record created Dealers details

Create a Product’s details

Creating new Product record

Employee Create the record

Record created Product details

Create a vendor’s details

Creating new vendors record

Employee Create the record

Record created vendor details

Create a Employee’s details

Creating new Employee record

Employee Create the record

Record created Employee details

Create a customer’s details

Creating new customer record

Employee Create the record

Record created Customer details

Customer place an order

Creating new order record

Employee Create the order

Order created Order details

Create a bill Creating the bill

Employee Create the bill

Bill created Bill details

Creating the stock details

Creating new stock record

Employee Create the stock details

Stock details created

Stock details

Creating the transaction record

Creating the new transaction details

Employee/manager

Generate record

Report generated Report details

JATIN SATVI

Page 21: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Dealer place an order

Creating new order record

Employee/ manager

Create the order

Order created Order details

Create a bill Creating the bill

Employee Create the bill

Bill created Bill details

Create the regular customer detail,s

Creating the regular cust record

Employee Create the record

Regular cust record generated

Regular cust details

JATIN SATVI

Page 22: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

USE CASE

JATIN SATVI

Page 23: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

ERD

JATIN SATVI

Page 24: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

A ctivity D iagram:-

JATIN SATVI

LOGIN FOR EMPLOYEE

INPUT DETAILS OF EMPLOYEE

TRY AGAIN

INPUT DETAILS OF CUSTOMER

CUSTOMER PLACE AN ORDER

FULLFILL ORDER

GENERATE BILL

PRINT BILL

Page 25: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

CLASS DIAGRAM

JATIN SATVI

Page 26: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

OBJECT DIGRAME

JATIN SATVI

Page 27: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

SEQUENCE CHART

JATIN SATVI

Page 28: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

STRATE CHART

JATIN SATVI

Page 29: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

PHASE 3 SYSTEM DESIGN

JATIN SATVI

Page 30: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

CONVERTING ERD TO TABLES

1. Entity: - DealerTable: - Dealer

2. Entity: - Product

Table: - Product

3. Entity: - VendorTable: - Vendor

4. Entity: - Employee’s

Table: - Employee

5. Entity :- Customer

Table:- Customer Details

6. Entity :- BillTable:-Bill

JATIN SATVI

Page 31: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

SYSTEM FLOW CHART

STRUCTURE CHART

JATIN SATVI

PETROLPUMP SYSTEM

USER LOGIN

Updating

DEALER

CUSTOMER

EMPLOYEE

Calculate area the BILL

Report

VENDOR

PRODUCT

Page 32: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

COMPONENT DIAGRAM

JATIN SATVI

PETROLPUMP

BILLDEALER CUSTOMEREMPLOYEEVENDORPRODUCT

MAINTAIN DETAILS

MAINTAIN DETAILS

MAINTAIN DETAILS

MAINTAIN DETAILS

MAINTAIN DETAILSMAINTAIN DETAILS

Report

Page 33: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

PACKAGE DIAGRAM

JATIN SATVI

PETROLPUMP

<<Database JATIN>>

DEALER

BILL

PRODUCT

EMPLOYEE CUSTOMER

VENDOR

Search

Search Generate

Search

Search DetailsSearch

Search

Data Access

Data Access

Data Access

Data Access

Data Access

Data Access

Details Details

Details

Details

Page 34: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Package Diagram:-

JATIN SATVI

PETROLPUMP

DEALER VENDOR

CUSTOMEREMPLOYEE

Employee

PRODUCT

dealer

Product

vendor

Bill/Report

Report/Bill

Customer

Page 35: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI

Page 36: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI

Page 37: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

PHASE 4: -SYSTEM CODING

JATIN SATVI

Page 38: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

FRONT END:

Advantage of using VB.net

VB.net is the latest product of .net framework. It allows you to develop the windows applications easily and quickly.

VB.net provides a graphical environment for creation of forms and controlling various events, i.e event handling with respect to the actions performed by the user that becomes a building block of the application.

VB.net provides with the various tool that are more productive. We can use those tools together to create complete application.VB.net is an event driven programming language which supports many elements of the object oriented programming language. There are no longer procedural and don’t follow sequential flow.

The users can press keys and click on various buttons and boxes on the forms and add records to the form and save the details to the database just by clicking save buttons on the form. Each user action cause an event to occur, which in turn triggers an integrated development environment in which one can develop, run, test and debug the application.

JATIN SATVI

Page 39: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

BACK END:

Advantages of SQL 2005

SQL-2000 is both a n easy to understand and comprehensive tool for

Managing the data.

1. Vender Independence.2. Portability across Computer System.3. Relational foundation.4. High-Level English like structure.5. Programmatic Database Access.6. Multiple views of data.7. Complete database language.8. Dynamic Data definition.9. Client/Server architecture.

SQL also provides the Primary and foreign key concept whichPlay a vital role during creation of database tables.

Primary key specifies that each value in a column of the table should be unique.

A column in on table whose values matches with the primary key in one table is called as primary key.

JATIN SATVI

Page 40: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

MENU TREE

Survey:-

-Master

-Login

-change Password

-Transaction

-Dealer

-Vendor

-Employee

-Customer

-Product

-Bill

JATIN SATVI

Page 41: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

TABLES WITH ATTRIBUTES1. Customer

Fields data type Null/Not null Constraint

Cust_id Varchar(5) Not null -

Cust_name Varchar(50) Not null -

city Varchar(15) Not null -

add Varchar(50) Not null -

Tel_no int Null -

dob Varchar(50) Null -

Vendor

Fields data type Null/Not null Constraint

vendor_id Varchar(5) Not null -

name Varchar(50) Not null -

city Varchar(15) Not null -

add Varchar(50) Not null -

Tel_no int Null -

dob Varchar(50) Null -

Employee

Fields data type Null/Not null Constraint

JATIN SATVI

Page 42: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Employee_id Varchar(5) Not null -

name Varchar(50) Not null -

city Varchar(15) Not null -

add Varchar(50) Not null -

Tel_no int Null -

dob Varchar(50) Null -

doj Varchar(50) Not null -

Dealer

Fields data type Null/Not null Constraint

Dealer_name Varchar(50) Not null -

city Varchar(15) Not null -

add Varchar(50) Not null -

Tel_no int Null -

dob Varchar(50) Null -

Email Varchar(50) Null -

Bill

Fields data type Null/Not null Constraint

Cust_id Varchar(5) Not null -

Prod_id Varchar(5) Not null -

JATIN SATVI

Page 43: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Vehical_no Varchar(15) Not null -

Quantity Decimal(18,0) Not null -

Bill_no Varchar(5) Not null -

dob Varchar(50) Not null -

Total Decimal(18,0) Not null -

Login_session

Fields data type Null/Not null Constraint

Login_name Varchar(20) Not null -

password Varchar(15) Not null -

Login_as Varchar(50) Not null -

Logindetails

Fields data type Null/Not null Constraint

Login_name Varchar(20) Not null -

password Varchar(15) Not null -

Product

Fields data type Null/Not null Constraint

Prod_id Varchar(20) Not null -

Prod_name Varchar(15) Not null -

JATIN SATVI

Page 44: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

qauntity int Not null -

JATIN SATVI

Page 45: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

VALIDATIONS

DEALER

JATIN SATVI

Page 46: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

PRODUCT

JATIN SATVI

Page 47: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

EMPLOYEE

JATIN SATVI

Page 48: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

CUSTOMER1

JATIN SATVI

Page 49: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

CUSTOMER2

JATIN SATVI

Page 50: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

CUSTOMER3

JATIN SATVI

Page 51: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI

Page 52: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Test Cases

Test case id

Test case name

test case desc

test steps test case

status

test status (P/F)

test priority

defect severitystep expected actual

Login Validate Login

To verify that Login name must be selected

Select nothing and click Submit button

an error message “please select value” must be displayed

design high

Select id and click Submit button

Login success full or an error message “Invalid Login or Password” must be displayed

design high

customer Validate customer

To verify that All the text is properly filed

enter null valuethen click on save button

an error message “please enter value”

design high

JATIN SATVI

Page 53: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Employee Validate Employee

To verify that All the text is properly filed

enter null valuethen click on save button

an error message “please enter value”

design high

Vendor Validate Vendor

To verify that All the text is properly filed

enter null valuethen click on save button

an error message “please enter value”

design high

Dealer Validate dealer

To verify that All the text is properly filed

enter null valuethen click on save button

an error message “please enter value”

design high

product Validate product

To verify that All the text is properly filed

enter null valuethen click on save button

an error message “please enter value”

design high

JATIN SATVI

Page 54: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

CODINGMDI FORM

Public Class frmmdi

JATIN SATVI

Page 55: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Private Sub CustmerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustmerToolStripMenuItem.Click Me.Cursor = Cursors.WaitCursor frm_cust.MdiParent = Me frm_cust.Show() frm_cust.Focus() Me.Cursor = Cursors.Default End Sub

Private Sub TransactionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TransactionToolStripMenuItem.Click

End Sub

Private Sub frmmdi_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TransactionToolStripMenuItem.Enabled = False End Sub

Private Sub EmployToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployToolStripMenuItem.Click Me.Cursor = Cursors.WaitCursor frm_emp.MdiParent = Me frm_emp.Show() frm_emp.Focus() Me.Cursor = Cursors.Default

End Sub

Private Sub VendorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VendorToolStripMenuItem.Click Me.Cursor = Cursors.WaitCursor frm_vndr.MdiParent = Me frm_vndr.Show() frm_vndr.Focus() Me.Cursor = Cursors.Default

End Sub

Private Sub ProductToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductToolStripMenuItem.Click Me.Cursor = Cursors.WaitCursor frm_product.MdiParent = Me frm_product.Show() frm_product.Focus() Me.Cursor = Cursors.Default

End Sub

Private Sub DealerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DealerToolStripMenuItem.Click Me.Cursor = Cursors.WaitCursor FRM_DEALER.MdiParent = Me FRM_DEALER.Show() FRM_DEALER.Focus()

JATIN SATVI

Page 56: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Me.Cursor = Cursors.Default

End Sub

Private Sub MasterToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MasterToolStripMenuItem.Click 'Me.Cursor = Cursors.WaitCursor 'frm_bill.MdiParent = Me 'frm_bill.Show() 'frm_bill.Focus() 'Me.Cursor = Cursors.Default End Sub

Private Sub ToolStripTextBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripbill.Click Me.Cursor = Cursors.WaitCursor frm_bill.MdiParent = Me frm_bill.Show() frm_bill.Focus() Me.Cursor = Cursors.Default End Sub

Private Sub ToolStripTextBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Cursor = Cursors.WaitCursor FRM_DEALER.MdiParent = Me FRM_DEALER.Show() FRM_DEALER.Focus() Me.Cursor = Cursors.Default End SubEnd Class

LOGIN FORM

JATIN SATVI

Page 57: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Public Class Login_frm Dim login_name(50) As String

JATIN SATVI

Page 58: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Dim password(50) As String Dim dt As New Database

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Dim i As Integer = 0 If txt_usrname.Text = Nothing And txt_passwrd.Text = Nothing And cmb_loginRights.Text = Nothing Then MsgBox("Please enter the login INFORMATION and password correctly Before login") ElseIf txt_usrname.Text = Nothing Then MsgBox("Please enter the login name ") ElseIf txt_passwrd.Text = Nothing Then MsgBox("Please enter the login password") ElseIf cmb_loginRights.Text = Nothing Then MsgBox("Please enter the login_right") Else While Not login_name(i) = Nothing If (login_name(i) = txt_usrname.Text) Then Exit While End If i = i + 1 End While If password(i) = txt_passwrd.Text Then priority = cmb_loginRights.SelectedItem dt.insertValues("insert into Login_session values('" & Today.Date & "','" & txt_usrname.Text & "','" & cmb_loginRights.Text & "')") Me.Hide() MIDImain.Show()

Else MsgBox("Something is wrong written by you please re-enter the password") txt_usrname.Clear() txt_passwrd.Clear() txt_usrname.Focus() End If End If End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click End End Sub Private Sub Login_frm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cmb_loginRights.SelectedIndex() = 1 dt.selectionQuerry("select * from logindetails ", "login_name", "password", login_name, password) End Sub 'DATABASE CONNECTIVITY SUCCEFFULLY COMPLETEDEnd Class

CHANGE PASSWORD

JATIN SATVI

Page 59: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Public Class Change_Password

JATIN SATVI

Page 60: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Dim con As New dbConnection Private Sub Change_Password_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub btn_submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_submit.Click If txt_loginName.Text = Nothing Then MessageBox.Show("Yuu filled blank the login field", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error) ElseIf (txt_oldPassword.Text = Nothing) Then MessageBox.Show("You must filled the old password for updation", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error) Else MessageBox.Show("Are you sure do you want to change the password ", "COMFIRMATION", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If MessageBoxButtons.OK = 0 Then con.insertValues("update logindetails set password='" & txt_newpasswaed.Text & "' WHERE login_name='" & txt_loginName.Text & "'") MessageBox.Show("PASSWORD SUCCESSFULLY CHANGED", "INFORMATION", MessageBoxButtons.OK, MessageBoxIcon.Information) Me.Close() End If End If End Sub

Private Sub txt_oldPassword_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_oldPassword.LostFocus Dim str As String = "select password from logindetails where login_name='" & txt_loginName.Text.Trim & "'" con.RetriveDataBaseQuery(str, "password", str) If str = Nothing Then MessageBox.Show("Invalide user", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error) ElseIf (txt_oldPassword.Text = str) Then MessageBox.Show("Authentication Procedure successfully completed you can use your new password", "INFORMATION", MessageBoxButtons.OK, MessageBoxIcon.Information) txt_newpasswaed.Enabled = True txt_newpasswaed.Focus()

Else MessageBox.Show("Invalide password please re-enter correct password", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error) txt_oldPassword.Clear() txt_loginName.Clear() txt_loginName.Focus()

End If

End Sub

Private Sub txt_oldPassword_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_oldPassword.TextChanged

End Sub

JATIN SATVI

Page 61: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Private Sub btn_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_cancel.Click Me.Close()

End SubEnd Class

JATIN SATVI

Page 62: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

CUSTOMER

Imports System.Data.SqlClient

JATIN SATVI

Page 63: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Public Class frm_cust Dim con As New dbConnection Dim query1 As String Dim query As String Dim ds As New DataSet Dim da As SqlDataAdapter Public cmd As New SqlCommand Public status As String Public sqlConnect As SqlClient.SqlConnection Public strstatus As String Public strConnectionStr As String Public rs As SqlDataReader Dim recordsAffected As Integer Public i As Integer

Private Sub btn_exit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_exit.Click Me.Close()

End Sub Private Sub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click 'status = "update" 'frmupdate.Show() strstatus = "update" con.OpenConn() con.fillcombo(cmbcust_id, "cust", "cust_id")

End Sub

Private Sub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.Click con.OpenConn()

If txtadd.Text = "" And txtcity.Text = "" And dtp_dob.Text = "" And cmbcust_id.Text = "" And txtname.Text = "" And txttel.Text = "" Then MsgBox("PLEASE INSERT THE ALL VALUES") Else 'con.OpenConn() query1 = "select count(*) as ie from cust" rs = con.RetriveDataBaseQuery(query1) If rs.HasRows Then rs.Read() cmbcust_id.Text = "CST" & rs("ie") + 1 Else MsgBox("no id") End If

query = "insert into cust values('" & cmbcust_id.Text & "','" & txtname.Text & "','" & txtcity.Text & "','" & txtadd.Text & "','" & txttel.Text & "','" & dtp_dob.Text & "')" If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted") MsgBox(cmbcust_id.Text) con.CloseConn()

JATIN SATVI

Page 64: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

'Me.Close()

frmmdi.TransactionToolStripMenuItem.Enabled = True

'main.Show() End If

End If 'If status = "update" Then ' If txtadd.Text = "" And txtcity.Text = "" And dtp_dob.Text = "" And cmbcust_id.Text = "" And txtname.Text = "" And txttel.Text = "" Then ' MsgBox("PLEASE INSERT THE ALL VALUES") ' Else ' con.OpenConn() If strstatus = "update" Then

con.OpenConn() query = ("update cust set cust_name='" & txtname.Text & "',city='" & txtcity.Text & "',address='" & txtadd.Text & "',tel_no= '" & txttel.Text & "','" & dtp_dob.Text & "' where cust_id='" & cmbcust_id.Text & "'") If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Updated") MsgBox(cmbcust_id.Text) 'MsgBox(cmbcust_id.Text = "updated")

'frm_main.TransactionToolStripMenuItem.Enabled = True

'main.Show() 'End If

End If

query = ("update cust set cust_name='" & txtname.Text & "',city='" & txtcity.Text & "',add='" & txtadd.Text & "',tel_no= '" & txttel.Text & "' ,dob= '" & dtp_dob.Text & "' where cust_id='" & cmbcust_id.Text & "'") If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted") MsgBox(cmbcust_id.Text)

Me.Close()

frmmdi.TransactionToolStripMenuItem.Enabled = True

'main.Show() End If

End If Dim str(Me.lst_table.Columns.Count) As String Dim itm As ListViewItem str(0) = cmbcust_id.Text.Trim

JATIN SATVI

Page 65: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

str(1) = txtname.Text.Trim str(2) = txtcity.Text.Trim str(3) = txtadd.Text.Trim str(4) = txttel.Text.Trim str(5) = dtp_dob.Text.Trim

itm = New ListViewItem(str) lst_table.Items.Add(itm)

'End If End Sub

Private Sub frm_cust_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'cmbcust_id.Enabled = False End Sub

'Private Sub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click ' 'status = "update" ' 'frmupdate.Show() ' strstatus = "update" ' con.OpenConn() ' con.fillcombo(cmbcust_id, "cust", "cust_id")

'End Sub

DEALER

JATIN SATVI

Page 66: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Imports System.Data.SqlClientPublic Class FRM_DEALER

JATIN SATVI

Page 67: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Dim con As New dbConnection Dim query1 As String Dim query As String Dim ds As New DataSet Dim da As SqlDataAdapter Public cmd As New SqlCommand

Public sqlConnect As SqlClient.SqlConnection Public strConnectionStr As String

Public rs As SqlDataReader Private Sub btn_exit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_exit.Click Me.Close()

End Sub

Private Sub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.Click If txt_add.Text = "" And txt_city.Text = "" And dtp_dob.Text = "" And txt_name.Text = "" And txt_tel.Text = "" And txt_email.Text = "" Then MsgBox("PLEASE INSERT THE ALL VALUES") Else con.OpenConn() query1 = "select count(*) as ie from dealer" rs = con.RetriveDataBaseQuery(query1) 'If rs.HasRows Then ' rs.Read() ' txtid.Text = "CST" & rs("ie") + 1 'Else ' MsgBox("no id") End If

query = "insert into cust values('" & txt_name.Text & "','" & txt_city.Text & "','" & txt_add.Text & "','" & txt_tel.Text & "','" & dtp_dob.Text & "','" & txt_email.Text & "')" If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted")

'Me.Close()

frmmdi.TransactionToolStripMenuItem.Enabled = True

'main.Show() End If

Dim str(Me.lst_table.Columns.Count) As String Dim itm As ListViewItem str(5) = txt_email.Text.Trim str(0) = txt_name.Text.Trim str(3) = txt_city.Text.Trim str(1) = txt_add.Text.Trim str(4) = txt_tel.Text.Trim str(2) = dtp_dob.Text.Trim

JATIN SATVI

Page 68: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

itm = New ListViewItem(str) lst_table.Items.Add(itm)

End Sub

Private Sub btn_clear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_clear.Click txt_name.Text = "" txt_add.Text = "" txt_city.Text = "" dtp_dob.Text = "" txt_email.Text = "" txt_tel.Text = ""

End Sub

Private Sub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click frmupdate.Show() End Sub

Private Sub txt_name_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)

End Sub

Private Sub txt_name_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub

Private Sub FRM_DEALER_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End SubEnd Class

JATIN SATVI

Page 69: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

VENDOR

JATIN SATVI

Page 70: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Imports System.Data.SqlClientPublic Class frm_vndr Dim con As New dbConnection Dim query1 As String Dim query As String Dim ds As New DataSet Dim da As SqlDataAdapter Public cmd As New SqlCommand Public strstatus As String

Public sqlConnect As SqlClient.SqlConnection Public strConnectionStr As String

Dim i As String Public rs As SqlDataReader Private Sub frm_vndr_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'txt_id.Enabled = False End Sub

Private Sub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.Click con.OpenConn() If cmb_id.Text = "" And txt_name.Text = "" And txt_city.Text = "" And dtp_dob.Text = "" And txt_add.Text = "" And txt_tel.Text = "" And dtp_dob.Text = "" And txt_email.Text = "" Then MsgBox("PLEASE INSERT THE ALL VALUES") Else

query1 = "select count(*) as ie from vendor" rs = con.RetriveDataBaseQuery(query1) If rs.HasRows Then rs.Read() cmb_id.Text = "ven" & rs("ie") + 1 Else MsgBox("no id") End If

query = "insert into vendor values('" & cmb_id.Text & "','" & txt_name.Text & "','" & txt_city.Text & "','" & txt_add.Text & "','" & txt_tel.Text & "','" & dtp_dob.Text & "','" & txt_email.Text & "')" If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted") MsgBox(cmb_id.Text)

'Me.Close()

frmmdi.TransactionToolStripMenuItem.Enabled = True

' main.Show() End If

End If If strstatus = "update" Then

con.OpenConn()

JATIN SATVI

Page 71: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

query = ("update Vendor set name='" & txt_name.Text & "',city='" & txt_city.Text & "',address='" & txt_add.Text & "',tel_no= '" & txt_tel.Text & "','" & dtp_dob.Text & "' where vendor_id='" & cmb_id.Text & "'") If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Updated") MsgBox(cmb_id.Text) 'MsgBox(cmbcust_id.Text = "updated")

'frm_main.TransactionToolStripMenuItem.Enabled = True

'main.Show() 'End If

End If

query = ("update vendor set name='" & txt_name.Text & "',city='" & txt_city.Text & "',add='" & txt_add.Text & "',tel_no= '" & txt_tel.Text & "' ,dob= '" & dtp_dob.Text & "' where vendor_id='" & cmb_id.Text & "'") If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted") MsgBox(cmb_id.Text)

Me.Close()

frmmdi.TransactionToolStripMenuItem.Enabled = True

'main.Show() End If

End If Dim str(Me.lst_table.Columns.Count) As String Dim itm As ListViewItem str(0) = cmb_id.Text.Trim str(1) = txt_name.Text.Trim str(3) = txt_city.Text.Trim str(4) = txt_add.Text.Trim str(5) = txt_tel.Text.Trim str(2) = dtp_dob.Text.Trim

itm = New ListViewItem(str) lst_table.Items.Add(itm)

End Sub

Private Sub btn_exit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_exit.Click End End Sub

Private Sub btn_clear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_clear.Click cmb_id.Text = ""

JATIN SATVI

Page 72: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

txt_city.Text = "" dtp_dob.Text = "" txt_email.Text = "" txt_name.Text = "" txt_tel.Text = "" txt_add.Text = "" End Sub

Private Sub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click strstatus = "update" con.OpenConn() con.fillcombo(cmb_id, "vendor", "vendor_id")

End Sub

Private Sub txt_id_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) con.OpenConn() If strstatus = "update" Then query = "select * from vendor where vendor_id ='" & cmb_id.Text & "'" rs = con.RetriveDataBaseQuery(query)

If rs.HasRows = True Then rs.Read() txt_name.Text = rs("name") txt_add.Text = rs("add") txt_city.Text = rs("city") txt_tel.Text = rs("tel_no")

End If End If con.CloseConn()

End Sub

Private Sub txt_tel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_tel.Click

End Sub

Private Sub txt_tel_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_tel.KeyPress

If Asc(e.KeyChar) <> 8 Then txtValidationNumberonly(e.KeyChar, txt_tel) End If

End Sub

Private Sub txt_tel_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_tel.TextChanged

JATIN SATVI

Page 73: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

End Sub

Private Sub txt_tel_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txt_tel.Validating If CInt(txt_tel.Text.Length) < 10 Then MsgBox("Please Enter 10 digit mobile no. ") e.Cancel = True End If End Sub

Private Sub txt_name_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_name.KeyPress If Asc(e.KeyChar) <> 8 Then txtValidationCharonly(e.KeyChar, txt_name) End If End Sub

Private Sub txt_name_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_name.TextChanged

End SubEnd Class

JATIN SATVI

Page 74: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

EMPLOYEE

Imports System.Data.SqlClient

JATIN SATVI

Page 75: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Public Class frm_emp

Dim con As New dbConnection Dim query1 As String Dim query As String Dim ds As New DataSet Dim da As SqlDataAdapter Public cmd As New SqlCommand Public strstatus As String Public sqlConnect As SqlClient.SqlConnection Public strConnectionStr As String Dim i As String

Public rs As SqlDataReader

Private Sub btn_exit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_exit.Click Me.Close()

End Sub

Private Sub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.Click con.OpenConn() If txt_add.Text = "" And txt_city.Text = "" And dtp_dob.Text = "" And txt_name.Text = "" And txt_tel.Text = "" And dtp_doj.Text = "" Then MsgBox("PLEASE INSERT THE ALL VALUES") Else 'con.OpenConn() query1 = "select count(*) as ie from emp " rs = con.RetriveDataBaseQuery(query1) If rs.HasRows Then rs.Read() cmb_id.Text = "EMP" & rs("ie") + 1 Else MsgBox("no id") End If

query = "insert into emp values('" & cmb_id.Text & "','" & txt_name.Text & "','" & txt_city.Text & "','" & txt_add.Text & "','" & dtp_dob.Text & "','" & dtp_doj.Text & "','" & txt_tel.Text & "')" If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted") MsgBox(cmb_id.Text)

'Me.Close()

frmmdi.TransactionToolStripMenuItem.Enabled = True

'main.Show() End If End If If strstatus = "update" Then

con.OpenConn()

JATIN SATVI

Page 76: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

query = ("update emp set employee_name='" & txt_name.Text & "',city='" & txt_city.Text & "',address='" & txt_add.Text & "',tel_no= '" & txt_tel.Text & "','" & dtp_dob.Text & "' where employee_id='" & cmb_id.Text & "'") If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Updated") MsgBox(cmb_id.Text) 'MsgBox(cmbcust_id.Text = "updated")

'frm_main.TransactionToolStripMenuItem.Enabled = True

'main.Show() 'End If

End If

query = ("update emp set employee_name='" & txt_name.Text & "',city='" & txt_city.Text & "',add='" & txt_add.Text & "',tel_no= '" & txt_tel.Text & "' ,dob= '" & dtp_dob.Text & "',doj= '" & dtp_doj.Text & " ' where employee_id='" & cmb_id.Text & "'") If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted") MsgBox(cmb_id.Text)

Me.Close()

frmmdi.TransactionToolStripMenuItem.Enabled = True

'main.Show() End If

End If Dim str(Me.lst_table.Columns.Count) As String Dim itm As ListViewItem str(0) = cmb_id.Text.Trim str(1) = txt_name.Text.Trim str(2) = txt_city.Text.Trim str(3) = txt_add.Text.Trim str(6) = txt_tel.Text.Trim str(4) = dtp_dob.Text.Trim str(5) = dtp_doj.Text.Trim

itm = New ListViewItem(str) lst_table.Items.Add(itm)

End Sub

Private Sub btn_clear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_clear.Click txt_name.Text = "" txt_add.Text = "" txt_city.Text = ""

JATIN SATVI

Page 77: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

dtp_dob.Text = "" dtp_doj.Text = "" txt_tel.Text = ""

End Sub

Private Sub frm_emp_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'txt_id.Enabled = False End Sub

Private Sub txt_id_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) btn_delete.Enabled = False End Sub

Private Sub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click strstatus = "update" con.OpenConn() con.fillcombo(cmb_id, "emp", "employee_id")

End Sub

Private Sub cmb_id_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_id.SelectedIndexChanged

End Sub

Private Sub cmb_id_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmb_id.TextChanged con.OpenConn() If strstatus = "update" Then query = "select * from emp where employee_id ='" & cmb_id.Text & "'" rs = con.RetriveDataBaseQuery(query)

If rs.HasRows = True Then rs.Read() txt_name.Text = rs("name") txt_add.Text = rs("add") txt_city.Text = rs("city") txt_tel.Text = rs("tel_no")

End If End If con.CloseConn()

End Sub

Private Sub txt_tel_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_tel.KeyPress If Asc(e.KeyChar) <> 8 Then txtValidationNumberonly(e.KeyChar, txt_tel) End If

JATIN SATVI

Page 78: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

End Sub

Private Sub txt_tel_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_tel.TextChanged

End Sub

Private Sub txt_tel_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txt_tel.Validating If CInt(txt_tel.Text.Length) < 10 Then MsgBox("Please Enter 10 digit mobile no. ") e.Cancel = True End If End Sub

Private Sub txt_name_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_name.KeyPress If Asc(e.KeyChar) <> 8 Then txtValidationCharonly(e.KeyChar, txt_name) End If End Sub

Private Sub txt_name_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_name.TextChanged

End SubEnd Class

JATIN SATVI

Page 79: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

PRODUCT

Imports System.Data.SqlClient

JATIN SATVI

Page 80: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Public Class frm_product Dim con As New dbConnection Dim query1 As String Dim query As String Dim ds As New DataSet Dim da As SqlDataAdapter Public cmd As New SqlCommand Public status As String Public sqlConnect As SqlClient.SqlConnection Public strConnectionStr As String Public rs As SqlDataReader Public strstatus As String Dim recordsAffected As Integer Public i As Integer

Private Sub btn_exit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_exit.Click Me.Close()

End Sub

Private Sub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.Click If cmbprod_id.Text = "" And cmbprod_name.Text = "" And txtprod_rate.Text = "" Then MsgBox("PLEASE INSERT THE ALL VALUES") Else con.OpenConn() query = "insert into product1 values('" & cmbprod_id.Text.Trim & "','" & cmbprod_name.Text & "'," & Val(txtprod_rate.Text) & ")" 'cmd.CommandText = "insert into product values(?,?,?)" 'cmd.Parameters.AddWithValue("prod_id", cmbprod_id.Text.Trim) 'cmd.Parameters.AddWithValue("prod_name", cmbprod_name.Text.Trim) 'cmd.Parameters.AddWithValue("prod_rate", Val(txtprod_rate.Text))

If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted") MsgBox(cmbprod_id.Text)

Me.Close()

frmmdi.TransactionToolStripMenuItem.Enabled = True

'main.Show() End If End If If strstatus = "update" Then

con.OpenConn() query = ("update product1 set prod_name='" & cmbprod_name.Text & "',prod_rate='" & txtprod_rate.Text & "'") MsgBox(cmbprod_id.Text) 'MsgBox(cmbcust_id.Text = "updated")

JATIN SATVI

Page 81: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Updated")

'frm_main.TransactionToolStripMenuItem.Enabled = True

'main.Show() 'End If

End If

query = ("update product1 set prod_name='" & cmbprod_name.Text & "',prod_rate='" & txtprod_rate.Text & "'") If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted") MsgBox(cmbprod_id.Text)

End If End If

End Sub

Private Sub btn_cleare_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_cleare.Click cmbprod_id.Text = "" cmbprod_name.Text = "" txtprod_rate.Text = ""

End Sub

Private Sub frm_product_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click strstatus = "update" con.OpenConn() con.fillcombo(cmbprod_id, "product1", "prod_id")

End Sub

Private Sub cmbprod_id_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbprod_id.SelectedIndexChanged con.OpenConn() If strstatus = "update" Then query = "select * from product1 where prod_id ='" & cmbprod_id.Text & "'" rs = con.RetriveDataBaseQuery(query)

If rs.HasRows = True Then rs.Read() cmbprod_name.Text = rs("prod_name") txtprod_rate.Text = rs("prod_rate")

JATIN SATVI

Page 82: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

End If End If con.CloseConn() End SubEnd Class

BILL

JATIN SATVI

Page 83: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Imports System.Data.SqlClientPublic Class frm_bill

JATIN SATVI

Page 84: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Dim con As New dbConnection Dim query1 As String Dim query As String Dim query2 As String Dim query3 As String Dim query4 As String Dim query5 As String Dim query6 As String Dim query7 As String Dim query8 As String Dim query9 As String Dim ds As New DataSet Dim da As SqlDataAdapter Public cmd As New SqlCommand Public status As String Public sqlConnect As SqlClient.SqlConnection Public strConnectionStr As String Public rs As SqlDataReader Dim recordsAffected As Integer Public i As Double Public t1 As Double Public t2 As Double Public t3 As Double Public t4 As Double Public t5 As Double Public t6 As Double Dim itm As ListViewItem

Private Sub txtpc_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub

Private Sub btn_exit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_exit.Click Me.Close()

End Sub

Private Sub frm_bill_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load con.OpenConn()

query1 = "select count(*) as ie from bill" rs = con.RetriveDataBaseQuery(query1) If rs.HasRows Then rs.Read() txt_billno.Text = "b" & rs("ie") + 1 Else MsgBox("no id") End If con.CloseConn()

End Sub

JATIN SATVI

Page 85: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Private Sub grb_transaction_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles grb_transaction.Enter

End Sub

Private Sub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.Click con.OpenConn() 'query1 = "select count(*) as ie from bill" 'rs = con.RetriveDataBaseQuery(query1) 'If rs.HasRows Then ' rs.Read() ' txt_billno.Text = "b" & rs("ie") + 1 'Else ' MsgBox("no id") 'End If query3 = "select * from bill where prod_id='p1' and cust_id='" & cmbcust_id.Text & "'" rs = con.RetriveDataBaseQuery(query3) If rs.HasRows Then rs.Read() t1 = rs("tot")

End If query4 = "select * from bill where prod_id='p2' and cust_id='" & cmbcust_id.Text & "'" rs = con.RetriveDataBaseQuery(query3) If rs.HasRows Then rs.Read() t2 = rs("tot")

End If query5 = "select * from bill where prod_id='d1' and cust_id='" & cmbcust_id.Text & "'" rs = con.RetriveDataBaseQuery(query3) If rs.HasRows Then rs.Read() t3 = rs("tot")

End If query6 = "select * from bill where prod_id='d2' and cust_id='" & cmbcust_id.Text & "'" rs = con.RetriveDataBaseQuery(query3) If rs.HasRows Then rs.Read() t4 = rs("tot")

End If 'query7 = "select * from bill where prod_id='o1' and cust_id='" & cmbcust_id.Text & "'" 'rs = con.RetriveDataBaseQuery(query3) 'If rs.HasRows Then ' rs.Read() ' t5 = rs("tot")

'End If

JATIN SATVI

Page 86: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

'query8 = "select * from bill where prod_id='o2' and cust_id='" & cmbcust_id.Text & "'" 'rs = con.RetriveDataBaseQuery(query3) 'If rs.HasRows Then ' rs.Read() ' t6 = rs("tot")

'End If query2 = "select cust_name from cust where cust_id='" & cmbcust_id.Text & "'" rs = con.RetriveDataBaseQuery(query2) If rs.HasRows Then rs.Read() txtname.Text = rs("cust_name") Else MsgBox("no id") End If 'query3 = "select * from product1 where prod_id='" & cmbprod_id.Text & "'" 'rs = con.RetriveDataBaseQuery(query3) 'If rs.HasRows Then ' rs.Read() ' txtpname.Text = rs("prod_name") ' txtprod_rate.Text = rs("prod_rate") 'Else ' MsgBox("no id") 'End If

txtbill.Text = t1 + t2 + t3 + t4 + t5 + t6 query = "insert into report values('" & cmbcust_id.Text & "','" & txtbill.Text & "')" If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted") End If 'query = "insert into bill values('" & cmbcust_id.Text & "','" & cmbprod_id.Text & "','" & txtvehical.Text & "','" & txtq.Text & "','" & txt_total.Text & "','" & txt_billno.Text & "','" & dtp_date.Text & "')" 'If con.ExecuteDataBaseQuery(query) = True Then ' MsgBox("Inserted") ' MsgBox(txt_billno.Text) ' Dim str(Me.lst_table.Columns.Count) As String ' Dim itm As ListViewItem ' str(0) = cmbcust_id.Text.Trim

' str(1) = cmbprod_id.Text

' str(2) = txtvehical.Text ' str(3) = txtq.Text ' str(4) = txt_total.Text

' str(5) = txt_billno.Text ' str(6) = dtp_date.Text

' itm = New ListViewItem(str) ' lst_table.Items.Add(itm) ' 'cmd.Connection = sqlConnect

JATIN SATVI

Page 87: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

' 'If cmd.ExecuteNonQuery() > 0 Then ' ' MsgBox("saved") ' ' cmd.Connection = sqlConnect ' ' cmd.ExecuteReader() frmmdi.TransactionToolStripMenuItem.Enabled = True con.CloseConn()

'End If

'txtpname.Text = "" 'txtprod_rate.Text = "" 'txtq.Text = ""

'txt_total.Text = "" 'con.CloseConn()

'Me.Close()

'End If

End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtvehical.TextChanged

End Sub

Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click

End Sub

Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click con.OpenConn()

query2 = "select cust_name from cust where cust_id='" & cmbcust_id.Text & "'" rs = con.RetriveDataBaseQuery(query2) If rs.HasRows Then rs.Read() txtname.Text = rs("cust_name") Else MsgBox("no id") End If query3 = "select * from product1 where prod_id='" & cmbprod_id.Text & "'" rs = con.RetriveDataBaseQuery(query3) If rs.HasRows Then rs.Read() txtpname.Text = rs("prod_name")

JATIN SATVI

Page 88: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

txtprod_rate.Text = rs("prod_rate") Else MsgBox("no id") End If txt_total.Text = txtprod_rate.Text * txtq.Text query = "insert into bill values('" & cmbcust_id.Text & "','" & cmbprod_id.Text & "','" & txtvehical.Text & "','" & txtq.Text & "','" & txt_total.Text & "','" & txt_billno.Text & "','" & dtp_date.Text & "')" If con.ExecuteDataBaseQuery(query) = True Then MsgBox("Inserted")

Dim str(Me.lst_table.Columns.Count) As String Dim itm As ListViewItem str(0) = cmbcust_id.Text.Trim

str(1) = cmbprod_id.Text

str(2) = txtvehical.Text str(3) = txtq.Text str(4) = txt_total.Text

str(5) = txt_billno.Text str(6) = dtp_date.Text

itm = New ListViewItem(str) lst_table.Items.Add(itm) 'cmd.Connection = sqlConnect 'If cmd.ExecuteNonQuery() > 0 Then ' MsgBox("saved") ' cmd.Connection = sqlConnect ' cmd.ExecuteReader()

con.CloseConn()

'End If

txtpname.Text = "" txtprod_rate.Text = "" txtq.Text = ""

txt_total.Text = "" con.CloseConn() End If End Sub

Private Sub btnnew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnnew.Click 'query1 = "select count(*) as ie from bill" 'rs = con.RetriveDataBaseQuery(query1) 'If rs.HasRows Then ' rs.Read() ' txt_billno.Text = "b" & rs("ie") + 1 'Else ' MsgBox("no id") 'End If

JATIN SATVI

Page 89: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

End Sub

'Private Sub txtid_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtid.TextChanged 'Lst_table.Items.Clear() 'con.OpenConn() 'cmd.Dispose() 'cmd = New SqlCommand 'cmd.CommandText = "select * from bill_status where id=?" 'cmd.Parameters.AddWithValue("id", txtid.Text.Trim)

'While rs.Read ' Try

' Dim str(Me.Lst_table.Columns.Count) As String ' Dim itm As ListViewItem ' str(0) = rs("id")

' str(1) = rs("ddate")

' str(2) = rs("dies") ' str(3) = rs("test")

' itm = New ListViewItem(str) ' Lst_table.Items.Add(itm)

' Catch ex As Exception ' MsgBox(ex.Message) ' End Try 'End While

'con.CloseConn()

'End Sub

Private Sub txtid_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub

Private Sub cmbprod_id_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbprod_id.SelectedIndexChanged query3 = "select * from product1 where prod_id='" & cmbprod_id.Text & "'" rs = con.RetriveDataBaseQuery(query3) If rs.HasRows Then rs.Read() txtpname.Text = rs("prod_name") txtprod_rate.Text = rs("prod_rate") Else MsgBox("no id") End If End Sub

JATIN SATVI

Page 90: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Private Sub cmb_id_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbcust_id.SelectedIndexChanged query2 = "select cust_name from cust where cust_id='" & cmbcust_id.Text & "'" rs = con.RetriveDataBaseQuery(query2) If rs.HasRows Then rs.Read() txtname.Text = rs("cust_name") Else MsgBox("no id") End If End Sub

Private Sub txt_total_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_total.TextChanged

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ObjReportRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument Dim ObjReportViewer As BillViewer = New BillViewer Dim dsStateCity As New DataSet Try ObjReportRpt = New CrystalReport1

query = "select bill.cust_id,prod_name,vehical_no,quantity,tot,billno,bill.dob,prod_rate,cust_name from bill inner join cust on (bill.cust_id = cust.cust_id) inner join product1 on(bill.prod_id = product1.prod_id) where billno='" & txt_billno.Text & "'"

dsStateCity = con .RetrieveDataset(query) ObjReportRpt.Database.Tables(0).SetDataSource(dsStateCity.Tables(0)) 'If dsStateCity.Tables(0).Rows.Count > 0 Then ' ObjReportViewer.ReportViewerControl.ReportSource = ObjReportRpt 'End If 'ObjReportViewer.ShowInTaskbar = True ObjReportViewer.Show() ObjReportViewer.Focus() Catch ex As Exception ex.Source = "btnOk_Click" End Try

End SubEnd Class

REPORT

JATIN SATVI

Page 91: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Imports System.Data.SqlClientImports System.CollectionsPublic Class BillViewer

JATIN SATVI

Page 92: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Dim rpt As New CrystalReport1 Dim selectquery As New SqlCommand Public con As New SqlConnection("Data Source=DABHOLKA-3B44DB;Initial Catalog=ELECTRONIC LABORATORY SYSTEM;Integrated Security=True") Dim myDA As New SqlDataAdapter()

Dim myDS As New DataSet() Dim rowcnt As Integer = 0 Dim SqlSelect As String Sub New(ByVal querry)

' This call is required by the Windows Form Designer. InitializeComponent() SqlSelect = querry ' Add any initialization after the InitializeComponent() call. End Sub Private Sub BillViewer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try selectquery.Connection = con selectquery.CommandText = SqlSelect selectquery.CommandType = CommandType.Text myDA.SelectCommand = selectquery myDA.Fill(myDS, "Billview") rpt.SetDataSource(myDS) CrystalReportViewer1.ReportSource = rpt Me.CrystalReportViewer1.RefreshReport() Me.CrystalReportViewer1.ExportReport() Catch Excep As Exception MsgBox(Excep.Message) End Try End SubEnd Class

JATIN SATVI

Page 93: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Implementation:

First install the vb.net 2005 .

Install your project.

Install SQL server 2000.

Restore your database.

Run your projec

JATIN SATVI

Page 94: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Future Scope:

Improvement in some form designing.

More reports generation.

Billing processes.

JATIN SATVI

Page 95: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

Bibliography

Programming with Visual Basic 6.0 By, Francesco Balena.

System Analysis and Design In a changing World. By, Satzinger, Jackson &Burd.

Mastering Visual Basic 6.0 By,EvangelosPetroutsos.

JATIN SATVI

Page 96: Late Shri Vishnu Waman Thakur Charitable Trust

PETROLPUMP

JATIN SATVI