Book Store Management

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 43

PROJECT BASED ON:

“BOOK STORE MANAGEMENT SYSTEM”


ACADEMIC YEAR 2021-2022

PROJECT SUBMITTED BY:

Rachana K-R19197656

UNDER THE GUIDANCE

MRS SUMA
ASSISTANT PROFESSOR
DEPARTMENT OF COMPUTER SCIENCE
MSRCASC
BENGALURU-560054
DEPARTMENT OF COMPUTER SCIENCE

CERTIFICATE

This is to certify that "Rachana K(R1917656)” has successfully completed


the project entitled “ BOOK STORE MANAGEMENT SYSTEM” for the 5th
Semester as partial fulfilment of the requirements for the award of Degree in
Bachelor of Computer Applications, rewarded by the Bengaluru City
University for the Academic Year 2021-2022.

Guide Head of Department

Mrs Suma Dr Prathiba V Kalburgi

Assistant Professor Dept of Computer Science

External Examiners:

1.____________________
2.____________________
DECLARATION

The project titled “BOOK STORE MANAGEMENT SYSTEM” is


developed by me in the partial fulfilment of Bengaluru City
University. It is a systematic work carried by me under the guidance
of Mrs Suma, Asst Professor in Computer Science department, M S
RAMAIAH COLLEGE OF ARTS SCIENCE AND COMMERCE, Bengaluru-
54.
I declare that this project has not been submitted to any degree or
diploma to Bengaluru City University or any other university.

SUBMITTED BY: -
Rachana K-R19197656

DATE:

SIGNATURE:

PREFACE

Book store management is an Application Software. This project


Follows all the guidelines laid down by the Bangalore City
University which has made the project as a mandatory subject for
VI Semester BCA students.
This project is presented in a style which provides a comprehensive
understanding to the end-user. Your feedback and suggestion are
welcome for improving this project is acknowledged.

ACKNOWLEDGEMENT

I take this precious opportunity to express our gratitude towards "Book store
software " to grant the permission for undergoing project
It adds to my pleasure to acknowledge the persons who have helped me while
the project work was in progress. Here is an important attempt to thank all
those who have generously helped me in making this project success.

I am very thankful to Prof PRATHIBA V K our HOD for her guidance, support
and encouragement throughout the project.

We would like to express our sincere gratitude to our internal guide Mrs.
Suma our Asst.prof without her guidance our project would not be delight of
the day.

I also wish to express my sincere and special thanks to my beloved parents


and my friends for their graceful wishes, support and encouragement
throughout our work.

CONTENTS

1. PROJECT OVERVIEW
2. INTRODUCTION
3. OBJECTIVES
4. SYSTEM ANALYSIS AND DESIGN
5. PROJECT REQUIREMENTS
6. LANGUAGE DESCRIPTION
7. DATA DICTIONARY
8. SNAPSHOT OF PROJECT
9. CODE
10.TESTING
11.FUTURE ENHANCEMENT
12.CONCLUSION
13.BIBLIOGRAPHY

PROJECT OVERVIEW

This project is developed to sell the products of various Book Collection


Category mentioned in the project.

This project definitely helps the user to buy anything from this store because
in this BOOK STORE you can purchase anything with clicking of some button
of the mouse and pressing some keys of the keyboard.

By using this project, the user can save his or her time by purchasing the
product which time they are wasting by roaming in the market. From here,
they can get most probably all the things they want besides fast-moving
Entertainment goods. They have various choices in the one Collection.
INTRODUCTION

The Book Store Management is to automate all operations in a bookshop.


Generally, includes Order Processing. Stock Management and Accounts
Management. Before automating a bookshop, we have to understand the
concept of automation. In automation of any operation we make a system
which do work automatically as the respective events occurs, for which it is
meant. There are some common examples of the automation like that auto
pilot system in the aircraft, automatic home systems (electric system, water
system, fire alarm system, doors system etc). These are best examples of the
automation systems. Here we are trying to develop such type system which is
provide the automation on the any type of the bookshop. That means a shop
which has the type system which provides the facility to the customers of the
shop to purchase the books from the shop without any complexity.

For example, any customer wants to purchase any book from the shop
than first of all customer just choose the stream of the book than he/she can
see the more than one type of books there and then he/she can choose the
specific book from there. And then purchase it by paying price on bookshop
cash counter or online payment mode and receives its bill.
OBJECTIVES

The main objective of the project is to develop an online book store system.
The current system is only computerized within that organization. The main
aim of the project is to make the book store system accessible to the
community. Thus, making the project more economical and reducing the time
consumption in order to overcome the problems of the existing system, are
adding more facilities and making the system online. The key feature of the
project is the online review of books and purchasing options.

Online book store provides a user-friendly interface and perform necessary


operations according to the user's request. In order to perform its functions
our project is divided into the following modules that perform specific
functions.

The important modules in our project are:

 User Registration
 Admin Registration
 Book Details Entry
 View Books
 Bill
 Payment
SYSTEM ANALYSIS AND DESIGN

System analysis is the detailed study of the various operations performed by a


system and their relation between and outside system.

Analysis is to study what must be done to solve the problem. This involves
gathering information and using tools called the analysis phase is to have
clear understanding of the product to be developed. The goal of this phase is
to produce the system requirement specification document to the person who
is responsible for that is the system analysis. Once the system analysis is
completed the system analysis has a firm understanding about the product to
be developed and what is to be done next in the software development.

SYSTEM DESIGN
System Design reference to technical specification that is use in the proposed
system. Problem analysis is very important process in the software
requirements specification document. The various approaches of problem
analysis are:

 Structure analysis
 Information approach
 Object oriented modelling
 Proto typing

In this system the system analysis approach users three technique and they
are:

 Data dictionary
 ER-diagram (ERD)
 Data flow diagram (DFD)

DATA DICTIONARY:
Data dictionary gives the information about all the details in the DFD and
identify the composite data in terms of their data type it is very important in
software development tool.

ERD (Entry Relationship Diagram):

The ER model is a description of data in terms of entities, relationships and


attributes. An entity is a think in the real a world with an independent
existence. An entity may be an object with a physical existence, such as a
person, a car etc.

DFD (Data Flow Diagram):

A tool shows the flow of the data through the system is DFD it views a system
as a function that transform a set of inputs into a desired set of outputs.

ER MODEL
The entity-Relation model is a popular high-level conceptual data model. It
describes the structuring of data a constraint and their use in the design of
conceptual scheme of database applications.

ER DIAGRAM
The diagrammatic notation associated with the ER Model is called the ER
diagram.

The overall logical structure of a database can be expressed graphically by an


ER diagram the following symbols used to draw an ER diagram.

 RECTANGLE: which represent entity sets?


 ELLIPSES: which represent attributes?
 DIAMONDS: which represent relationship sets?
 ARROW: which link attributes to entity sets to relationship sets?

ENTITY
The ER model describes data in terms of entities, relationship and attributes.
Any entity is a thing is the real world with an independent existence. An entity
may be an object with a physical existence, such as a person, a car, a building
or it may be an object with conceptual existence such as a course, a company
or a job.

ATTRIBUTE
An attribute is a property that describes an entity. EX: The attributes of a
person entity are his name, address job, salary etc. for an entity, each attribute
will have a value.

ER Diagram Symbols
DATA FLOW DIAGRAM

A DFD or data diagram is graphical representation that depicts the


information flow transformation that applied to data moves from input
output. A level flow diagram is also called context model. This represent entire
projects bubble input output data indicated by incoming outgoing arrows.
The diagram is elaborate in levels from existing level. The symbols used in the
DFD are
Language Description

Introduction to VisualBasic.Net (VB.net):


Visual Basic Net is an object-oriented computer programming language
implemented on the Net framework. Although it is an evolution of classic
Visual Basic language, it is not backwords-compatible with VB, and any code
written in the old version does not compile under VB.Net.

Like all other Net languages, VB.Net has complete support for object-oriented
concepts. Everything in Vb.Net is an object and all objects inherit from the
base class object.

VB.Net is implemented by Microsoft's NET framework. Therefore, it has full


access to all the libraries in the Net framework. It's also possible to run VIB.
Net programs on mono, the open-source alternative to NET, not only under
windows, but even Linux or Mac OSX.

The following reasons make VB.Net a widely used professional language

 Structured language, Modern, general purpose.


 Object oriented.
 Component oriented
 Easy to learn.

Strong Programming Features of VB.Net:

Vb.Net has numerous strong programming features that make it endear to


multitude of programmers worldwide. They are

 Boolean conditions
 Atomic garbage collection
 Standard library
 Assembly versioning
 Properties and events
 Delegates and event management
 Easy to use generics
 Indexers
 Conditional compilation
 Simple multithreading.
The Net Framework:

The Net Framework is a revolutionary flat form that helps you to write the
following types of applications:

 Windows application
 Web applications
 Web services

The Net Framework applications are multi-platform applications. The


framework has been designed in such a way that it can be used from any of
the following languages: Visual Basic, c. C++, Jscript, and COBAL etc. All these
languages can access the framework as well as communicate with each other.

 The NET Framework consists of an enormous library of codes used by


the client language like VB.Net. These languages use object-oriented
methodology. Following are some of the components of the .Net
Framework.
 Common Language Runtime (CLR) The Net Framework class library.
 Common language specification Common Type System
 Metadata and assemblies
 Windows Forms
 ASP.Net and ASP.Net AJAX
 ADO.Net
 Windows workflow Foundation (WF). Windows Presentation Foundation
 Windows Communication Foundation (WCF)
 LINO

VISUAL STUDIO 2019 16.111.5

Visual Studio Code is a lightweight but powerful source code editor which
runs on your desktop and is available for Windows, macOS and Linux. It
comes with built-in support for JavaScript, TypeScript and Node.js and has a
rich ecosystem of extensions for other languages (such as C++, C#, Java,
Python, PHP, Go) and runtimes (such as .NET and Unity).

It contains completion tools, compilers, and other features to facilitate the


software development process.
Visual Studio has been around for over 20 years. Its first version was Visual
Studio 97. Since then there were a lot of different versions, the current one is
Microsoft Visual Studio 2019.

The Visual Studio IDE (integrated development environment) is a software


program for developers to write and edit their code. Its user interface is used
for software development to edit, debug and build code. Visual Studio
includes a code editor supporting IntelliSense (the code completion
component) as well as code refactoring. The integrated debugger works both
as a source-level debugger and a machine-level debugger. Other built-in tools
include a code profiler, designer for building GUI applications, web designer,
class designer, and database schema designer.

Integrated Development Environment (IDE) for VB.Net:


Microsoft provides the following development tools for VB.Net programming.

Using these tools, you can write all kinds of VB.Net programs from simple
command-line applications to more complex applications. Visual Basic Express
and Visual Web Developer Express edition are trimmed down versions of
Visual Studio and has the same look and feel. They retain most features of
Visual Studio.

In addition, IDE is also responsible for coordinating and enabling


communication between services. All editors, designers, project types and
other tools are implemented as packages

Features of IDE are:

 Code Editor
 Debugger
 Designer

MY SQL

 My SQL is an open-source relational database management


system (RDBMS). Its name is a combination of "My", the name of
co-founder Michael Wideness’s daughter, and "SQL", the
abbreviation for Structured Query Language.
 MySQL is free and open-source software under the terms of the
GNU
 General Public License and is also available under a variety of
proprietary licenses. MySQL was owned and sponsored by the
Swedish company MySQL. AB, which was bought by Sun
Microsystems (now Oracle Corporation). In 2010, when Oracle
acquired Sun, Wideners forked the open-source MySQL create
MariaDB.
 MySQL is a component of the LAMP web application software
stack (and others). which is an acronym for Linux, Apache, MySQL,
Perl/PHP/Python. MySQL is used by many database-driven web
applications, including Drupal, Joomla, php BB, and WordPress.
MySQL is also used by many popular websites, including
Facebook, Twitter, Flickr and YouTube.
 Microsoft SQL Server is a Relational Database Management
System from Microsoft. The enhancements provided by Microsoft
SQL Server as a RDBMS includes branded all new features such as
XML support, Federated Database Servers, User-defined
functions, new data types, Failover clustering enhancements,
Kerberos and Security Delegation and the like. SQL Server 2000
also provides graphical administration enhancements and
English-query enhancements to make the user work it with less
effort.

 A Field contains one chunk of data such as name or phone


number. A record contains related fields such as person's name,
address and phone number. One or more records make up a
database table.
PROJECT REQUIREMENTS

HARDWARE REQUIREMENTS
Hardware basically refers to the item in a PC can be touched and felt like
keyboard, monitor, mouse, and the system unit. Additional hardware
components that can be added to the PC are modem, printer, scanner etc.

The hardware thus used here consists of:

 Monitor
 Keyboard
 Mouse
 Hard disk
 RAM 8 GB

SOFTWARE REQUIREMENTS
 Front End: VB.Net
 Back End: My SQL
 Database: My SQL
 Microsoft Window 10
 Visual Studio 2019

DATABASE
SNAPSHOTS
CODING

PROCESS FORM
Public Class Splash
Private Sub spalsh_Load (sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub

Private Sub Timer1_Tick (sender As Object, e As EventArgs) Handles Timer1.Tick


Myprogress1.Increment(1)
PercentageLb1.Text = Convert.ToString(Myprogress1.Value) + "%"
If Myprogress1.Value = 100 Then
Me. Hide ()
Dim log = New login
log. Show ()
Timer1.Enabled = False
End If
End Sub
End Class

LOGIN FORM

Imports System. Data. SqlClient


Public Class login
Dim Con as New SqlConnection ("Data Source= (Local DB) \MSSQLLocalDB;
AttachDbFilename=C:\Users\madha\Documents\BookShopvbDb.mdf; Integrated
Security=True; Connect Timeout=30")
Dim cmd As SqlCommand
Private Sub LoginBtn_Click (sender As Object, e As EventArgs) Handles
LoginBtn.Click
If UnameTb.Text = "" Or PasswordTb.Text = "" Then
MsgBox ("Enter Username and Password")
Else
Con.Open()
Dim query = "Select * from UserTb1 where name ='" & UnameTb.Text & "'
and password = '" & PasswordTb.Text & "'"
cmd = New SqlCommand (query, Con)
Dim sda As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim ds As DataSet = New DataSet ()
sda. Fill(ds)
Dim a As Integer
a = ds. Tables (0). Rows.Count
If a = 0 Then
MsgBox ("Wrong Username or Password")
Else
Dim Bill = New bills
Bill.UserName = UnameTb.Text
Bill.Show()
Me. Hide()
End If
Con.Close()
End If
End Sub
Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click
Dim Obj = New AdminLogin
Obj.Show()
Me.Hide()
End Sub

Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click


Application.Exit()
End Sub
End Class

BILLS FORM

Imports System.Data.SqlClient
Public Class bills
Dim Con as New SqlConnection("Data Source=(LocalDB)\
MSSQLLocalDB;AttachDbFilename=C:\Users\madha\Documents\
BookShopvbDb.mdf;Integrated Security=True;Connect Timeout=30")
Public Property UserName As String
Private Sub Populate()
Con.Open()
Dim query = "select * from BookTb1"
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(query, Con)
Dim builder As SqlCommandBuilder
builder = New SqlCommandBuilder(adapter)
Dim ds As DataSet
ds = New DataSet
adapter.Fill(ds)
BooksDGV.DataSource = ds.Tables(0)
Con.Close()
End Sub
Private Sub bills_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Populate()
UnameLbl.Text = UserName
End Sub
Dim Key = 0, Stock = 0, i = 0, GrdTotal = 0

Private Sub Label15_Click(sender As Object, e As EventArgs) Handles Label15.Click


Application.Exit()
End Sub
Private Sub Reset()
Key = 0
BNameTb.Text = ""
PriceTb.Text = ""
QtyTb.Text = ""
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Reset()
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
PrintPreviewDialog1.Show()
AddBill()
End Sub
Private Sub AddBill()
Try
Con.Open()
Dim query As String
query = "insert into BillTb1 values('" & UnameLbl.Text & "'," & GrdTotal & ")"
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()

Con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub PrintDocument1_PrintPage(sender As Object, e As
Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
e.Graphics.DrawString("BookShop", New Font("Century Gothic", 25),
Brushes.MidnightBlue, 350, 40)
e.Graphics.DrawString("====Your Bill====", New Font("Century Gothic", 16),
Brushes.MidnightBlue, 300, 70)
Dim bm As New Bitmap(Me.BillDGV.Width, Me.BillDGV.Height)
BillDGV.DrawToBitmap(bm, New Rectangle(0, 0, Me.BillDGV.Width,
Me.BillDGV.Height))
e.Graphics.DrawImage(bm, 60, 120)
e.Graphics.DrawString("Total Amount Rs. " + GrdTotal.ToString, New
Font("Century Gothic", 15), Brushes.MidnightBlue, 280, 500)
e.Graphics.DrawString("========Thanks for buying in our Shop========",
New Font("Century Gothic", 15), Brushes.Crimson, 150, 580)
End Sub

Private Sub Label14_Click(sender As Object, e As EventArgs) Handles Label14.Click


Dim Obj = New login()
Obj.Show()
Me.Hide()
End Sub
Private Sub Update()
Dim NewQty = Stock - Convert.ToInt32(QtyTb.Text)
Con.Open()
Dim query As String
query = "Update BookTb1 set Quantity= " & NewQty & " where BId=" & Key &
""
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Book Updated Successfully")
Con.Close()
Populate()
End Sub
Private Sub AddToBillBtn_Click(sender As Object, e As EventArgs) Handles
AddToBillBtn.Click
If PriceTb.Text = "" Or QtyTb.Text = "" Then
MsgBox("Enter the Quantity")
ElseIf BNameTb.Text = "" Then
MsgBox("Select the Book")
ElseIf Convert.ToInt32(QtyTb.Text) > Stock Then
MsgBox("Not Enough Stock")
Else
Dim rnum As Integer = BillDGV.Rows.Add()
i=i+1
Dim total = Convert.ToInt32(QtyTb.Text) * Convert.ToInt32(PriceTb.Text)
BillDGV.Rows.Item(rnum).Cells("Column1").Value = i
BillDGV.Rows.Item(rnum).Cells("Column2").Value = BNameTb.Text
BillDGV.Rows.Item(rnum).Cells("Column3").Value = PriceTb.Text
BillDGV.Rows.Item(rnum).Cells("Column4").Value = QtyTb.Text
BillDGV.Rows.Item(rnum).Cells("Column5").Value = total
GrdTotal = GrdTotal + total
Dim Tot As String
Tot = "Rs " + Convert.ToString(GrdTotal)
TotalLb1.Text = Tot
Update()
End If
End Sub

Private Sub BooksDGV_CellContentClick(sender As Object, e As


DataGridViewCellEventArgs) Handles BooksDGV.CellContentClick
Dim row As DataGridViewRow = BooksDGV.Rows(e.RowIndex)
BNameTb.Text = row.Cells(1).Value.ToString
PriceTb.Text = row.Cells(5).Value.ToString
Stock = Convert.ToInt32(row.Cells(4).Value.ToString)
If BNameTb.Text = "" Then
Key = 0
Else
Key = Convert.ToInt32(row.Cells(0).Value.ToString)
End If
End Sub
End Class
ADMIN LOGIN
Public Class AdminLogin
Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click
Dim Obj = New login()
Obj.Show()
Me.Hide()
End Sub

Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click


Application.Exit()
End Sub

Private Sub LoginBtn_Click(sender As Object, e As EventArgs) Handles


LoginBtn.Click
If PasswordTb.Text = "Password" Then
Dim Obj = New books()
Obj.Show()
Me.Hide()
Else
MsgBox("Wrong Password")
End If
End Sub
End Class

BOOKS FORM

Imports System.Data.SqlClient
Public Class books
Dim Con As New SqlConnection("Data Source=(LocalDB)\
MSSQLLocalDB;AttachDbFilename=C:\Users\madha\Documents\
BookShopvbDb.mdf;Integrated Security=True;Connect Timeout=30")
Private Sub Populate()
Con.Open()
Dim query = "select * from BookTb1"
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(query, Con)
Dim builder As SqlCommandBuilder
builder = New SqlCommandBuilder(adapter)
Dim ds As DataSet
ds = New DataSet
adapter.Fill(ds)
BooksDGV.DataSource = ds.Tables(0)
Con.Close()
End Sub
Private Sub Filter()
Con.Open()
Dim query = "select * from BookTb1 where Category= '" &
FilterCb1.SelectedItem.ToString() & "'"
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(query, Con)
Dim builder As SqlCommandBuilder
builder = New SqlCommandBuilder(adapter)
Dim ds As DataSet
ds = New DataSet
adapter.Fill(ds)
BooksDGV.DataSource = ds.Tables(0)
Con.Close()
End Sub
Private Sub Reset()
BookNameTb.Text = ""
AuthorTb.Text = ""
QtyTb.Text = ""
PriceTb.Text = ""
CatCb1.SelectedIndex = -1
Key = 0
End Sub
Private Sub SaveBtn_Click_1(sender As Object, e As EventArgs) Handles
SaveBtn.Click
If BookNameTb.Text = "" Or AuthorTb.Text = "" Or QtyTb.Text = "" Or
PriceTb.Text = "" Or CatCb1.SelectedIndex = -1 Then
MsgBox("Missing Information")
Else
Con.Open()
Dim query As String
query = "insert into BookTb1 values('" & BookNameTb.Text & "','" &
AuthorTb.Text & "','" & CatCb1.SelectedItem.ToString & "'," & QtyTb.Text & "," &
PriceTb.Text & ")"
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Book Saved Successfully")
Con.Close()
Populate()
Reset()
End If
End Sub
Dim Key = 0
Private Sub BooksDGV_CellMouseClick(sender As Object, e As
DataGridViewCellMouseEventArgs) Handles BooksDGV.CellMouseClick
Dim row As DataGridViewRow = BooksDGV.Rows(e.RowIndex)
BookNameTb.Text = row.Cells(1).Value.ToString
AuthorTb.Text = row.Cells(2).Value.ToString
CatCb1.SelectedItem = row.Cells(3).Value.ToString
QtyTb.Text = row.Cells(4).Value.ToString
PriceTb.Text = row.Cells(5).Value.ToString
If BookNameTb.Text = "" Then
Key = 0
Else
Key = Convert.ToInt32(row.Cells(0).Value.ToString)
End If
End Sub
Private Sub books_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Populate()
End Sub
Private Sub ResetBtn_Click_1(sender As Object, e As EventArgs) Handles
ResetBtn.Click
Reset()
End Sub
Private Sub DeleteBtn_Click_1(sender As Object, e As EventArgs) Handles
DeleteBtn.Click
If Key = 0 Then
MsgBox("Select the Book to be deleted")
Else
Con.Open()
Dim query As String
query = "Delete from BookTb1 where BId = " & Key & ""
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Book Deleted Successfully")
Con.Close()
Populate()
Reset()
End If
End Sub
Private Sub Label15_Click_1(sender As Object, e As EventArgs) Handles
Label15.Click
Application.Exit()
End Sub
Private Sub EditBtn_Click_1(sender As Object, e As EventArgs) Handles EditBtn.Click
If BookNameTb.Text = "" Or AuthorTb.Text = "" Or QtyTb.Text = "" Or
PriceTb.Text = "" Or CatCb1.SelectedIndex = -1 Then
MsgBox("Missing Information")
Else
Con.Open()
Dim query As String
query = "Update BookTb1 set Title= '" & BookNameTb.Text & "' ,Author= '"
& AuthorTb.Text & "' ,Category= '" & CatCb1.SelectedItem.ToString & "' ,Quantity= "
& QtyTb.Text & ",Price= " & PriceTb.Text & " where BId=" & Key & " "
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("Book Updated Successfully")
Con.Close()
Populate()
Reset()
End If
End Sub
Private Sub RefreshBtn_Click_1(sender As Object, e As EventArgs) Handles
RefreshBtn.Click
Populate()
End Sub
Private Sub Label12_Click_1(sender As Object, e As EventArgs) Handles
Label12.Click
Dim Obj = New users()
Obj.Show()
Me.Hide()
End Sub

Private Sub Label13_Click_1(sender As Object, e As EventArgs) Handles


Label13.Click
Dim Obj = New Dashboard()
Obj.Show()
Me.Hide()
End Sub

Private Sub Label14_Click_1(sender As Object, e As EventArgs) Handles


Label14.Click
Dim Obj = New login()
Obj.Show()
Me.Hide()
End Sub

Private Sub FilterCb1_SelectionChangeCommitted(sender As Object, e As


EventArgs) Handles FilterCb1.SelectionChangeCommitted
Filter()
End Sub

Private Sub Panel3_Paint(sender As Object, e As PaintEventArgs) Handles


Panel3.Paint

End Sub

Private Sub Panel2_Paint(sender As Object, e As PaintEventArgs) Handles


Panel2.Paint

End Sub

Private Sub CatCb_SelectedIndexChanged(sender As Object, e As EventArgs)


End Sub
End Class

USER FORM

Imports System.Data.SqlClient
Public Class users
Dim Con As New SqlConnection("Data Source=(LocalDB)\
MSSQLLocalDB;AttachDbFilename=C:\Users\madha\Documents\
BookShopvbDb.mdf;Integrated Security=True;Connect Timeout=30")
Private Sub Populate()
Con.Open()
Dim query = "select * from UserTb1"
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(query, Con)
Dim builder As SqlCommandBuilder
builder = New SqlCommandBuilder(adapter)
Dim ds As DataSet
ds = New DataSet
adapter.Fill(ds)
UserDGV.DataSource = ds.Tables(0)
Con.Close()
End Sub
Private Sub Reset()
UnameTb.Text = ""
PhoneTb.Text = ""
AddressTb.Text = ""
PasswordTb.Text = ""
Key = 0
End Sub
Private Sub SaveBtn_Click(sender As Object, e As EventArgs) Handles SaveBtn.Click
If UnameTb.Text = "" Or PhoneTb.Text = "" Or AddressTb.Text = "" Or
PasswordTb.Text = "" Then
MsgBox("Missing Information")
Else
Con.Open()
Dim query As String
query = "insert into UserTb1 values('" & UnameTb.Text & "','" & PhoneTb.Text
& "','" & AddressTb.Text & "','" & PasswordTb.Text & "')"
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("User Saved Successfully")
Con.Close()
Populate()
Reset()
End If
End Sub
Private Sub users_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Populate()
End Sub
Dim Key = 0
Private Sub DeleteBtn_Click(sender As Object, e As EventArgs) Handles
DeleteBtn.Click
If Key = 0 Then
MsgBox("Select the user to be deleted")
Else
Con.Open()
Dim query As String
query = "Delete from UserTb1 where Id = " & Key & ""
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("User Deleted Successfully")
Con.Close()
Populate()
Reset()
End If
End Sub
Private Sub UserDGV_CellMouseClick(sender As Object, e As
DataGridViewCellMouseEventArgs) Handles UserDGV.CellMouseClick
Dim row As DataGridViewRow = UserDGV.Rows(e.RowIndex)
UnameTb.Text = row.Cells(1).Value.ToString
PhoneTb.Text = row.Cells(2).Value.ToString
AddressTb.Text = row.Cells(3).Value.ToString
PasswordTb.Text = row.Cells(4).Value.ToString
If UnameTb.Text = "" Then
Key = 0
Else
Key = Convert.ToInt32(row.Cells(0).Value.ToString)
End If
End Sub

Private Sub ResetBtn_Click(sender As Object, e As EventArgs) Handles


ResetBtn.Click
Reset()
End Sub

Private Sub EditBtn_Click(sender As Object, e As EventArgs) Handles EditBtn.Click


If UnameTb.Text = "" Or PhoneTb.Text = "" Or AddressTb.Text = "" Or
PasswordTb.Text = "" Then
MsgBox("Missing Information")
Else
Con.Open()
Dim query As String
query = "Update UserTb1 set name= '" & UnameTb.Text & "' ,Phone= '" &
PhoneTb.Text & "' ,Address= '" & AddressTb.Text & "' ,Password= '" &
PasswordTb.Text & "' where Id=" & Key & " "
Dim cmd As SqlCommand
cmd = New SqlCommand(query, Con)
cmd.ExecuteNonQuery()
MsgBox("User Updated Successfully")
Con.Close()
Populate()
Reset()
End If
End Sub

Private Sub Label9_Click(sender As Object, e As EventArgs) Handles Label9.Click


Dim Obj = New books()
Obj.Show()
Me.Hide()
End Sub

Private Sub Label13_Click(sender As Object, e As EventArgs) Handles Label13.Click


Dim Obj = New Dashboard()
Obj.Show()
Me.Hide()
End Sub

Private Sub Label14_Click(sender As Object, e As EventArgs) Handles Label14.Click


Dim Obj = New login()
Obj.Show()
Me.Hide()
End Sub

Private Sub Label15_Click(sender As Object, e As EventArgs) Handles Label15.Click


Application.Exit()
End Sub

Private Sub Panel2_Paint(sender As Object, e As PaintEventArgs) Handles


Panel2.Paint

End Sub

Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click

End Sub
End Class

DASHBOARD FORM

Imports System.Data.SqlClient
Public Class Dashboard
Dim Con As New SqlConnection("Data Source=(LocalDB)\
MSSQLLocalDB;AttachDbFilename=C:\Users\madha\Documents\
BookShopvbDb.mdf;Integrated Security=True;Connect Timeout=30")
Private Sub CountBooks()
Dim BookNum As Integer
Con.Open()
Dim Sql = "select COUNT(*) from BookTb1"
Dim cmd As SqlCommand
cmd = New SqlCommand(Sql, Con)
BookNum = cmd.ExecuteScalar
BooksLbl.Text = BookNum
Con.Close()
End Sub
Private Sub CountUsers()
Dim UsersNum As Integer
Con.Open()
Dim Sql = "select COUNT(*) from UserTb1"
Dim cmd As SqlCommand
cmd = New SqlCommand(Sql, Con)
UsersNum = cmd.ExecuteScalar
UsersLbl.Text = UsersNum
Con.Close()
End Sub
Private Sub SumAmount()
Dim Amount As Integer
Con.Open()
Dim Sql = "select Sum(Amount) from BillTb1"
Dim cmd As SqlCommand
cmd = New SqlCommand(Sql, Con)
Amount = cmd.ExecuteScalar
AmountLbl.Text = "Rs " + Convert.ToString(Amount)
Con.Close()
End Sub
Private Sub Dashboard_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
CountBooks()
CountUsers()
SumAmount()
End Sub
Private Sub Label15_Click(sender As Object, e As EventArgs) Handles Label15.Click
Application.Exit()
End Sub
Private Sub Label9_Click(sender As Object, e As EventArgs) Handles Label9.Click
Dim Obj = New books()
Obj.Show()
Me.Hide()
End Sub
Private Sub Label12_Click(sender As Object, e As EventArgs) Handles Label12.Click
Dim Obj = New users()
Obj.Show()
Me.Hide()
End Sub
Private Sub Label14_Click(sender As Object, e As EventArgs) Handles Label14.Click
Dim Obj = New login()
Obj.Show()
Me.Hide()
End Sub
End Class

TESTING
Testing is the major quality control measured employed during software
development. Experienced software developers often stay "Testing never
ends, it just gets transformed from your customer Every time you use the
program, a test is being conducted". Its basic function to detect the errors in
the software.
Types of Testing
1.Unit testing

Unit test comprises of a set tests performed by an individual program prior


the unit into large system. A program unit is usually the smallest free
functioning part of the whole system. Module unit testing should be as
exhaustive as possible to ensure that each representation handled by each
module has been tested. All the units that makeup the system must be tested
independently to ensure that they work as required, during unit testing some
errors were raised and all them were rectified and handled well. The result was
quite satisfactory, and it worked well.

2.Integration testing

It is process of combining and testing multiple or components together. The


primary objective is between the components. In our system each of the
modules mentioned above, are tested for checking to integration between
them, after each of them are tested individually.

3.System testing

Validation it provides the final assurance that software meets all functional,
behavioural and performance requirement to software once validation must
be combined with other system elements. System testing verifies that as
elements combine properly and that overall system function and performance
achieved.

4.User acceptance testing

User acceptance testing test has the objective of selling the user on the
validity and reliability of system verifies that system's procedures operate to
acceptances test is the users show. User motivation and knowledge are critical
for the successful performance of the system.

SOFTWARE TESTING TECHNIQUE:


Software testing is critical element of software quality assurance and
represents the ultimate review of specification design and code generation.
The increasing visibility of software as system element and the attendant costs
associated with a software are motivating forces for well-planned through
testing the main objectives of testing are listed below

 Testing is process of executing program with intent of finding an error.


 A good case is one that has a high portability of finding an as-yet
undiscovered error.
 A successful test one that uncovers as an-yet-undiscovered error.
 Testing designed to reflect the frequency of use inputs used for
reliability estimation.

Software is tested from two different perspectives:

 Internal program logic is exercised using "whit-box" test case design


techniques.
 Software requirements are exercised using "black-box" test case design
techniques, in both cases, the intent is to find the maximum number of
errors with the minimum amount of efforts and time.

Following are the two types of techniques which have been used to test this
project:

1. White box testing


2. Black box testing

VALIDATION TESTING
At the culmination of integration testing, software is completely assembly as a
package, interface error has uncovered and corrected and a final serves of
software tests-validation testing may begin validation can be defined in many
ways. But a simple definition is that validation succeeds when software
functions in a manner that can reasonably expected by customer, software
function in a manner that can be reasonably expected by the customer,
software validation is achieved through a series of black box test that
demonstrate conformity with the requirements A test plan outline the class
test that will be used to demonstrate conformity with requirements. Both the
plan and produced are designed to ensured that all function is satisfied. All
behaviour characteristics are achieved, all performance requirements are
attained documentation is corrected and human engineering and other
requirements are met.
FUTURE ENHANCEMENT

We think that not a single project is ever considered as complete forever


because our mind always thinking new and our necessities also are growing.
Our application also, if you see at the glance that you find it to be complete,
but we want to make it still mature and fully automatic.

 As system is flexible, you can generate more report and screen as and
when required.
 The system is modified in future as per the owner requirement.
 The current system can be extended to allow the users to create
accounts and save products in to wish list.
 The users could subscribe for price alerts which would enable them to
receive messages when price for products fall below a particular level.
 The current system is confined only to the shopping cart process. It can
be extended to have an easy to use check out process. Users can have
multiple shipping and billing information saved. During checkout they
can use the drag and drop feature to select shipping and billing
information.
CONCLUSION

The switch from written books being from bookstores to being ordered online
or even digital copies has had profound effects on the industry including
bookstores and libraries and the general people of the world. The positives
include easy access for everyone and cheaper books along with saving natural
resources. Negatives however are much greater and cannot be ignored. Some
negatives include the loss jobs and businesses through the digitalization of
books, as well losing our sense of our past and always be updated about
change in technology on sites, more described sites to be explored and
satisfied. Books role humanity history that it bittersweet to be replacing them.
It seems that e-book, google books, and online retailer’s future and the
future good.
BILIOGRPHY

Books Referred:

 MySQL Crash Course


 Learn from Scratch Visual Basic.Net and MySQL

Sites Referred:

www.google.com

www.wikipedia.com

www.researchgate.net

www.slideshare.net

www.academia.edu

You might also like