You are on page 1of 50

“PICK & DROP

COURIER
SYSTEM”

1
DR.BABASAHEB AMBEDKAR MARATHWADA UNIVERSITY
AURANGABAD.

PROJECT REPORT ON
“PICK & DROP COURIER SYSTEM ”

-GUIDED BY-

-PROJECT INCHARGE-

-SUBMITTED BY-

DEPARTMENT OF BACHELOROF COMPUTER APPLICATION.


APEX INSTITUTE OF COMPUTER AND MANAGEMENT STUDIES
AURANGABAD.
ACADEMIC YEAR.2017-18

2
APEX INSTITUTE OF COMPUTER AND MANAGEMENT STUDIES
AURANGABAD

“CERTIFICATE”
This is to certify that the project report entitled

“ COURIER MANAGEMENT SYSTEM ”


Has been duly completed towards the partial fulfillment of the requirement
for the award of Degree of BACHELOR OF COMPUTER SCIENCE Third Year
by Dr. B. A. Marathwada University Aurangabad during the Academic year
2017-2018.

-SUBMITTED BY-

XYXZ
Project Guide. Head of TheDept.

PROF. SHAIKH FARHEEN


Principal

3
ACKNOWLEDGEMENT
No successful work can ever be effect of single individual efforts,
Teamwork dedication and motivation is behind every accomplishment.

I would like to take this opportunity to acknowledge with pleasure and


express our deep sense of gratitude and immense respect towards my guide
PROF. TRUPTI LANDE And projectIncharge PROF. SUPRIYA DASKHEDKA
Department of Bachelor Of Computer Science, APEX INSTITUTE OF
COMPUTER AND MANAGEMENT STUDIES, Aurangabad, for their unfailing
inspiration, valuable guidance, constant encouragement and untiring
patience which they have included in us who will take us a long way in life.

Specially I like to thanks to Principal Prof.Shaikh Farheen For their


inspiring Guidance, motivation & encouragement and providing require
facility to my Project. I would also like to thanks all the staff member of the
department those who have contributed intellectually and materially for the
reparation of this Project.

Last but not the least, this acknowledgement would be incomplete


without rendering our sincere gratitude to all those who have helped us in
the completion of this project.

Submitted by

BCA THIRDYEAR

INDEX

4
CHAPTE SECTIO DESCRIPTION PAGE
R N NUMBER
NUMBER NUMBE S
R
1. Introduction.

1.1 Introduction to Project.

1.2 Scope of Project.

2. System

2.1 Hardware Requirements


2.2 Software Requirements

3. System Analysis And Design

3.1 Entity Relationship Diagram(ERD)


3.2 Data Flow Diagram (DFD)
3.3 Data Dictionary
3.4 Table Designs
3.5 Feasibility Study
3.6 Input Designs
3.7 Output Designs

4. Conclusion

5. Bibliography

1.INTRODUCTION

5
1.1 INTRODUCTION TO PROJECT
The pick and drop Courier Service system is a simple PHP project. In
this project, you can simply perform the CRUD operations to manage the couriers and
the parcels. This project intends to develop the concept of the working mechanism of
the courier department. You can log in as the system administrator and also can add
and delete the managers. You can also add the departments.
In this system, you have to enter your pick up point and delivery point.
The main advantage of this Courier Service system over the courier system is you can
decide the time limit i.e. within 60 minutes, within 90 minutes and within 3 hours.
Based on the time you will be charged the lesser is time more you will be charged.
The existing Courier Service System, If you want to deliver a product from one place
to another place in a city. We have to look for a courier system, But the drawback of
the courier system is that you cannot decide time limit and major concern is the
weight of the product to be delivered. If we need to deliver product immediately then
we cannot use courier system nowadays. If not courier system, then we have to deliver
the product by ourselves and invest our time, this becomes a tedious and hectic task.
This application avoids the manual work and the problems concern with
it. It is an easy way to obtain the information regarding the various products
information that are present in the couriers offices. The System is Technically feasible
because here we are using PHP and Post sql / MySQL database which is free to use
even for commercial purposes. From the user’s point of view, it is feasible because it
can fulfill users requirements and maintain their records and additional feature like
deciding specific timeslots are also available.

1.2 SCOPE OF THE PROJECT:

6
This application avoids the manual work and the problems concern with it. It is
an easy way to obtain the information regarding the various products information that
are present in the couriers offices.

Well I and my team members have worked hard in order to present an


improved application better than the existing one’s regarding the information about
the various activities. Still ,we found out that the project can be done in a better way.
Primarily, when we request information about a particular product it just shows the
company, product id, product name and no. of quantities available. So, after getting
the information we can get access to the product company website just by a click on
the product name .

The next enhancement that we can add the searching option. We can directly
search to the particular product company from this site .These are the two
enhancements that we could think of at present. The present courier system involves a
lot of the employees at the office. The data of a particular courier maintained in a
proper file. A person summarizes all the data of the courier in a register, this work of
making a summary of the courier in the register require a high-level of attention since
it has to be taken care that no wring entry goes into the register. This repetitive work
may lead to errors in the entry thus resulting in the wrong entry of courier packed
data.

Since the data is maintained in the registers, the modification of data cannot
do easily. The previous information has to be erased and overwritten or a new page
has to be allocated so that both the old and new information can be written on the
same page.

2. SYSTEM STUDY

7
2.1EXISTING SYSTEM STUDY

The system study phase studies the problem, identifies alternate


Solutions evaluate those solutions and finally recommends the best solution. The
system study gives the structure & function of the system.The system Study can be
performed only on an existing system.

The system study gives an idea of then user requirements. A detailed


system study is an essential for developing an efficient system.The techniques used
are:

 Observation
 Interview
 Discussion

Observation :

Observation of the functioning of the existing system gives the Idea for
the design of the new system. This will figure of the pitfalls of the Current system. It
is helpful to understand and study the entire current system. By observation we
can point out the changes needed to the existing system. It also validates the data
gathered by other means. It also gives a better understanding of the workloads &
pressures faced.

Interview:

8
The main objective of the interview is to gather information
Regarding the system from the concerned authorities/employees to find the System
requirements & there by improving the existing system. Interviewing the managerial
staff & users can make a thorough understanding of the system &this will be
useful to improve the efficiency of the existing system.

Discussion:

The main objective of the discussion is to transfer the ideas


between the department & the system developer. Through discussions, the problem
faced by the user during data entry, data retrieval, report generation can be
understood.

2.2Limitations of existing system:

9
At present, the requirements of the system are done manually and hence there
are number of limitations.

 The various activities are carried out by different section


depending on their activity.
 The various status information is maintained in books and files,
which is very difficult.
 Reports are produced by manual processing, that will be an
unformatted manual and unreliable.
 Data security is less.
 Calculations are done manually.

Comparative system study:

Since at present every thing is done manually, it is having lot of


drawbacks. The major drawback of the present system is the bulk amount of physical
volume of the data making information search & retrieval a tedious process. There are
changes of papers containing information.

Because of all these problems of the present system development of the


computerized system, which could solve all these, was inevitable. In the case of
manual entry, chances of entering incorrect data are high. With the help of help
messages & validation checks the new system can contribute a lot to the accuracy
of data report generation is very easy. Computerized system can handle large
inflow of data. It is fast flexible & user-friendly than the manual one.

2.3 PROPOSED SYSTEM:

10
The proposed s system tries to avoid the problems arised in the
existing system. It automates the entire process of embroiding management
System. It should have a provision to maintain master entries, provision to
Prepare inward, invoice etc. It should also provide often needed reports
toSatisfy the need of the concern.

2.4 MERITS OF PROPOSED SYSTEM:

As the proposed system is system oriented it is faster than the manual


process
It also minimizes the errors in the data entry.
It improves customer satisfaction due to the improvement in the
stitches.
It reduces the burden of staff.

3.SYSTEM REQUIREMENT

11
 Requirement Analysis

Systems analysis is the study of sets of interacting entities, including


computer systems analysis. This field is closely related to operations research. It is
also "an explicit formal inquiry carried out to help someone (referred to as the
decision maker) identify a better course of action and make a better decision than he
might otherwise have made."Analysis is defined as the procedure by which we break
down an intellectual or substantial whole into parts so that we can achieve our end
goals. The development of a computer-based information system includes a systems
analysis phase which produces or enhances the data model which itself is a precursor
to creating or enhancing database . There are a number of different approaches to
system analysis. When a computer-based information system is developed, systems
analysis would constitute the following steps:

1. The development of a feasibility study, involving determining whether a


project is economically, socially, technologically and organizationally
feasible.

2. Conducting fact-finding measures, designed to ascertain the requirements


of the system's end-users. These typically span interviews, questionnaires,
or visual observations of work on the existing system.

3. Gauging how the end-users would operate the system (in terms of general
experience in using computer hardware or software), what the system
would be used for etc.

Another view outlines a phased approach to the process. This approach breaks
systems analysis into 5 phases:

12
 Scope definition

 Problem analysis

 Requirements analysis

 Logical design

 Decision analysis

Use case are a widely-used systems analysis modeling tool for identifying and
expressing the functional requirements of a system. Each use case is a business
scenario or event for which the system must provide a defined response. Use cases
evolved out of object-oriented analysis.

 Requirement specification

Information gathering is usually the first phase of the software development


project. The purpose of this phase is to identify and document the exact requirements
for the system. The user‘s request identifies the need for a new information system
and on investigation re-defined the new problem to be based on MIS, which supports
management. The objective is to determine whether the request is valid and feasible
before recommendation is made to build a new or existing manual system continues.

The major steps are –


 Defining the user requirements.

 Studying the present system to verify the problem.

13
 Defining the performance expected by the candidate to use requirements.

 2.3. HARDWARE REQUIREMENTS

• PROCESSOR : INTEL PENTIUM AND ABOVE VERSION

• SPEED : 1.60 GHZ

• HARD DISK : 20GB AND ABOVE

• KEY BOARD : STANDARD

2.4 SOFTWARE REQUIREMENTS

• OPERATING SYSTEM : WINDOWS 7

• DATA BASE : MY SQL

• TOOLS : XAMMP

3. SYSTEM ANALYSIS AND DESIGN

14
 SYSTEM DESIGN
Systems design is the process or art of defining the architecture, components,

modules, interfaces, and data for a system to satisfy specified requirements. Object-

oriented analysis and design (OOAD) methods are becoming the most widely used

methods for computer system design. The UML has become the standard language used

in Object-oriented analysis and design. It is widely used for modeling software systems

and is increasingly used for high designing non-software systems and organizations

3.1 ENTITY RELATIONSHIP DIAGRAM {ERD}

15
3.3DATA FLOW CHART

16
3.4 DATA TABLE DESIGN
DatabaseTable: Login

17
No. Field Name Data Type Description Constraint
1. UserID Number User ID Primary Key
2. User Name Text User Name
2. Password Integer Password

Database Table: Registration

No. Field Name Data Type Description Constraint


1 User Name Text Customer Primary Key
Number
2 User Type Text Customer -
Source
3 Password Number Customer -
Mobile
4 Name Text Customer -
Email
5 Contact No Number Customer -
Address
6 Registered date Number Customer -
Address

Database Table: Book Entry


Field Name Data Type Size Relation

Accno Int 50 Primary key

Author Varchar 50 Not null

18
Title Varchar 50 Not null

Publication Varchar 50 Not null

Edition Varchar 50 Not null

No_of_copies Int Not null

Volumn Varchar 50 Not null

Date_pur Date 50 Not null

Price Decimal (18,2) Not null

Status Varchar(50) 50 Not null

Database Table: student


Field Name Data Type Size Relation
Name Varchar 50 Not null
Regno Int 50 Primary key
Date_of_issue Datetime Not null
Addresss Varchar 50 Not null
Date_of_return Datetime Not null
Course Varchar 50 Not null
Accno Int 50 Foreign key
Gender Varchar 50 Not null

Database Table: Book Issue


Field Name Data Type Size Relation

Regno Int 50 Foreign key

Date_of_issue_books Datetime Not null

Date_of_return_books Datetime Not null

19
Accno Int 50 Not Null

Name Varchar 50 Not null

Course Varchar 50 Not null

Author Varchar 50 Not null

Volumn Varchar 50 Not null

Edition Varchar 50 Not null

3.5 FEASIBILITY STUDY

Feasibility study is the process of determination of whether or not a project is


worthdoing. Feasibility studies are undertaken within tight time constraints and normally
culminate in a written and oral feasibility report. The contents and recommendations of this

20
feasibility study helped us as a sound basis for deciding how to precede the project. It helped
in taking decisions such as which software to use, hardware combinations, etc.The following
is the process diagram for feasibility analysis. In the diagram,the feasibility analysis starts
with the user set of requirements. With this, the existingsystem is also observed. The next
step is to check for the deficiencies in the existingsystem. By evaluating the above points a
fresh idea is conceived to define and quantify therequired goals. Besides that, a set of
alternatives and their feasibility is also considered incase of any failure in the proposed
system. Thus, feasibility study is an important part insoftware development.

In the SDLC (Systems Development Life Cycle) of our project we maintained a number of
feasibility checkpoints between the two phases of the SDLC.These checkpoints indicate that
the management decision to be made after a phase is complete. The feasibility checkpoints in
our project were as follows:(i)

 Survey phase checkpoint

 Study phase checkpoint

 Selection phase checkpoint

 Acquisition phase checkpoint

 Design phase checkpoint

1. ECONOMIC FEASIBILITY:
In this type of feasibility, the cost of hardware, software and overall
budget is evaluated to run the new system. Tangible and intangible benefits are also
considered in the evaluation.

21
2. TECHNICAL FEASIBILITY:
in this type of feasibility, the present hardware and software compatibility with
the new one is checked out to run the new system.

3. OPERATIONAL FEASIBILITY:

In this type of feasibility, the issues like, operational scope for the fast
acceptability of the alternative solution, human issues, social issues, internal issues
(organizational conflicts) and legal issues are to be checked out.

4. SCHEDULES FEASIBILITY:
In this type of feasibility, the skills required for properly applying the new
technology with training in minimum time and the time duration can be checked out to
implement or overrun the new project within minimum time.

3.6 OUTPUT DESINS

LOGIN FORM
22
MAIN FORM

23
REGISTRATION FORM

24
BOOKS ENTRY FORM

25
STUDENT ENTRY FORM

26
BOOK ISSUE FORM

27
28
3.7 INPUT DESING
LOGIN FORM
Imports System.Data.OleDb
Public Class Frmlogin

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


Handles Button1.Click
If Len(Trim(cmbUserType.Text)) = 0 Then
MessageBox.Show("Please select user type", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
cmbUserType.Focus()
Exit Sub
End If
If Len(Trim(txtUsername.Text)) = 0 Then
MessageBox.Show("Please enter user name", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
txtUsername.Focus()
Exit Sub
End If
If Len(Trim(txtPassword.Text)) = 0 Then
MessageBox.Show("Please enter password", "Input Error", MessageBoxButtons.OK,
MessageBoxIcon.Error)
txtPassword.Focus()
Exit Sub
End If
Try
Dim myConnection As OleDbConnection
myConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=|DataDirectory|\LMS_DB.accdb;Persist Security Info=False;")
Dim myCommand As OleDbCommand

29
myCommand = New OleDbCommand("SELECT users.username,User_password FROM
Users,Registration where Registration.Username=users.username and Users.Username =
@Username and user_password = @UserPassword", myConnection)

Dim uName As New OleDbParameter("@Username", SqlDbType.VarChar)


Dim uPassword As New OleDbParameter("@UserPassword", SqlDbType.VarChar)
uName.Value = txtUsername.Text
uPassword.Value = txtPassword.Text
myCommand.Parameters.Add(uName)

myCommand.Parameters.Add(uPassword)

myCommand.Connection.Open()

Dim myReader As OleDbDataReader =


myCommand.ExecuteReader(CommandBehavior.CloseConnection)

Dim Login As Object = 0

If myReader.HasRows Then

myReader.Read()

Login = myReader(Login)

End If

If Login = Nothing Then

MsgBox("Login is Failed...Try again !", MsgBoxStyle.Critical, "Login Denied")


txtUsername.Clear()
txtPassword.Clear()
txtUsername.Focus()

30
Else

ProgressBar1.Visible = True
ProgressBar1.Maximum = 5000
ProgressBar1.Minimum = 0
ProgressBar1.Value = 4
ProgressBar1.Step = 1

For i = 0 To 5000
ProgressBar1.PerformStep()
Next
Me.Hide()
frmMain.lblUser.Text = txtUsername.Text
frmMain.Show()
End If
myCommand.Dispose()
myConnection.Close()
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

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


Handles MyBase.Load

End Sub

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


Handles Button2.Click
End
End Sub

Private Sub linkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles linkLabel1.LinkClicked
31
Me.Hide()
frmChangePassword.Show()
frmChangePassword.cmbUserType.Text = ""
frmChangePassword.UserName.Text = ""
frmChangePassword.OldPassword.Text = ""
frmChangePassword.NewPassword.Text = ""
frmChangePassword.ConfirmPassword.Text = ""
frmChangePassword.cmbUserType.Focus()
End Sub

Private Sub linkLabel3_LinkClicked(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles linkLabel3.LinkClicked
Me.Hide()
frmPasswordRecovery.Show()
End Sub

Private Sub Frmlogin_FormClosing(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
End
End Sub
End Class

32
MAIN FORM
Public Class frmMain

Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles AboutToolStripMenuItem.Click
frmAbout.Show()
End Sub

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


Handles Timer1.Tick
lblDateTime.Text = Now
End Sub

Private Sub CalculatorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles CalculatorToolStripMenuItem.Click
System.Diagnostics.Process.Start("Calc.exe")
End Sub

Private Sub NotepadToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles NotepadToolStripMenuItem.Click
System.Diagnostics.Process.Start("Notepad.exe")
End Sub

Private Sub TaskManagerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles TaskManagerToolStripMenuItem.Click
System.Diagnostics.Process.Start("TaskMgr.exe")
End Sub

Private Sub MSWordToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MSWordToolStripMenuItem.Click
System.Diagnostics.Process.Start("WinWord.exe")
End Sub

33
Private Sub WordpadToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles WordpadToolStripMenuItem.Click
System.Diagnostics.Process.Start("Wordpad.exe")
End Sub

Private Sub SystemInfoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles SystemInfoToolStripMenuItem.Click
frmSystemInfo.Show()
End Sub

Private Sub StudentsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles StudentsToolStripMenuItem.Click
frmStudent.Show()
End Sub

Private Sub LogoutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles LogoutToolStripMenuItem.Click
Me.Hide()
frmAbout.Hide()
frmSystemInfo.Hide()
frmStudent.Hide()
frmBookIssue.Hide()
frmBookReturn.Hide()
frmBookEntry.Hide()
frmStudent.Hide()
frmBookReturn.Hide()
frmCourse.Hide()
frmStaff.Hide()
frmSupplier.Hide()
frmRegistration.Hide()
frmLoginDetails.Hide()
frmBookRecord.Hide()
frmDepartment.Hide()
frmYears.Hide()
34
frmJournalsMagzinesRecord1.Hide()
frmStudentRecord1.Hide()
frmStaffRecord1.Hide()
frmNewsPaper.Hide()
frmNewsPaperRecord1.Hide()
frmProjectRecord1.Hide()
frmBookIssueRecord1.Hide()
frmBookIssueRecord_Staff1.Hide()
frmSupplierRecord.Hide()
frmStudentList.Hide()
frmStudentListRecord1.Hide()
frmBookIssueRecord1.Hide()
frmBookIssueRecord_Staff1.Hide()
frmBookReturnRecord_Student1.Hide()
frmBookReturnRecord_Staff1.Hide()
frmCards.Hide()
frmStudentsCardRecord.Hide()
frmStaffCardRecord.Hide()
frmNoDues.Hide()
frmStudentsNoDuesdRecord.Hide()
frmStaffsNoDuesRecord.Hide()
Frmlogin.Show()
Frmlogin.cmbUserType.Text = ""
Frmlogin.txtUsername.Text = ""
Frmlogin.txtPassword.Text = ""
Frmlogin.ProgressBar1.Visible = False
Frmlogin.cmbUserType.Focus()
End Sub

Private Sub IssueToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles IssueToolStripMenuItem.Click
frmBookIssue.Show()
End Sub

35
Private Sub BookReturnToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles BookReturnToolStripMenuItem.Click
frmBookReturn.Show()
End Sub

Private Sub BooksToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BooksToolStripMenuItem.Click
frmBookEntry.Show()
End Sub

Private Sub BooksToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BooksToolStripMenuItem1.Click
frmBookEntry.Show()
End Sub

Private Sub StudentsToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles StudentsToolStripMenuItem1.Click
frmStudent.Show()
End Sub

Private Sub BooksReturnToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles BooksReturnToolStripMenuItem.Click
frmBookReturn.Show()
End Sub

36
REGISTRATION FORM
Imports System.Data.OleDb
Public Class frmRegistration
Dim rdr As OleDbDataReader = Nothing
Dim dtable As DataTable
Dim con As OleDbConnection = Nothing
Dim adp As OleDbDataAdapter
Dim ds As DataSet
Dim cmd As OleDbCommand = Nothing
Dim dt As New DataTable
Dim cs As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|
DataDirectory|\LMS_DB.accdb;Persist Security Info=False;"
Sub Reset()
txtContactNo.Text = ""
txtEmailID.Text = ""
txtName.Text = ""
txtPassword.Text = ""
txtUsername.Text = ""
cmbUserType.Text = ""
txtUsername.Focus()
btnSave.Enabled = True
btnUpdate_record.Enabled = False
btnDelete.Enabled = False
End Sub
Private Sub frmRegistration_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Getdata()
End Sub
Public Sub Getdata()
Try
con = New OleDbConnection(cs)
con.Open()
cmd = New OleDbCommand("SELECT * from Registration order by JoiningDate", con)

37
rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
DataGridView1.Rows.Clear()
While (rdr.Read() = True)
DataGridView1.Rows.Add(rdr(0), rdr(1), rdr(2), rdr(3), rdr(4), rdr(5), rdr(6))
End While
con.Close()
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

Private Sub btnNewRecord_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnNewRecord.Click
Reset()
End Sub

Private Sub DataGridView1_RowHeaderMouseClick(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles
DataGridView1.RowHeaderMouseClick
Try
Dim dr As DataGridViewRow = DataGridView1.SelectedRows(0)
txtUsername.Text = dr.Cells(0).Value.ToString()
TextBox1.Text = dr.Cells(0).Value.ToString()
cmbUserType.Text = dr.Cells(1).Value.ToString()
txtPassword.Text = dr.Cells(2).Value.ToString()
txtName.Text = dr.Cells(3).Value.ToString()
txtContactNo.Text = dr.Cells(4).Value.ToString()
txtEmailID.Text = dr.Cells(5).Value.ToString()
btnUpdate_record.Enabled = True
btnDelete.Enabled = True
btnSave.Enabled = False
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
38
End Sub

Private Sub DataGridView1_RowPostPaint(ByVal sender As Object, ByVal e As


System.Windows.Forms.DataGridViewRowPostPaintEventArgs) Handles
DataGridView1.RowPostPaint
Dim strRowNumber As String = (e.RowIndex + 1).ToString()
Dim size As SizeF = e.Graphics.MeasureString(strRowNumber, Me.Font)
If DataGridView1.RowHeadersWidth < Convert.ToInt32((size.Width + 20)) Then
DataGridView1.RowHeadersWidth = Convert.ToInt32((size.Width + 20))
End If
Dim b As Brush = SystemBrushes.ControlText
e.Graphics.DrawString(strRowNumber, Me.Font, b, e.RowBounds.Location.X + 15,
e.RowBounds.Location.Y + ((e.RowBounds.Height - size.Height) / 2))

End Sub

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


Handles btnSave.Click
If txtUsername.Text = "" Then
MessageBox.Show("Please enter username", "Error", MessageBoxButtons.OK,
MessageBoxIcon.[Error])
txtUsername.Focus()
Return
End If
If cmbUserType.Text = "" Then
MessageBox.Show("Please select user type", "Error", MessageBoxButtons.OK,
MessageBoxIcon.[Error])
cmbUserType.Focus()
Return
End If
If txtPassword.Text = "" Then
MessageBox.Show("Please enter password", "Error", MessageBoxButtons.OK,
MessageBoxIcon.[Error])
txtPassword.Focus()
39
Return
End If
If txtName.Text = "" Then
MessageBox.Show("Please enter name", "Error", MessageBoxButtons.OK,
MessageBoxIcon.[Error])
txtName.Focus()
Return
End If
If txtContactNo.Text = "" Then
MessageBox.Show("Please enter contact no.", "Error", MessageBoxButtons.OK,
MessageBoxIcon.[Error])
txtContactNo.Focus()
Return
End If
If txtEmailID.Text = "" Then
MessageBox.Show("Please enter email id", "Error", MessageBoxButtons.OK,
MessageBoxIcon.[Error])
txtEmailID.Focus()
Return
End If
Try
con = New OleDbConnection(cs)
con.Open()
Dim ct As String = "select username from registration where username=@find"

40
STUDENT FORM

Imports System.Data.OleDb
Imports System.IO
Imports System.Security.Cryptography
Imports System.Text

Public Class frmStudent


Dim rdr As OleDbDataReader = Nothing
Dim dtable As DataTable
Dim con As OleDbConnection = Nothing
Dim adp As OleDbDataAdapter
Dim ds As DataSet
Dim cmd As OleDbCommand = Nothing
Dim dt As New DataTable
Dim gender As String
Dim cs As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|
DataDirectory|\LMS_DB.accdb;Persist Security Info=False;"
Public Shared Function GetUniqueKey(ByVal maxSize As Integer) As String
Dim chars As Char() = New Char(61) {}
chars = "123456789".ToCharArray()
Dim data As Byte() = New Byte(0) {}
Dim crypto As New RNGCryptoServiceProvider()
crypto.GetNonZeroBytes(data)
data = New Byte(maxSize - 1) {}
crypto.GetNonZeroBytes(data)
Dim result As New StringBuilder(maxSize)
For Each b As Byte In data
result.Append(chars(b Mod (chars.Length)))
Next
Return result.ToString()
End Function

41
Sub fillCourse()
Try
Dim CN As New OleDbConnection(cs)
CN.Open()
adp = New OleDbDataAdapter()
adp.SelectCommand = New OleDbCommand("SELECT distinct RTRIM(Coursename)
FROM Course", CN)
ds = New DataSet("ds")
adp.Fill(ds)
dtable = ds.Tables(0)
cmbCourse.Items.Clear()
For Each drow As DataRow In dtable.Rows
cmbCourse.Items.Add(drow(0).ToString())
Next
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Sub fillDepartment()
Try
Dim CN As New OleDbConnection(cs)
CN.Open()
adp = New OleDbDataAdapter()
adp.SelectCommand = New OleDbCommand("SELECT distinct RTRIM(Departmentname)
FROM Department", CN)
ds = New DataSet("ds")
adp.Fill(ds)
dtable = ds.Tables(0)
cmbDepartment.Items.Clear()
For Each drow As DataRow In dtable.Rows
cmbDepartment.Items.Add(drow(0).ToString())
Next
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
42
End Try
End Sub
Private Sub frmStudent_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
fillCourse()
fillDepartment()
End Sub

Private Sub Browse_Click_1(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Browse.Click
Try
With OpenFileDialog1
.Filter = ("Images |*.png; *.bmp; *.jpg;*.jpeg; *.gif;")
.FilterIndex = 4
End With
'Clear the file name
OpenFileDialog1.FileName = ""
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
Picture.Image = Image.FromFile(OpenFileDialog1.FileName)
End If
End Sub
End Class

43
BOOK FORM

Imports System.Data.OleDb
Imports Excel = Microsoft.Office.Interop.Excel
Public Class frmBookIssueRecord_Staff
Dim rdr As OleDbDataReader = Nothing
Dim dtable As DataTable
Dim con As OleDbConnection = Nothing
Dim adp As OleDbDataAdapter
Dim ds As DataSet
Dim cmd As OleDbCommand = Nothing
Dim dt As New DataTable
Dim gender As String
Dim cs As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|
DataDirectory|\LMS_DB.accdb;Persist Security Info=False;"

Sub Reset()
txtBookName.Text = ""
txtBookName1.Text = ""
txtStaffName.Text = ""
cmbStaffName.Text = ""
cmbStaffName1.Text = ""
dtpDateFrom.Text = Today
dtpDateTo.Text = Today
DateTimePicker1.Text = Today
DateTimePicker2.Text = Today
DateTimePicker3.Text = Today
DateTimePicker4.Text = Today
DateTimePicker5.Text = Today
DateTimePicker6.Text = Today
DateTimePicker7.Text = Today
DateTimePicker8.Text = Today

44
DataGridView1.DataSource = Nothing
End Sub
Sub fillStaffName()
Try
Dim CN As New OleDbConnection(cs)
CN.Open()
adp = New OleDbDataAdapter()
adp.SelectCommand = New OleDbCommand("SELECT distinct RTRIM(Staffname) FROM
Staff,BookIssue_Staff where Staff.StaffID=BookIssue_Staff.StaffID", CN)
ds = New DataSet("ds")
adp.Fill(ds)
dtable = ds.Tables(0)
cmbStaffName.Items.Clear()
cmbStaffName1.Items.Clear()
For Each drow As DataRow In dtable.Rows
cmbStaffName.Items.Add(drow(0).ToString())
cmbStaffName1.Items.Add(drow(0).ToString())
Next
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub frmBookIssueRecord_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
fillStaffName()
End Sub

Private Sub txtBookName_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtBookName.TextChanged
Try
con = New OleDbConnection(cs)
con.Open()
cmd = New OleDbCommand("SELECT TransactionID as [Transaction ID], IssueDate as
[Issue Date], DueDate as [Due Date], Book.AccessionNo as [Accession No],BookTitle as
45
[Book Title],Author,Subject,ISBN,Edition,Staff.StaffID as [Staff ID],StaffName as [Staff
Name],Staff.Department, Status from Book,BookIssue_Staff,Staff where
Book.AccessionNo=BookIssue_Staff.AccessionNo and
BookIssue_Staff.StaffID=Staff.StaffID and Issuedate Between #" & dtpDateFrom.Text & "#
and #" & dtpDateTo.Text & "# and BookTitle like '" & txtBookName.Text & "%' order by
Issuedate desc ", con)
Dim myDA As OleDbDataAdapter = New OleDbDataAdapter(cmd)
Dim myDataSet As DataSet = New DataSet()
myDA.Fill(myDataSet, "BookIssue_Staff")
myDA.Fill(myDataSet, "Book")
myDA.Fill(myDataSet, "Staff")
DataGridView1.DataSource = myDataSet.Tables("BookIssue_Staff").DefaultView
DataGridView1.DataSource = myDataSet.Tables("Book").DefaultView
DataGridView1.DataSource = myDataSet.Tables("Staff").DefaultView
con.Close()
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

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


Handles btnReset.Click
Reset()
End Sub

Private Sub btnExportExcel_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnExportExcel.Click
If DataGridView1.RowCount = Nothing Then
MessageBox.Show("Sorry nothing to export into excel sheet.." & vbCrLf & "Please retrieve
data in datagridview", "", MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit Sub
End If
Dim rowsTotal, colsTotal As Short
Dim I, j, iC As Short
46
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
Dim xlApp As New Excel.Application
Try
Dim excelBook As Excel.Workbook = xlApp.Workbooks.Add
Dim excelWorksheet As Excel.Worksheet = CType(excelBook.Worksheets(1),
Excel.Worksheet)
xlApp.Visible = True

rowsTotal = DataGridView1.RowCount - 1
colsTotal = DataGridView1.Columns.Count - 1
With excelWorksheet
.Cells.Select()
.Cells.Delete()
For iC = 0 To colsTotal
.Cells(1, iC + 1).Value = DataGridView1.Columns(iC).HeaderText
Next
For I = 0 To rowsTotal - 1
For j = 0 To colsTotal
.Cells(I + 2, j + 1).value = DataGridView1.Rows(I).Cells(j).Value
Next j
Next I
.Rows("1:1").Font.FontStyle = "Bold"
.Rows("1:1").Font.Size = 12

.Cells.Columns.AutoFit()
.Cells.Select()
.Cells.EntireColumn.AutoFit()
.Cells(1, 1).Select()
End With
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
'RELEASE ALLOACTED RESOURCES
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
47
xlApp = Nothing
End Try
End Sub

Private Sub txtBookName1_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtBookName1.TextChanged
Try
con = New OleDbConnection(cs)
con.Open()
cmd = New OleDbCommand("SELECT TransactionID as [Transaction ID], IssueDate as
[Issue Date], DueDate as [Due Date], Book.AccessionNo as [Accession No],BookTitle as
[Book Title],Author,Subject,ISBN,Edition,Staff.StaffID as [Staff ID],StaffName as [Staff
Name],Staff.Department, Status from Book,BookIssue_Staff,Staff where
Book.AccessionNo=BookIssue_Staff.AccessionNo and
BookIssue_Staff.StaffID=Staff.StaffID and DueDate Between #" & DateTimePicker2.Text &
"# and #" & DateTimePicker1.Text & "# and BookTitle like '" & txtBookName1.Text & "%'
order by DueDate desc ", con)
Dim myDA As OleDbDataAdapter = New OleDbDataAdapter(cmd)
Dim myDataSet As DataSet = New DataSet()
myDA.Fill(myDataSet, "BookIssue_Staff")
myDA.Fill(myDataSet, "Book")
myDA.Fill(myDataSet, "Staff")
DataGridView1.DataSource = myDataSet.Tables("BookIssue_Staff").DefaultView
DataGridView1.DataSource = myDataSet.Tables("Book").DefaultView
DataGridView1.DataSource = myDataSet.Tables("Staff").DefaultView
con.Close()
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
End If
End Sub
End Class

48
3.8 CONCLUSION
Library Management System allows the user to store the book details and
the customer details. This software package allows storing the details of all the data related to
library. The system is strong enough to withstand regressive yearly operations under
conditions where the database is maintained and cleared over a certain time of span. The
implementation of the system in the organization will considerably reduce data entry, time
and also provide readily calculated reports.

49
3.9 BIBLIOGRAPHY

1.google
2, wikipedia
3. Fundamentals of Software Engineering by RAJIB MALL
4. http://www.w3schools.com/php
5. visual basic Programming { Black Book
6. IBM Redbooks- http://www.redbooks.ibm.comS

50

You might also like