Sunteți pe pagina 1din 74

Introduction

Development of large software system is extremely complex

activity full of various opportunities to introduction errors. Software

Engineering is the discipline that attempts to provide method to handle

this complexity, enabling us to produce reliable system software with

maximum productivity.

It was felt that it is important and very instructive, not only to learn

the principles of software engineering but also apply them to a software

development project so that all aspects of development and be clearly

seen on project.

Software engineering is activity starts from requirements analysis

and ends with testing and implementation.

This project is designed to manage a Retail Store System. In This

project VB 6.0 is use as front-end and Oracle use as backend.


In this project we can manage:
 Purchase Record,

 Purchase Return Record,

 Purchase Detail,

 Sales Record,

 Sales Return Record,

 Sales Details,

 Product Record,

 Categories Detail,

 Dealer Record,

 Customer Record,

Objective of the Project

Main objective of this project is using information technology we

can easily manage the Retail Store Management System. Now a day, in

world every work is require fast. In short time we can require bulk of

work, and also manage many documentation records.

2
In Retail Store different-different products are purchase from

dealer and sale to the customer. Such Product as: Stationeries, Grocery

product, Cosmetics, etc. In this every customer have their different-

different requirement. Suppose we have to maintain the sales record

properly then retail store requires a good system which are keep the

customer record,

Bill Number record, Bill date record, grand total.

Earlier sales record was done manually by documentation. It

involves lot of man power. Suppose we want to search any record then

lot of problem was faced by retail store. Day by day records increases.

Then many problems were come. And some time we want instant record

then it difficult to find.

When sales inquiry about product then we have to maintain inquiry

record. We have to inform all type of courses, their fees to students.

After some time we want to see this record then more difficult to find a

this kind record in manual system

Various types of Grocery products, its cost, price are such kind of

record. These records are used at the time of Sales of product to the

3
customer. When Customer paid their Payment then keep the record of

Payment & update the record. If we want to a record of customer as their

Product wise then it was tedious job.

Customer payment record was most important to maintain properly

such as who are paid, when paid, how much paid, their outstanding

amount, their paid amount etc... Suppose we have to see every

customer payment status then it is more difficult to collect a kind of

record.

In every product many customers take their purchase. If we have

to maintain the customer billing record properly then store requires a

good system which is kept the billing records of customer.

Same as this many other tasks are also available such as Sales

record, purchase record etc. So in manual system records maintain

processes are more difficult. With the use of this project store can

maintain their customer record easily.

4
Project Category

This project Category is Expert System which

are managed the Retail store processes. In this

system we can store products record.

5
System Configuration

 Hardware Requirements

 Processor – Intel® Pentium® 4

 Processor speed – 2.50 GHZ

 Hard disk – Minimum 500 GB

 Main Memory – 4 GB

 Monitor – TFT (thin Film transistor)

 Keyboard – Multimedia

 Mouse – Optical or Scroll Mouse

 CD Drive – DVD writer

6
 Software Requirements

 Front end Language: - Visual Basic 6.0

 Back end Language: - SQL Server

 Operating System – Windows 7

Brief Introduction About Visual Basic


6.0

VISUAL BASIC is a high level programming language which

evolved from the earlier DOS version called

BASIC. BASIC means Beginners' All-purpose Symbolic

Instruction Code. It is a very easy programming language to learn. The

code looks a lot like English Language. Different software companies

produced different versions of BASIC, such as Microsoft QBASIC,

QUICKBASIC, GWBASIC, IBM BASICA and so on. However, people

prefer to use Microsoft Visual Basic today, as it is a well developed


7
programming language and supporting resources are available

everywhere. Now, there are many versions of VB exist in the market, the

most popular one and still widely used by many VB programmers is

none other than Visual Basic 6. We also have VB.net, VB2005, VB2008

and the latest VB2010. Both Vb2008 and VB2010 are fully object

oriented programming (OOP) language.

VISUAL BASIC is a VISUAL and events driven Programming

Language. These are the main divergence from the old BASIC. In

BASIC, programming is done in a text-only environment and the

program is executed sequentially. In VB, programming is done in a

graphical environment. In the old BASIC, you have to write program

code for each graphical object you wish to display it on

Screen, including its position and its color. However, In VB , you just

need to drag and drop any graphical object anywhere on the form, and

you can change its color any time using the properties windows.

On the other hand, because the user may click on a certain object

randomly, so each object has to be programmed independently to be

able to response to those actions (events). Therefore, a VB Program is

8
made up of many subprograms, each has its own program code, and

each can be executed independently and at the same time each can be

linked together in one way or another.

Visual Basic is the third-generation event-driven programming

language and integrated development environment (IDE) from Microsoft

for its COM programming model. Visual Basic is relatively easy to learn

and use.

Visual Basic was derived from BASIC and enables the rapid

application development (RAD) of graphical user interface (GUI)

applications, access to databases using Data Access Objects, Remote

Data Objects, or ActiveX Data Objects, and creation of ActiveX controls

and objects. Scripting languages such as VBA and VBScript are

syntactically similar to Visual Basic, but perform differently.

A programmer can put together an application using the

components provided with Visual Basic itself. Programs written in Visual

Basic can also use the Windows API, but doing so requires external

function declarations.

9
 Language Features

Like the BASIC programming language, Visual Basic was

designed to be easily learned and used by beginner programmers. The

language not only allows programmers to create simple GUI

applications, but can also develop complex applications. Programming in

VB is a combination of visually arranging components or controls on a

form, specifying attributes and actions of those components, and writing

additional lines of code for more functionality. Since default attributes

and actions are defined for the components, a simple program can be

created without the programmer having to write many lines of code.

Performance problems were experienced by earlier versions, but with

faster computers and native code compilation this has become less of

an issue.

Although programs can be compiled into native code executables

from version 5 onwards, they still require the presence of runtime

libraries of approximately 1 MB in size.

10
This runtime is included by default in Windows 2000 and later, but

for earlier versions of Windows like 95/98/NT it must be distributed

together with the executable.

Forms are created using drag-and-drop techniques. A tool is used

to place controls (e.g., text boxes, buttons, etc.) on the form (window).

Controls have attributes and event handlers associated with them.

Default values are provided when the control is created, but may be

changed by the programmer. Many attribute values can be modified

during run time based on user actions or changes in the environment,

providing a dynamic application. For example, code can be inserted into

the form resize event handler to reposition a control so that it remains

centered on the form, expands to fill up the form, etc. By inserting code

into the event handler for a keypress in a text box, the program can

automatically translate the case of the text being entered, or even

prevent certain characters from being inserted.

Visual Basic can create executables (EXE files), ActiveX controls,

or DLL files, but is primarily used to develop Windows applications and

11
to interface database systems. Dialog boxes with less functionality can

be used to provide pop-up capabilities. Controls provide the basic

functionality of the application, while programmers can insert additional

logic within the appropriate event handlers. For example, a drop-down

combination box will automatically display its list and allow the user to

select any element. An event handler is called when an item is selected,

which can then execute additional code created by the programmer to

perform some action based on which element was selected, such as

populating a related list.

Alternatively, a Visual Basic component can have no user

interface, and instead provide ActiveX objects to other programs via

Component Object Model (COM). This allows for server-side processing

or an add-in module.

The language is garbage collected using reference counting, has a

large library of utility objects, and has basic object oriented support.

Since the more common components are included in the default project

template, the programmer seldom needs to specify additional libraries.

Unlike many other programming languages, Visual Basic is generally not

case sensitive, although it will transform keywords into a standard case

12
configuration and force the case of variable names to conform to the

case of the entry within the symbol table. String comparisons are case

sensitive by default, but can be made case insensitive if so desired.

The Visual Basic compiler is shared with other Visual Studio

languages (C, C++), but restrictions in the IDE do not allow the creation

of some targets (Windows model DLLs) and threading models.

 Characteristics
 By default, if a variable has not been declared or if no type

declaration character is specified, the variable is of type Variant.

However this can be changed with Deftype statements such as

DefInt, DefBool, DefVar, DefObj, DefStr. There are 12 Deftype

statements in total offered by Visual Basic 6.0. The default type

may be overridden for a specific declaration by using a special

suffix character on the variable name (# for Double, ! for Single, &

for Long, % for Integer, $

13
For String, and @ for Currency) or using the key phrase As (type).

VB can also be set in a mode that only explicitly declared variables

can be used with the command Option Explicit.

 Multiple assignments available in C language is not possible.

A = B = C does not imply that the values of A, B and C are equal.

The boolean result of "Is B = C?" is stored in A. The result stored

in A would therefore be either false or true.

14
About The Structured Query Language
(SQL)

The Structured Query Language (SQL) is the set of instructions

used to interact with a relational database. In fact, SQL is the only

language that most databases actually understand. Whenever you

interact with such a database, the software translates your commands

(whether they are mouse clicks or form entries) into SQL statement that

the database knows how to interpret. SQL has three major components:

the Data Manipulation Language (DML), the Data Definition Language

(DDL), and the Data Control Language (DCL).

SQL is a programming language designed for managing data

in relational database management systems (RDBMS).

Originally based upon relational algebra and tuple relational

calculus, its scope includes data insert, query, update and

delete, schema creation and modification, and data access control.

15
SQL was one of the first commercial languages for Edgar F.

Codd's relational model, as described in his influential 1970 paper, "A

Relational Model of Data for Large Shared Data Banks". Despite not

adhering to the relational model as described by Codd, it became the

most widely used

database language. Although SQL is often described as, and to a great

extent is, a declarative language, it also includes procedural elements.

SQL became a standard of the American National Standards

Institute (ANSI) in 1986, and of the International Organization for

Standards (ISO) in 1987. Since then the standard has been enhanced

several times with added features. However, issues of SQL code

portability between major RDBMS products still exist due to lack of full

compliance with, or different interpretations of the standard. Among the

reasons mentioned are the large size, and incomplete specification of

the standard, as well as vendor lock-in.

16
The SQL language is subdivided into several language elements,

including:

 Clauses, which are constituent components of statements and

queries. (In some cases, these are optional.)

 Expressions, which can produce either scalar values

or tables consisting of columns and rows of data.

 Predicates, which specify conditions that can be evaluated to

SQL three-valued logic (3VL) or Boolean (true/false/unknown) truth

values and which are used to limit the effects of statements and

queries, or to change program flow.

 Queries, which retrieve the data based on specific criteria. This is

the most important element of SQL.

 Statements, which may have a persistent effect on schemata and

data, or which may control transactions, program flow,

connections, sessions, or diagnostics.

SQL statements also include the semicolon (";") statement

terminator. Though not required on every platform, it is defined as a

standard part of the SQL grammar.

17
 Insignificant whitespace is generally ignored in SQL statements

and queries, making it easier to format SQL code for readability.

Queries:-
The most common operation in SQL is the query, which is

performed with the declarative SELECT statement. SELECT retrieves

data from one or more tables, or expressions.

Standard SELECT statements have no persistent effects on the

database. Some non-standard implementations of SELECT can have

persistent effects, such as the SELECT INTO syntax that exists in some

databases.

Queries allow the user to describe desired data, leaving the database

management system (DBMS) responsible for planning, optimizing, and

performing the physical operations necessary to produce that result as it

chooses.

A query includes a list of columns to be included in the final result

immediately following the SELECT keyword. An asterisk ("*") can also

be used to specify that the query should return all columns of the
18
queried tables. SELECT is the most complex statement in SQL, with

optional keywords and clauses that include:

 The FROM clause which indicates the table(s) from which data is to

be retrieved. The FROM clause can include optional JOIN sub

clauses to specify the rules for joining tables.

 The WHERE clause includes a comparison predicate, which restricts

the rows returned by the query. The WHERE clause eliminates all

rows from the result set for which the comparison predicate does not

evaluate to True.

 The GROUP BY clause is used to project rows having common

values into a smaller set of rows. GROUP BY is often used in

conjunction with SQL aggregation functions or to eliminate duplicate

rows from a result set. The WHERE clause is applied before

the GROUP BY clause.

 The HAVING clause includes a predicate used to filter rows resulting

from the GROUP BY clause. Because it acts on the results of

the GROUP BY clause, aggregation functions can be used in

the HAVING clause predicate.

19
 The ORDER BY clause identifies which columns are used to sort the

resulting data, and in which direction they should be sorted (options

are ascending or descending). Without an ORDER BY clause, the

order of rows returned by an SQL query is undefined.

20
Screenshort

Diagram 3.1: Preview of Output Design to welcome Users

Diagram 3.2: Preview of Output Design to Add New Customer Details

21
Diagram 3.3: Preview of Output Design to Add New Workers Details

Diagram 3.4: Preview of Output Design for Workers Login

22
Field Name Data Type Field Size

Full name Long Text 30

Password Short Text 10

Username Short Text 15


Date of birth Date/Time 10

Gender Short Text 8

Address Short Text 10

Date of Employment Date/Time 8

Role Short Text 10

Table 3.1: Table for the Input Design to add new user record

Field Data type Field Size


User name Short text 15
Password Short text 20

23
Table 3.2: Table for the Input Design to login

Field Name Data type Field Size

Product Name Short Text 15


Product Number Number 2
Product Quantity Number 2
Date Received Date 10
Description Long Text 40
Price Currency 4
Stocks Number 10

Diagram 3.6: Preview for Database Design for Customer

24
Diagram 3.7: Preview for Database Design for Workers

Diagram 3.8: Preview for Database Design for Product

25
Diagram 3.9: Preview for Database Spreadsheet Design for Product

26
ENTITY RELATIONSHIP
DIAGRAM

The E-R model was introduced by P.P Chen. Entity-relationship is


a detailed, logical representation of the entities, associations & data
elements for an organization or business area. This technique is used in
database design that helps to describe how entities in an enterprise are
related to one another. E-R model for the data uses three features to
describe data.

27
ERD displays & indicate the relationship between tables.

Entity

Attribute

Flow Line

28
DIAGRAM

29
Database Tables

 Table Name:- Categories Primary Key:-


Category

No. Column Name Data Type Description


1. Category Varchar(20) Primary Key(A.I.)

2. Cosmetics Varchar(100) To Store Cosmetics Product

3. Stationary Varchar(100) To Store Stationary Product

4. Grocery Varchar(100) To Store Grocery Product

 Table Name:- Product Primary Key:- code

No. Column Name Data Type Description

1. Prod_No Smallint Product Number


To Store Product Code
2. Code Smallint
(Primary Key )
To Store the Product
3. Prod_Name Varchar(50)
Name
Foreign Key of
4. Category Varchar(20)
categories

 Table Name:- Dealer Primary Key:- ID

No. Column Name Data Type Description

1. ID Smallint Primary Key(A.I.)

2. Name Varchar(25) To Store the Dealer Name

3. Contect_no Smallint To Store the Dealer Phone

30
 Table Name:- Purchase Primary Key:- Bill_No

No. Column Name Data Type Description


1. Bill_No Smallint Primary Key (A.I.)
To Store Purchase Bill
2. Bill_Date DateTime
Date
3. ID Smallint Foreign Key of Dealer
4. Grand_Total Smallint To Store the Grand Total

 Table Name:- Purchase_Detail

No. Column Name Data Type Description


Foreign Key Of
1. Bill_No Smallint
Purchase
Foreign Key of
2. Code Smallint
Product
To Store Purchase
3. Qty Smallint
Quantity
To Store Bonus
4. Bonus Smallint Product From
Dealer
To Store Discount
5. Discount Smallint on Product From
Dealer
6. Price Smallint Product Price
Product Expiry
7. Expiry_Date DateTime
Date

31
 Table Name:- Purchase_Return

No. Column Name Data Type Description


Foreign Key Of
1. Bill_No Smallint
Purchase
2. Bill_Date DateTime Purchase Bill Date
Foreign Key Of
3. Code Smallint
Product
To Store Return
4. Qty Smallint
Product Quantity

 Table Name:- Sales Primary Key :- Bill_No

No. Column Name Data Type Description


1. Bill_No Smallint Primary Key(A.I.)
To Store Sale Bill
2. Bill_Date DateTime
Date
To Store the
3. Cust_Name Varchar(100)
Customer Name
To Store Sale Bill
4. Grand_Total Smallint
Total

 Table Name:- Sales_Detail

No. Column Name Data Type Description


Foreign Key Of
1. Bill_No Smallint
Sales
Foreign Key Of
2. Code Smallint
Product
3. Qty Smallint Sale Quantity
Store Product
4. Price Smallint
Price
Discount On
5. Discount Smallint
Selling
6. Expiry_Date DateTime Product Expiry

32
Date

 Table Name:- Sales_Return

No. Column Name Data Type Description


Foreign Key Of
1. Bill_No Smallint
Sales
Store Sale Bill
2. Bill_Date DateTime
Date
Foreign Key Of
3. Code Smallint
Product
4. Qty Smallint Sale Quantity

 View Name:- Stock

No. Column Name Data Type Description

1. No Smallint No Of Product

2. Code Smallint Product Code


Store Category Of
3. Category Varchar(20)
Product
4. Qty Smallint Stock Of Product

5. Price Smallint Average Price


Total Of Price *
6. Tatal_Amt Int
Qty

33
Process Model
 Unified Modeling Language Manage
Purchase
Detail

Manage Sales
Detail

Manage Product
Detail

Manage Stock

Manage Customer
Record

Administrator Manage Delear


Record

Manage Purchase
Return

Manage Sales
Return

Manage Bill
Record

Manage Company
Record

34
Process Model

 Unified Modeling Language


Sale
Product

Customer
Detail

Receive
Payment

Purchase
Product

Get Information
About Product

User
Get Information
About Stock

Get Information
About Issue Bills

Get Information
About Sales Return

Get Information About


Purchase Return

35
Activity Diagram
2). Sales Process Diagram

Get Customer
Detail

Click on Sales Menu &


Select Product Form
Option

Fill Sales Details

Check Empty
No
Field

Yes

Validate Data
No

yes

Get Sales &


Save the Record

36
3). Customer Detail Diagram

Get Customer Id

Click on Customer Menu &


Select Fill Detail Option

Fill Customer
Details

No
Check Empty
Field

Yes

No
Validate Data

Yes

Customer Detail Process


Complete & Save the
Record

37
4). Payment Detail Process With Cash

Click on Payment Menu &


Select Cash Payment
Receipt Option

Put Customer Id

Input Amount & Fill


Other Information

Click On Ok
Button

Validate Data No
& Check Empty
Field
Yes

Payment Received &


Save the Record

38
5). Payment Detail Process With Cheque

Click on Payment Menu &


Select Cheque Receipt
Option

Input Customer
Id

Input Cheque Amount,


Cheque No, Cheque
Date

Click On Ok
Button

Validate Data No
& Check Empty
Field
Yes

Payment Recived & Save


the Record

39
6). Purchase Product Process Diagram

Click on Purchase Menu &


Select Purchase Detail
Option

Fill Purchase
Form Details

Check Empty No

Field

Yes

No
Validate Data

Yes

Record Store in
System

40
7). Fill Product Information Process
Diagram

Click on Product Menu &


Select Product Information
Option

Input Product
Name

No
Check Record

Yes

Show Product
Details

Fill Required
Information

Click On Save
Button

No
Validate Data

Yes

Record Store in
System

41
8). Create a New User

Input Admin User Id &


Password

Click On User Menu


and Select Add User

Input New User Id &


Password Correctly

No
Check Password &
Confirm Password
Equal
Yes
New User Create

42
9). Change Password

Input Admin User Id &


Password

Click On User Menu and


Select Change Password
Option

Select User

Input current
password & New
Password Correctly

No
Validate Data

Yes
Change Password

43
10). Edit Product Information

Login with Admin


User Id & Password

Click on Administrator
Menu and Select Edit
Product
Details

Fill Details of Product


as form

No
Validate the Data &
Check Empty Field

Yes
Record Stored

44
11). Edit Store Details

Login with Admin


User Id & Password

Click on Administrator
Menu and Select Edit
Store

Fill Details of Store as


Form

No
Validate the Data &
Check Empty Field

Yes
Record Stored

45
12). Report Details

Login with Admin


User Id & Password

Click on Report

Select Report which


you want

Display Display Payment Display Purchase Display Billing


Customer &
Status Report Report
Sales Report
Report

Print or Exit

46
Data Flow Diagram
Data Flow Diagram (abbreviated as DFD) was introduced by
De Marco (1978) and Gane and Sarson (1979). A data flow diagram
models a system by using external entities from which data flows to a
process which transforms the data and creates output data flows
which goes to other processes or external entities or data stores.

The main merit of DFD is that it can provide an overview of what data a
system would process, what transformations of data are done, what data are stored
and which stored data are used, and where the result flows.

A data flow diagram (DFD) is a graphical representation of the "flow"


of data through an information system, modelling its process aspects. Often they are
a preliminary step used to create an overview of the system which can later be
elaborated.[2] DFDs can also be used for the visualization of data processing
(structured design).

A DFD shows what kinds of data will be input to and output from the system, where
the data will come from and go to, and where the data will be stored. It does not
show information about the timing of processes, or information about whether
processes will operate in sequence or in parallel (which is shown on a flowchart).

Good Conventions In Developing DFD’S :-


Data Flow diagrams serve the dual purpose of specifying what data are
needed for processing and as documentation of what procedures transform data.

A good Data Flow Diagram should not have the following:-


1. Loops.
2. A process, which is a poor decision.
3. A Data Flow split into flows with different names and meanings.

47
4. Crossing Lines.
A good Data Flow Diagram should have the following:-
1. Process names, data stores names, and data flow names must be meaningful
in the context of the problem.
2. DFD’s must be developed top down with lower levels giving more details.
3. Data should be conserved.
4. Data flows should not act as signals to activate or initiate processes.

There are Various levels of Data Flow Diagrams.

48
DFD Level 0

Retail
Product
User Store
Manageme
nt
System

49
DFD Level 1

Request Collection Detail


Customer
Product Product Detail Product

Purchase Retail
Payment Store Customer Detail
ManagemeOrder Detail
nt Supply Detail
Product System
Detail

User

50
DFD Level 2

User Search

Order

Purchase

51
DFD Level 3

User Search Product

Apply
Filter

Cosmetics
View
Category
Grocery

Stationary

52
DFD Level 4

User Request Product

Purchase
Product

Purchase

53
MODULES
 Main Function module
 Contain Main function. So , Program execution start from main

function

 Database Connection module


 Database connection variables and connection strings for

connect to the SQL database. Also check for database

connection is active or not

 Number To Text Convert module


 This module is use for convert Numeric value to Word. It’s catch

value through parameter and return Number to Word.

REPORTS
 Product List Report

 Dealer List Report

 Purchase Report

 Purchase Return Report

 Sales Report

 Sales Return Report

 Expire Medicines Report

 Stock Report

54
Software Testing

Testing
Once the program code is designed and implemented, some

testing technique will be used to ensure the program function correctly.

Unit Testing
Individual modules will be tested against the specification and

design to confirm their correct operation.

Integration Testing

Several units will be tested together to see how they interact and

to confirm whether their overall function is performed correctly. This

testing will apply to each of the main section of code; the use interface,

data processing, etc.

System Testing

The entire system is tested against the specification to check it

meets the project’s requirements.

55
Unit
Testing

Module
Testing

Sub-Sytem
Testing

System
Testing

Acceptance
Testing

56
Objective

 Testing is a process of the executing a program with the intent of

finding an error.

 A good test case is one that has high probability of finding an as

yet undiscovered error.

 A successful test is one that uncovers an as yet undiscovered

Error.

Principles

 All tests should be traceable to customer requirement.

 Tests should be implemented long before test begins.

 Testing should begin “in the small” and progress towards testing

“in the large”

 Expansive testing is not possible.

 To be most effective, an independent third party should conduct

testing.

57
Code

Coding for Customer Registration Form


Private Sub Command1_Click ()
Me.Hide
frmid.Show
End Sub
Private Sub confrim_Click ()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text =
"" Or Text6.Text = "" Then
frmreg.Show
MsgBox "Please, Fill all Details Customer"
Else
reg1.Recordset.Update
MsgBox "Record Saved", vbInformation, "Save"
MsgBox ("Thanks for Registering, click continue to log in")
Frmlogin.Show
End If
End Sub
Private Sub exit_Click ()
If MsgBox ("Are you sure you want to quit?", vbYesNo) = vbYes Then
End
End If
End Sub
Private Sub Form_Load ()
Combo1.AddItem "Male"
Combo1.AddItem "Female"
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text4.Enabled = False
Combo1.Enabled = False

58
Text6.Enabled = False
lblDate.Caption = Date
lblTime.Caption = Time
End Sub
Private Sub Option1_Click ()
If Option1.Value = True Then Text2.PasswordChar = ""
End Sub
Private Sub Option2_Click ()
If Option2.Value = True Then Text2.PasswordChar = "*"
End Sub
Private Sub Proceed_Click ()
Unload Me
reg1.Recordset.Update
Frmlogin.Show
End Sub
Private Sub start_Click ()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text =
"" Or Text6.Text = "" Then
frmreg.Show
Else
reg1.Recordset.AddNew
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text7.Enabled = True
Combo1.Enabled = True
Text6.Enabled = True
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text4.Text = ""
59
Combo1.Text = ""
Text6.Text = ""
End If
End Sub
Private Sub Text1_Change ()
Text1.Text = UCase (Text1.Text)
Text1.SelStart = Len (Text1.Text)
End Sub
Private Sub Timer1_Timer ()
lblDate.Caption = Date
lblTime.Caption = Time
End Sub
Coding for Workers Registration Form
Private Sub Command1_Click()
Me.Hide
frmid.Show
End Sub
Private Sub Command2_Click ()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Combo3.Text = ""
Combo2.Text = ""
End Sub
Private Sub confrim_Click ()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text =
"" Or Text6.Text = "" Then
frmreg1.Show

60
MsgBox "Please Fill all Details Worker it is Required."
Else
reg2.Recordset.Fields ("FullName") = Text1.Text
reg2.Recordset.Fields ("Password") = Text2.Text
reg2.Recordset.Fields ("Username") = Text3.Text
reg2.Recordset.Fields ("Age") = Text4.Text
reg2.Recordset.Fields ("Address") = Text5.Text
reg2.Recordset.Fields ("DateOfEmployment") = Text6.Text
reg2.Recordset.Fields ("Phonenumber") = Text7.Text
reg2.Recordset.Fields ("Email") = Text8.Text
reg2.Recordset.Fields ("Age") = Text4.Text
reg2.Recordset.Fields ("Gender") = Combo2.Text
reg2.Recordset.Fields ("Position") = Combo3.Text
reg2.Recordset.Update
MsgBox "Record Saved", vbInformation, "Save"
MsgBox ("Thanks for Registering,click ok to log in")
frmlogin2.Show
Unload Me
End If
End Sub
Private Sub exit_Click ()
If MsgBox ("Are you sure you want to quit?", vbYesNo) = vbYes Then
End
End If
End Sub
Private Sub Form_Load ()
Combo3.AddItem "Admin"
Combo3.AddItem "Stock Manager"
Combo3.AddItem "Sales Manager"
Combo3.AddItem "Record Keeper"
Combo3.AddItem "Others"
Combo2.AddItem "Male"
Combo2.AddItem "Female"
Text1.Enabled = False
61
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Combo3.Enabled = False
Combo2.Enabled = False
Command2.Enabled = False
confrim.Enabled = False
End Sub
Private Sub Option1_Click ()
If Option1.Value = True Then Text2.PasswordChar = ""
End Sub
Private Sub Option2_Click ()
If Option2.Value = True Then Text2.PasswordChar = "*"
End Sub
Private Sub Proceed_Click ()
Unload Me
frmlogin2.Show
End Sub
Private Sub start_Click ()
If Text1.Text = "" And Text2.Text = "" And Text3.Text = "" And Text4.Text = "" And
Text5.Text = "" And Text6.Text = "" Then
frmreg1.Show
Else
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
62
Text8.Enabled = True
Combo3.Enabled = True
Combo2.Enabled = True
Command2.Enabled = True
confrim.Enabled = True
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Combo3.Text = ""
Combo2.Text = ""
End If
End Sub
Private Sub Text1_Change ()
Text1.Text = UCase (Text1.Text)
Text1.SelStart = Len (Text1.Text)
End Sub
Coding for Customer Login Form
Private Sub BACK_Click ()
Me.Hide
Frmid2.Show
End Sub
Private Sub Command1_Click ()
If Text1.Text = "" And Text2.Text = "" Then
MsgBox "Input your Password and Username"
Text1.Text = "username"
Text2.Text = "password"
End If
With reg1.Recordset

63
.Filter = "Username = '" & Text1.Text & "' and Password = '" & Text2.Text & "'"
If .RecordCount> 0 Then
MsgBox "Access Granted: " & .Fields ("FullName"), vbInformation, "Login"
frmmain2.Show
Unload Me
Else
MsgBox "Invalid Account, Register to gain access", vbCritical, "Login" '
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End If
End With
End Sub
Private Sub Command2_Click ()
If MsgBox ("Are you sure you want to quit now?” vbYesNo) = vbYes Then
End
End If
End Sub
Private Sub Form_Load ()
If Text1.Text = "" And Text2.Text = "" Then
Command1.Enabled = False
End If
End Sub
Private Sub REGISTER_Click ()
Me.Hide
frmreg.Show
End Sub
Private Sub Text1_Change ()
Command1.Enabled = True
End Sub
Private Sub Text2_Change ()
Command1.Enabled = True
End Sub

64
Coding for Workers Login Form
Private Sub BACK_Click ()
Me.Hide
Frmid2.Show
End Sub
Private Sub Command1_Click ()
If Text1.Text = "" And Text2.Text = "" Then
MsgBox "Input your Password and Username"
Text1.Text = "username"
Text2.Text = "password"
End If
With reg2.Recordset
.Filter = "Username = '" & Text1.Text & "' and Password = '" & Text2.Text & "'"
If .RecordCount> 0 Then
MsgBox "Access Granted: " & .Fields ("FullName"), vbInformation, "Login"
frmMain.Show
Unload Me
Else
MsgBox "Invalid Account, Register to gain access", vbCritical, "Login" '
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End If
End With
End Sub
Private Sub Command2_Click ()
If MsgBox ("Are you sure you want to quit now?", vbYesNo) = vbYes Then
End
End If
End Sub
Private Sub Form_Load ()
If Text1.Text = "" And Text2.Text = "" Then
Command1.Enabled = False

65
End If
End Sub
Private Sub Text1_Change ()
Command1.Enabled = True
End Sub
Private Sub Text2_Change ()
Command1.Enabled = True
End Sub
Private Sub REGISTER_Click ()
Me.Hide
frmreg1.Show
End Sub
Coding for Purchase Form
Private Sub Command1_Click ()
Text2.Text = Val (Combo1.Text) * Val (Text1.Text)
End Sub
Private Sub Command10_Click ()
Text19.Text = Val (Combo10.Text) * Val (Text20.Text)
End Sub
Private Sub Command11_Click ()
Text22.Text = Val (Combo11.Text) * Val (Text21.Text)
End Sub
Private Sub Command12_Click ()
Text24.Text = Val (Combo12.Text) * Val (Text23.Text)
End Sub
Private Sub Command13_Click ()
Text26.Text = Val (Combo13.Text) * Val (Text25.Text)
End Sub
Private Sub Command14_Click ()
Text27.Text = Val(Text2.Text) + Val(Text3.Text) + Val(Text5.Text) + Val(Text7.Text) +
Val(Text9.Text) + Val(Text11.Text) + Val(Text13.Text) + Val(Text15.Text) +
Val(Text17.Text) + Val(Text19.Text) + Val(Text22.Text) + Val(Text24.Text) +
Val(Text26.Text)

66
End Sub
Private Sub Command15_Click ()
If MsgBox ("Have you finished Purchasing you product?", vbYesNo) = vbYes Then
Closing.Show
End If
End Sub
Private Sub Command16_Click ()
Unload Me
frmmain2.Show
End Sub
Private Sub Command2_Click ()
Text3.Text = Val (Combo2.Text) * Val(Text4.Text)
End Sub
Private Sub Command3_Click ()
Text5.Text = Val (Combo3.Text) * Val (Text6.Text)
End Sub
Private Sub Command4_Click ()
Text7.Text = Val (Combo4.Text) * Val (Text8.Text)
End Sub
Private Sub Command5_Click ()
Text9.Text = Val (Combo5.Text) * Val (Text10.Text)
End Sub
Private Sub Command6_Click ()
Text11.Text = Val (Combo6.Text) * Val (Text12.Text)
End Sub
Private Sub Command7_Click ()
Text13.Text = Val (Combo7.Text) * Val (Text14.Text)
End Sub
Private Sub Command8_Click ()
Text15.Text = Val (Combo8.Text) * Val (Text16.Text)
End Sub
Private Sub Command9_Click ()
Text17.Text = Val (Combo9.Text) * Val (Text18.Text)
End Sub
67
Private Sub DataCombo1_Change ()
Text1.Text = "150"
End Sub
Private Sub DataCombo10_Change ()
Text20.Text = "1500"
End Sub
Private Sub DataCombo11_Change ()
Text21.Text = "2000"
End Sub
Private Sub DataCombo12_Change ()
Text23.Text = "700"
End Sub
Private Sub DataCombo13_Click (Area As Integer)
Text25.Text = "1500"
End Sub
Private Sub DataCombo2_Change ()
Text4.Text = "1500"
End Sub
Private Sub DataCombo3_Change ()
Text6.Text = "250"
End Sub
Private Sub DataCombo4_Change ()
Text8.Text = "200"
End Sub
Private Sub DataCombo5_Change ()
Text10.Text = "1000"
End Sub
Private Sub DataCombo6_Change ()
Text12.Text = "1500"
End Sub
Private Sub DataCombo7_Change ()
Text14.Text = "800"
End Sub
Private Sub DataCombo8_Change ()
68
Text16.Text = "700"
End Sub
Private Sub DataCombo9_Change ()
Text18.Text = "1000"
End Sub
Private Sub Form_Load ()
lblDate.Caption = Date
lblTime.Caption = Time
DataCombo13.Text = ""
End Sub
Private Sub Timer1_Timer ()
lblDate.Caption = Date
lblTime.Caption = Time
End Sub
Private Sub worker_Click ()
frmlogin2.Show
MsgBox ("Accurately work on stocks Reduction Please")
End Sub
Coding for Stock Form
Private Sub Command1_Click ()
Unload Me
frmmain2.Show
End Sub
Private Sub Command2_Click ()
If MsgBox("THANKS FOR CHECKING OUR STOCKS WE REALLY APPRECIATE
YOU, PLEASE DO PURCHASE OUR STOCK by clicking NO now then click Purchase,
otherwise click Yes, have a Splendid day.", vbYesNo, "Are You Leaving So Soon") = vbYes
Then
End
End If
End Sub
Private Sub Command3_Click ()
Unload Me

69
frmpurchase.Show
End Sub
Private Sub Command6_Click ()
If Option1.Value = True Then
If Not txtSearch.Text = "" Then
Stock.Recordset.Filter = "ItemName like '%" &txtSearch.Text& "%'"
Else
Stock.Refresh
MsgBox ("Sorry Item not available in Stock")
End If
Else
If Not txtSearch.Text = "" Then
Stock.Recordset.Filter = "Categories like '%" &txtSearch.Text& "%'"
Else
Stock.Refresh
MsgBox ("Sorry Item not available in Stock")
End If
End If
End Sub
Coding for Customer list Form
Private Sub Command1_Click ()
Unload Me
frmMain.Show
End Sub
Private Sub Command3_Click ()
If MsgBox ("Are you sure?” vbQuestion + vbYesNo, "Delete Record") = vbYes Then
reg1.Recordset.Delete
MsgBox "Record Deleted", vbInformation, "Delete"
End If
End Sub
Private Sub Command6_Click()
If Option1.Value = True Then
If Not txtSearch.Text = "" Then

70
reg1.Recordset.Filter = "Fullname like '%" &txtSearch.Text& "%'"
Else
reg1.Refresh
End If
Else
If Not txtSearch.Text = "" Then
reg1.Recordset.Filter = "Gender like '%" &txtSearch.Text& "%'"
Else
reg1.Refresh
End If
End If
End Sub
Coding for Workers list Form
Private Sub Command1_Click ()
Unload Me
frmMain.Show
End Sub
Private Sub Command3_Click()
If MsgBox("Are you sure?", vbQuestion + vbYesNo, "Delete Record") = vbYes Then
reg2.Recordset.Delete
MsgBox "Record Deleted", vbInformation, "Delete"
End If
End Sub
Private Sub Command6_Click()
If Option1.Value = True Then
If Not txtSearch.Text = "" Then
reg2.Recordset.Filter = "Fullname like '%" &txtSearch.Text& "%'"
Else
reg2.Refresh
End If
Else
If Not txtSearch.Text = "" Then
reg2.Recordset.Filter = "Gender like '%" &txtSearch.Text& "%'"

71
Else
reg2.Refresh
End If
End If
End Sub

72
Scope of the project

This project has some limitations. These are as below.

 Database backup and restore process is not included.

 Yearly Record and Monthly Status is not available.

 Last year Record find is not possible in this project.

 Staff salary and attendance could not maintain in this project.

 Student attendance is also not managed in this project.

 Total fees collection & Whole Branch Summary Report is not

include in this.

Future Scope

All over limitations are tried to solve in my project. And try to best

solve customer requirements.

73
Bibliography
Website Name:-

 www.visual-basic-6.com
 http://www.sqlcourse.com
 www.visualbasicbooks.com
 www.agilemodeling.com/artifacts/dataFlowDiagram.htm
 www.w3schools.com/sql

Book Name:-
 Introduction To Systems Analysis And Design.
 A Complete Visual Basic 6 Training Course: How to Programme:
Package.

74

S-ar putea să vă placă și