You are on page 1of 135

Software Development Project

Managing System
Kelab Darul Ehsan

Table of Contents
Introduction ........................................................................................................................................... 4
About KDE ......................................................................................................................................... 5
Problem Analysis ................................................................................................................................ 5
Project Details ..................................................................................................................................... 6
Objectives ........................................................................................................................................... 8
Project Scope ...................................................................................................................................... 8
Entity Relationship Diagram (ERD) ................................................................................................... 9
Data Flow Diagram (DFD) ................................................................................................................. 10
Context Diagram ............................................................................................................................... 10
Data Flow Diagram Level 0 .............................................................................................................. 11
Membership-Level 1 ......................................................................................................................... 12
Point-of-Sales (POS)-Level 1 ........................................................................................................... 13
Members Billing-Level 1 .................................................................................................................. 14
Accounts Receivable-Level 1 ........................................................................................................... 15
Inventory Management ..................................................................................................................... 16
Data Dictionnary ................................................................................................................................. 17
Gantt Chart ......................................................................................................................................... 19
Work L oad Matrix............................................................................................................................. 20
Hierarchy Charts ................................................................................................................................ 21
Overall .............................................................................................................................................. 21
Membership ...................................................................................................................................... 22
Point-of-Sales.................................................................................................................................... 23
Accounts Receivable ......................................................................................................................... 25
PSEUDO CODE .................................................................................................................................. 28
1 - LOGIN MODULE ....................................................................................................................... 28
2 – Main Menu .................................................................................................................................. 29
2 – MEMBERSHIP........................................................................................................................... 30
3 - New Registration ......................................................................................................................... 31

1|Page
Software Development Project
Managing System
Kelab Darul Ehsan

4 - Update / Delete Member .............................................................................................................. 32


5 –Point of Sales Form ...................................................................................................................... 33
6 – New Order................................................................................................................................... 34
7 – Cancel Order ............................................................................................................................... 35
8 –Members Billing Form ................................................................................................................. 36
9 – Monthly Statement for Members ................................................................................................ 37
10 – List of Users .............................................................................................................................. 38
11 –Inventory Management Form..................................................................................................... 38
12 – Add New Product ...................................................................................................................... 39
13 – Delete Product ........................................................................................................................... 40
14 – Update Product.......................................................................................................................... 41
15 – Goods Requisition Product ....................................................................................................... 42
16 – Purchase Order .......................................................................................................................... 43
17–Account Receivable Form........................................................................................................... 44
18 – Payment Accounts Reveivable Form ........................................................................................ 45
19 – Report Menu ............................................................................................................................. 46
Test plan............................................................................................................................................... 47
PERCEIVED ASSUMPTION AND LIMITATION........................................................................ 55
Membership Registration (Membership) .......................................................................................... 55
Point of Sales (POS) ......................................................................................................................... 56
Members Billing ............................................................................................................................... 57
Accounts Receivable ......................................................................................................................... 58
Inventory Management ..................................................................................................................... 59
Future Enhancement .......................................................................................................................... 60
User Manual ........................................................................................................................................ 61
Appendix .............................................................................................................................................. 70
Minutes of Meeting ........................................................................................................................... 70
Coding ............................................................................................................................................... 82
Login Form ................................................................................................................................... 82
Main Menu .................................................................................................................................... 83
Membership_New Registration .................................................................................................... 84
Membership_Modify/Terminate ................................................................................................... 87

2|Page
Software Development Project
Managing System
Kelab Darul Ehsan

Point of Sales_New Order_Choose Café ...................................................................................... 91


Point of Sales_New Order_Malaysian Café ................................................................................. 92
Point of Sales_New Order_Western Café ................................................................................... 109
Points of Sales_New Order_Bill ................................................................................................. 123
Members Billing_ Monthly Statement ........................................................................................ 123
Members Billing_ Monthly Statement Viewer ........................................................................... 125
Account Receivable_Payment .................................................................................................... 129
Inventory Management_Add New Item ..................................................................................... 131
Inventory Management_Modify/Delete Item ............................................................................. 133

3|Page
Software Development Project
Managing System
Kelab Darul Ehsan

Introduction
In this global, each and everything is made easy and simple with help of technology
development. Besides that, technology solves most of problems that happening in our daily
life such creating, maintaining and developing data & information. Meanwhile, many people
haven’t known the power technology and they still creating and maintaining data &
information manually. Hence, many problems arisen and decreasing in efficiency in
managing human resources and department manually.

At Kelab Darul Eshan (KDE), the management of financial records pertaining to


members was poorly kept or inaccurate and resulted in untimely monthly invoices to its
members and consequently created cash-flow problems for the club. The poorly managed
food and beverage inventory had resulted in the club unnecessarily tying its funds in stocks
and also caused high wastages as the bulk of the raw materials were perishable items with a
short shelf life.

The only way to manage the rapid growth of the business was to effectively computerise its
operations.

4|Page
Software Development Project
Managing System
Kelab Darul Ehsan

About KDE

Kelab Darul Eshan (KDE), was incorporated in 1990, offers one of the most luxurious
recreational development in South East Asia. This Greg Norman designed 18-hole
Championship golf course features 6,905 yards to test even the keenest golfers. The club
started off with 200 members and its entire operations were conducted manually. As the
membership gradually increased, the club installed standalone personal computers in some of
the departments to streamline its business activities.

Presently, Kelab Darul Eshan (KDE) has been experiencing tremendous growth of its
membership, which has increased to approximately 5000 members and finds that its quality
of service both at back-office and front-office operations such as billing of members at the
respective outlets were gradually deteriorating. The critical operations such as monthly
billing of members took up too much time and increasing the number of staff in the accounts
department alone did not improve its efficiency

Problem Analysis

This project was designed to implement a Desktop application for the Kelab Darul
Eshan (KDE). Most of the departments include within the KDE had no Automated Financial
Record Keeping System but relied on paper records and human memory. Human may forget
hence losing most of the important data. Also incase of change in staff within the department,
some records may be lost for good, which could lead to loss of the company. Hence, the
records that were in the company were therefore unreliable and hence needed to make them
so.

Although automating the office management system has been an area of concern, no
study had been carried out on the need for one at KDE Company. Ever since, paper file
system had been and the major method used as the means in information collecting,
processing, storing and retrieving in the different department within the company, that deal in
data entry, processing and retrieving like the staff recruitment department among others.
Whereas the cases of inefficiency and poor performance by the same system (file based
databases) like; duplication of data items in multiple files, duplication would affect input,

5|Page
Software Development Project
Managing System
Kelab Darul Ehsan

maintenance, storage and possibly data integrity problems were been discovered in other
organizations that use the same system, KDE had not carried out any study to improve on the
system. And since the data are growing up so quickly, the rate is expected to jump
appreciably so that information doubles in half the time, that and other reasons have led to the
growth of office automation.

Project Details

We are using to use some concepts, methodologies and techniques which have been used in
designing the Managing System of KDE. The concept, methodologies and techniques are as
follows:-

 Data Flow Diagrams(DFD)


 Hierarchy Charts
 Entity Relationship Diagram(ERD)
 Screen & Report Designs
 Pseudocode
 Test Plan
 Perceived Limitations
 Perceived Assumptions

The areas that the Managing System will be covered that has specified by the
management are as follows:-

1. Membership
 Adding new member
 Modifying member’s details
 Terminating membership
 Report on listing member’s details according alphabetical order
2. Point-Of-Sales (POS) for the outlets
 Adding order
 Modify order
 Cancel order
 Report on sales by daily basis or monthly basis

6|Page
Software Development Project
Managing System
Kelab Darul Ehsan

3. Members Billing
 Monthly statement to members
 View invoice of users
 Report on invoice transaction
4. Accounts Receivable(payments received from members)
 Receive Payments
 Modify any mistaken payments
 Report on received payments by each month
 Report on balance payments owing by members by name
5. Inventory Management
 Add new product
 Delete product
 Search product details
 Update product
 Goods received
 Goods Requisition
 Report on purchase order
 Report on the inventory used and balance

7|Page
Software Development Project
Managing System
Kelab Darul Ehsan

Objectives

The objective of this project is to develop a computerised system that able to help the end
users to fast achieve their information which they require. This system will replace the
exisiting one which could not support the business efficiency. The designing of this new
computerised system is based on the weakness and problems being defined in the existing
system.In the same time provide also a sharing information system among the whole office
with security purpose by means of:

 Developping a system based dekstop with login features.

 Creating a proposed system which enables users to manage the different areas
such as:

1. Membership registration
2. Point-Of-Sales (POS) for the outlets
3. Members Billing
4. Accounts Receivable (payments received from members)
5. Inventory Management

 Implementing the proposed system using a database created with Visual Basic
+ SQL server 2005 for the functionality of the proposed system.
 To create a paperless environment

Project Scope

To accomplish these challenges, knowledge and technological capabilities have to be


developed in some main areas which are:

 Concepts and design

 Tools and enabling technologies (Visual studio 2008, SQL Server 2005….);

 Project planning and system analysis.

8|Page
Software Development Project
Managing System
Kelab Darul Ehsan

Entity Relationship Diagram (ERD)

Employee
PK EmployeeID Payment

FirstName PK PaymentID
LastName
Gender Method
Username Description
Password Amount
Department ExtraCharges
DOB Date
Adress Status
Telephone FK1 MemberID
Email Member
PK MemberID

FirstName
LastName
DOB
Gender Stock
MembershipType
Telephone PK StockID
Bill Adress
Order ItemName
Status
PK ID QuantityInitial
Email PK ID
Description QuantityInHand
Type Price
Description Date
Quantity Status
AmountoPay FK1 SupplierID
Date FK1 MemberID
FK1 MemberID FK2 StockID

Supplier

PK SupplierID

Name
Adress
RawMaterial
Description

9|Page
Software Development Project
Managing System
Kelab Darul Ehsan

Data Flow Diagram (DFD)

Context Diagram

10 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Data Flow Diagram Level 0

6.0 Vendor
Financial
Cash flow
Department Report Cash
Flow Cash flow

Sales Sales
Vendor data
Supplier
invoice

Item sold Item Sold


Member
Invoice Item sold 5.0 Reorder
order
Member
data 3.0 Reorder Stock
2.0 Item Ordered
Item ordered
Update
Inventory
invoice Make Order
Stock Number
Stock on hand
Stock number Reorder quantity
Quantity sold
1.0

Maintain Stock number


Member Data Description Inventory Manager
Selling price

Inventory Details

Member Data
4.0

Generate
Invoice

Invoice

11 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Membership-Level 1

12 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Point-of-Sales (POS)-Level 1

13 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Members Billing-Level 1

14 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Accounts Receivable-Level 1

15 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Inventory Management

16 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Data Dictionnary

Table Name Column Name Data Type Size in Bytes Status


MemberTable MembershipID Nvarchar 10 Primary Key
Firstname Varchar 50 Not null
Lastname Varchar 50 Not null
Title Varchar 11 Not null
Gender Varchar 50 Not null
Address Varchar 50 Not null
DOB Date 50 Not null
JoinDate Varchar 50 Not null
Zipcode Integer 50 Not null
Telephone Integer 11 Not null
Email Varchar 50 Not null
MaritalStatus Varchar 11 Not null

Table Name Column Name Data Type Size in Bytes Status


StockTable Product Code Nvarchar 10 Primary Key
Name Varchar 50 Not null
Quantity Varchar 50 Not null
Brand Name Varchar 11 Not null
SupplierID Varchar 50 Secondary Key
Price Varchar 50 Not null

17 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Table Name Column Name Data Type Size in Bytes Status


EmployeeTable EmployeeID Nvarchar 10 Primary Key
Firstname Varchar 50 Not null
Lastname Varchar 50 Not null
Gender Varchar 50 Not null
Address Varchar 50 Not null
DOB Date 50 Not null
JoinDate Varchar 50 Not null
Department Integer 50 Not null
Telephone Integer 11 Not null
Email Varchar 50 Not null
MaritalStatus Varchar 11 Not null

Table Name Column Name Data Type Size in Bytes Status


StockTable StockID Nvarchar 10 Primary Key
Name Varchar 50 Not null
Quantity Varchar 50 Not null
Brand Name Varchar 11 Not null
SupplierID Varchar 50 Secondary Key
Price Varchar 50 Not null

Table Name Column Name Data Type Size in Bytes Status


PaymentTable PaymentID Nvarchar 10 Primary Key
MemberID Varchar 50 Secondary Key
Method Varchar 50 Not null
Amount Varchar 11 Not null
ExtraCharges Varchar 50 Not null
Date Varchar 50 Not null
Status Varchar 50 Not null

18 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Gantt Chart

19 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Work L oad Matrix

Task Vargaa Suntherreswaran

Introduction *
Acknowledgement *
Data Flow Diagram * *
Data Dictionary * *
Gantt Chart * *
Work Load Matrix *
Hierarchy Chart * *
Flow Chart * *
Screen Design * *
Report Design * *
Task Plan * *
Perceived Limitation * *
Perceived Assumption * *
Membership Registration *
Point Of Sales *
Members Billing * *
Accounts Receivable * *
Inventory Management * *
User Guide * *
Minutes of meeting *

20 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Hierarchy Charts

Overall

21 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Membership

22 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Point-of-Sales

23 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Members Billing

24 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Accounts Receivable

25 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Inventory Management

26 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Report Management

27 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

PSEUDO CODE

1 - LOGIN MODULE

BEGIN

Open the Database

Read (Username and Password)

Check if (Username equals to Username in Database and Password equals to


Password in Database depending either if The AdminCheckbox is checked or
StaffCheckBox is checked)

Close the Database

If Yes then

Goto to the MainMenu

Else

Display (“Error in Username or Password”)

END

28 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

2 – Main Menu

BEGIN

Load Menu Items

If User Choose Membership menu

Open Membership Page

Else if user Choose Points of Sales menu

Open Point of Sales Pages

Else if user choose Members Billing menu

Open Members Billing page

Else if user choose Accounts Receivable menu

Open Account Receivable page

Else if user choose Inventory Management menu

Open Inventory Management page

End if

END

29 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

2 – MEMBERSHIP

BEGIN

Load form

If User Clicks on “New Membership Registration” Button

Goto New Membership Registration

Else User Clicks on “Modify / Terminate Membership” Button

Goto New Modify / Terminate Registration

Else if User Clicks on “Membership Report” Button

Goto New Membership Report

End if

END

30 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

3 - New Registration

BEGIN

Open the Database

Read (Membership ID, First Name, Last Name, Title, IC/Passport, Gender, DOB,
Marital Status, Occupation, Address, Email, Contact No, Join Date)

If (RegisterButton is clicked)

Save (Membership ID, First Name, Last Name, Title, IC/Passport, Gender, DOB,
Marital Status, Occupation, Address, Email, Contact No, Join Date) into the Database

Else if (ClearButton is clicked)

Clear all data within the textbox

End if

Close the Database

END

31 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

4 - Update / Delete Member

BEGIN

Open the Database

Search Member by ID

Enter Member ID

If Member ID found in the database

Fill up textbox object with corresponding values from database

If (Edit Button is clicked)

Update (Membership ID, First Name, Last Name, Title, IC/Passport,


Gender, DOB, Marital Status, Occupation, Address, Email, Contact No, Join Date)
Where Member ID equals to value entered into the Database

Else if (Delete Button is clicked)

Delete (Membership ID, First Name, Last Name, Title, IC/Passport,


Gender, DOB, Marital Status, Occupation, Address, Email, Contact No, Join Date)
Where Member ID equals to value entered into the Database

Else

Display (“Member ID not found in the database”)If (RegisterButton is clicked)

End if

Close the Database

END

32 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

5 –Point of Sales Form

BEGIN

Load form

If User Clicks on “New order” Button

Goto New Order Form

Else User Clicks on “Cancel Order” Button

Goto New Cancel Order Form

Else if User Clicks on “Report Point of Sales” Button

Goto New Report Point of Sales Report

End if

END

33 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

6 – New Order

BEGIN

Open the Database

Get Membership ID from Search in the database

Get Name, and Food

If (GenerateBill is clicked)

Save (MembershipID, Name, Food) into the Database

Else if (ClearButton is clicked)

Clear all data within the textbox

End if

Close the Database

END

34 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

7 – Cancel Order

BEGIN

Open the Database

Get Membership ID from Search in the database

Get Name, and Food

If (Delete is clicked)

Delete (MembershipID, Name, Food) into the Database

Else if (ClearButton is clicked)

Clear all data within the textbox

End if

Close the Database

END

35 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

8 –Members Billing Form

BEGIN

Load form

If User Clicks on “Monthly Statement” Button

Goto Monthly Statement Form

Else User Clicks on “List of User” Button

Goto List of User Form

Else if User Clicks on “Member Billing Report” Button

Goto Member Billing Report

End if

END

36 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

9 – Monthly Statement for Members

BEGIN

Open the Database

Get Membership ID from Search in the database

Get Name, and Food

If (View Current Month Statement is clicked)

Display Monthly Statement from the Database

Else if (ClearButton is clicked)

Clear all data within the textbox

End if

Close the Database

END

37 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

10 – List of Users

BEGIN

Open the Database

Display All Members from Database

Close the Database

END

11 –Inventory Management Form

BEGIN

Load form

If User Clicks on “Add New Product” Button

Goto New Add New Product Form

Else User Clicks on “Search / Delete Product” Button

Goto New Search / Delete Product Form

Else if User Clicks on “Update Product” Button

Goto Update Product Form

End if

END

38 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

12 – Add New Product

BEGIN

Open the Database

Get Product Code, Product Name, Quantity, Brand Name, Supplier, Price

If (SaveButtom is clicked)

Save (Product Code, Product Name, Quantity, Brand Name, Supplier, Price) into the
Database

Else if (ClearButton is clicked)

Clear all data within the textbox

End if

Close the Database

END

39 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

13 – Delete Product

BEGIN

Open the Database

Get Product Code or Product Name from Search in the database

Get Product Code, Product Name, Quantity, Brand Name, Supplier, Price

If (DeleteButton is clicked)

Delete All Data from Database Where Product Code is equal to value searched

Else if (ClearButton is clicked)

Clear all data within the textbox

End if

Close the Database

END

40 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

14 – Update Product

BEGIN

Open the Database

Get Product Code or Product Name from Search in the database

Get Product Code, Product Name, Quantity, Brand Name, Supplier, Price

If (UpdateButton is clicked)

Update All Data from Database Where Product Code is equal to value searched

Else if (ClearButton is clicked)

Clear all data within the textbox

End if

Close the Database

END

41 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

15 – Goods Requisition Product

BEGIN

Open the Database

Get Product Code or Product Name from Search in the database

Get Product Code, Product Name, Quantity, Brand Name, Supplier, Price

If (OKButton is clicked)

Save Requisition Goods into Database

Else if (ClearButton is clicked)

Clear all data within the textbox

End if

Close the Database

END

42 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

16 – Purchase Order

BEGIN

Open the Database

Get Delivery Order Number

Get Supplier Code, Product Code or Product Name

Get Product Details

If (ReceiveButton is clicked)

Save All Data into the Purchase table in the database Where Product Code is equal to
value searched

Else if (ClearButton is clicked)

Clear all data within the textbox

End if

Close the Database

END

43 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

17–Account Receivable Form

BEGIN

Load form

If User Clicks on “Payment” Button

Goto Payment Form

End if

END

44 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

18 – Payment Accounts Reveivable Form

BEGIN

Open the Database

Get Invoice Number

Get Membership ID and Name

If (OKButtom is clicked)

Get Total Due

Get Payment Receive and Balance

Save Details into Payment Table into the Database

Else if (ClearButton is clicked)

Clear all data within the textbox

End if

Close the Database

END

45 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

19 – Report Menu

BEGIN

Load report menu Items

If User Choose report menu

Open Membership Report Page

Else if user Choose Points of Sales Report

Open Point of Sales Report

Else if user choose Members Billing Report

Open Members Billing Report

Else if user choose Accounts Receivable Report

Open Account Receivable Report

Else if user choose Inventory Management Report

Open Inventory Management Report

End if

46 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Test plan
TEST PLAN (Main Screen)

Text Cases Description Expected Outcome

Login button A button that is written login It opens the main menu system
screen
Clear button A button that is written clear Clears/delete the data/input
entered in the text box.
Exit button A button that is written exit It exit from the system

TEST PLAN (Main Menu Screen)

Text Cases Description Expected Outcome

Membership button A button that is written It opens the membership menu


membership
Point-of - sales button A button that is written point-of It opens the point-of-sales menu
- sales
Member’s billing button A button that is written It opens the member’s billing
member’s billing menu
Account receivable button A button that is written account It opens the accounts receivable
receivable menu
Inventory management button A button that is written It opens the inventory
inventory management management screen
Logout button A button that is written logout It exits/logouts the main screen
and system

47 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

TEST PLAN (Membership Menu)

Text Cases Description Expected Outcome

New Membership Registration A button that is written new It open the new membership
button members registration registration screen
Modify/ Terminate A button that is written modify It open the modify or terminate
Membership button or to terminate membership membership screen

TEST PLAN (New Membership Registration)

Text Cases Description Expected Outcome


Save button A button that is written save It save the membership to the
database
Clear button A button that is written clear It clears the input/ data
entered in the text box

48 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

TEST PLAN (Modify/ Terminate Membership)

Text Cases Description Expected Outcome


Save button A button that is written save It save the membership to the
database
Modify button A button that is written When the button is press it
Modify allows the users to modify
few particular.
Terminate button A button that is written It terminates member’s
terminate information from the database.
It removes entire particular
about the member
Search button A button that is written search It allows the user to search the
particular member with their
member’s id.

TEST PLAN (Point-Of-Sales Menu)

Text Cases Description Expected Outcome

New order button A button that is written new It open the new order screen
order
Select button A button that is written select It select between the options of
cafe

49 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

TEST PLAN (New Order Button- Point-Of-Sales)

Text Cases Description Expected Outcome

Add button A button that is written add To add more food menu to the
list.
Search button A button that is written search It allows the user to search the
particular member with their
member’s id.
Print button A button that is written print It allows the bill of the food to
button be print.
Remove button A button that is written remove The remove button is used to
button remove dishes from list box
Total price A button that is written total This button will total the cost
price entire menu which was selected

TEST PLAN (Member’s Billing)

Text Cases Description Expected Outcome

Monthly statement button A button that is written monthly It open the month statement of
statement the user in monthly statement
screen

TEST PLAN (Monthly Statement)

Text Cases Description Expected Outcome

Search button A button that is written search It allows the user to search the
particular member with their
member’s id.
View current month statement A button that is written view Current month statement of the
button current statement member can be view in new
form

50 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

View monthly statement button A button that is written view Previous month statements can
previous statement be view in form after selected
month in calendar
Print statement A button that is written print It allows the KDE to print and
statement send the statement to members.

TEST PLAN (Account Receivable)

Text Cases Description Expected Outcome

Payment A button that is written payment It open the payment account


receivable screen
Modify Details A button that is written modify It open login screen to modify
details after user_id and password
given correctly then it will
proceed to modify screen.
Report of Accounts Receivable A button that is written report of It open report of account
account receivable receivable
Back to menu button A button that is back to main It brings user to main menu

Logout button A button that is written logout It exits/logouts the main screen
and system

TEST PLAN (Payment Accounts Receivable)

Text Cases Description Expected Outcome

Ok button A button that is written ok The ok button search for


member id/ name
Ok button A button that is written ok The ok button search for invoice
number
Ok button A button that is written ok The ok button confirm after the
payment has been done.
Back to menu button A button that is back to main It brings user to the member
Accounts receivable

51 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

TEST PLAN (Modify details)

Text Cases Description Expected Outcome

Login button A button that is written login It opens the main menu system
screen
Clear button A button that is written clear Clears/delete the data/input
entered in the text box.
Ok button A button that is written ok The ok button search for
member id/ name
Ok button A button that is written ok The ok button search for invoice
number
Modify button A button that is written modify To modify the total amount

Modify button A button that is written modify To modify the amount to pay.

Save button A button that is written save It save the modify payments
to the database
Back to menu button A button that is back to main It brings user to the member
Accounts receivable

TEST PLAN (Report of Accounts Receivable)

Text Cases Description Expected Outcome


Overall Year Report A button that is written overall It view the accounts receivable
button year report button for entire year
Overall Individual Report A button that is written It view vie the accounts
overall individual report receivable for individual
button
Back to menu button A button that is back to main It brings user to the member
Accounts receivable

52 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

TEST PLAN (Inventory Management)

Text Cases Description Expected Outcome

Inventory button A button that is written It open the inventory screen


inventory
Receive goods button A button that is written receive It open the receive goods screen
goods
Report of inventory A button that is written report of It open report of inventory
management button inventory management management
Goods requisition button A button that is written goods It brings user to the goods
requisition requisition screen
Logout button A button that is written logout It exits/logouts the main screen
and system
Purchase Order A button that is written It open the purchase order
purchase order screen
Back to menu button A button that is back to main It brings user to main menu

53 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

TEST PLAN (Inventory Management Level 1)

Text Cases Description Expected Outcome

Add New Product button A button that is written add new It open the add new product in
product inventory screen.
Search/ Delete Product button A button that is written search/ It opens search/delete product in
delete product inventory screen
Update Product button A button that is written update It open update screen in
product inventory management
Save button A button that is written save It save the edited inventory to
the database
Back to menu button A button that is back to main It brings user to inventory
management level 0
Update button A button that is written update It will update the product
inventory
Delete button A button that is written delete It will delete the product
inventory

54 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

PERCEIVED ASSUMPTION AND


LIMITATION

Membership Registration (Membership)

Assumptions

There are several assumptions in member registration (Membership). The assumptions are:

 Only staffs are allowed to use the system to ensure the system is not used by
other. There will password and username will be given. This is to protect the
privacy of the members and disclosure.
 All the staff in admin can modify and terminate membership.
 The membership report is viewed in alphabetic mode from a-z. Report can be
view monthly basis.

Limitations

There are several limitations in the membership registration (Membership). The limitations
are:

 Each time the staff wanted to modify, terminate, add new membership or to
view report the have press the back button and go from the membership menu.
There is no direct link from one page to another page.
 There is no online registration for the new member.

55 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Point of Sales (POS)

Assumptions

There are several assumptions in Point of sales. The Assumptions are:

 The function of POS is to have a proper billing and order system to avoid problems
with the customer.
 The outlets can review the sales everyday and monthly by the point of sales report.

Limitations

There are several limitations in the Point of sales. The limitations are:

 Only the bill is printed to the customer not the receipt.

56 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Members Billing

Assumptions

There are several assumptions in the members billing. The assumptions are:

 The function of billing module is to produce and print monthly billing statement,
invoice transaction report and update account receivable database.
 The member and the administrator of the KDE club can able to view and print current
month and previous month statement.
 The administrator can view entire members’ statement list for the current month and
due of payment.

Limitations

There are several limitations in the members billing. The limitations are:

 The billing statement is limited to 12months only. The entire database will be deleting
for the year after the 12month.

57 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Accounts Receivable

Assumptions

There are several assumptions in account receivable. The Assumptions are:

 Staff can search the member invoice by key in the invoice number and also by
member id.
.

Limitations

There are several limitations in the accounts receivable. The limitations are:

 Data could be inaccurate due to typing error.

58 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Inventory Management

Assumptions

There are several assumptions in inventory management. The assumptions:-

 The function is to have an up-to-date detail on the inventory department to avoid


wastages on the raw materials and to have a better detail on the current stocks
available.
 The account department will handle payment when stocks reach the warehouse.

There are several limitations in the Inventory Management. The limitations are:

 Staffs need to know the product code to update the system.

59 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Future Enhancement
At the end of this study, we can say that there are many improvements which need to be
done, because any system is perfect. As future references, we can have:

 Make a version of the system to be online so that, the any personal working on the
hospital can be able everwhere to login into the system and work;
 Differentiation of departments whereby every department will have his own way to
handle his duty;
 Permit connectivity among the department to have a better, fast and secure network in
the hospistal;
 Patient will have the possibility to request for an appointment from their home place;
 Patient will be able to make a payment online through the new version of the system
(online)
 Add on a sms feature to permit to the employees to send message directly to the
phone of the patient with low cost

60 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

User Manual

Figure 1.0 Login screen of the KDE Management System

User ID and password are only generated to those who work in KDE Management System. After the
user key-in their user Id and password. The user must click the login button to login the main menu.

Username: lee password :lee123

Figure 1.1 Successfully Login screen

The above figure will only will appear once the username and password is correct and will enter the
main menu of the KDE Management.

61 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Figure 1.2 Invalid Value Screen

The above figure will only appear when incorrect password and username is been keep-in in the
login screen. User can retry or cancel to enter the menu.

Figure 2.0: Shows main menu of the KDE Management System

This screen can only appear is the username and password is type correctly. Every staff of the club
will have accessibility to the most of features in the system. In this main menu includes membership,
point of sales, members billing. Accounts receivable, inventory management and report.

62 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Figure 2.1 Shows the Files menu.

In the files sub menu it contains two part logout and exit from the system. If the user press logout it
go back to the figure 1.0 or if the user press exit it exits from the entire system.

Figure 2.2 Shows the Membership menu

In the membership menu it contains two part new registration for the new members and
modify/terminate membership for existing customer in KDE Management System.

63 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Figure 3.0 New registration

When the user clicks the new registration from membership menu, the user has to key-in the details
of the new user in the club. Once everything completed the user has to click the register button. If
the user mistakenly key-in. The user can press the button clear to redo the entire registration again.
Once everything is done the user has click the exit button on the top to exit or redo the process.

64 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Figure 3.1 Modify/ Terminate

When the user clicks the modify/terminate from membership menu, the user has to search the
member ID first and then click edit or delete data. Once the data has been edited or deleted the user
has to press the save button in order to save the data in the database. Once everything is done the
user has click the exit button on the top to exit or redo the process.

Figure 4.0 Point of sales

When the user clicks on points of sales there will be only one submenu new order

Figure 4.1 Choose Café

65 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

This screen will only appear once the user clicks the new order from the point of sales. Then the user
will choose one of the café listed.

Figure 4.2

Once the selected café has been choosen the user has press the select café button in order for the
pos screen to appear

Figure 4.3 New order form for Points of sales

The user has key-in the member id and press the search button. Then only all the menu will enable.

66 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Figure 4.4 After selecting all the your menu then user has to press the total price button. User can
also press the remove button if the menu of their choice. It can also be made before the pressing the
total price button. After press the total price button the user has to press save record in order to
save to the database and print button to give the bill to the customer for own their record.

Figure 5.0 Members Billing

In members billing there is one sub menu that is monthly statement. The user have to do the normal
procedure search for Member Id. Once the first name and last name appear the user can print the
current month statement or view current month statement

67 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Figure 5.1 Monthly Statement

This how the monthly statement looks like

Figure 6.0 Accounts receivable- Payment screen

Once the member id has been search the total amount due will be appear that total amount due list
box. The user has key in the amount of payment receive and pay the button get payment.

68 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Figure 7.0 Inventory Management / New Item

In the inventory management user fill up the new item and register the new item that wanted to add
in the club. After they fill up the form the can press the button register to save to the database

Figure 7.1 Inventory Management / Modify

The club can also modify the existing item in the inventory management.

69 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Appendix

Minutes of Meeting

Minutes of meeting 1
Time: 12.00p.m.-1.00 p.m.

Date : 20/11/2010

Location: Apiit (Level 2)

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Details of the meeting

 Discuss question together.


 Discuss of Hierarchy Chart
 Discuss of the screen design

Minutes of meeting 2

70 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Time: 12.00p.m.-1.00 p.m.

Date : 25/11/2010

Location: Apiit (Level 2)

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Progress Report

- Completed Hierarchy charts


- Half way on the Screen Design

Details of the meeting

 Discuss of the Data flow Diagram (DFD)


 Discuss of the mistakes done in the screen design.

71 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Minutes of meeting 3
Time: 12.00p.m.-1.00 p.m.

Date : 2/12/2010

Location: Apiit (Level 2)

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Progress Report

- Completed Data flow Diagram (DFD)


- Completed screen design.

Details of the meeting

 Discuss data dictionary


 Discuss of the mistakes done in the screen design.
 Discuss of the induction of the kelab darul ehsan

72 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Minutes of meeting 4
Time: 12.00p.m.-1.00 p.m.

Date : 9/12/2010

Location: Apiit (Level 2)

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Progress Report

 completed in the screen design.


 completed induction of the kelab darul ehsan

Details of the meeting

 Discuss about the report design


 Discuss about the test plan
 Discuss about the perceived assumption and limitation
 Gantt Chart

73 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Minutes of meeting 5
Time: 8.00p.m.-9.00 p.m.

Date : 13/12/2010

Location: Our Resident’s

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Progress Report

 Completed the report design


 Completed the test plan
 Completed perceived assumption and limitation
 Completed Gantt chart

Remark of the meeting

 The partial documentation is already submitted. Waiting for lecturer to approve.

74 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Minutes of meeting 6
Time: 8.00p.m.-9.00 p.m.

Date : 23/12/2010

Location: Our Resident’s

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Agenda

completed the presentation but the partial documention was rejected by lecturer.
Certain part of the documentation was mising such as the DFD level 0 and
pseudocode.

Details of the meeting

 Discussed of the DFD level 0


 Discussed about pseudo code
 Discussed about all the other minor problem in partial

Remark of the meeting

 Need to redo the partial document again and submit to the lecturer to approve.

75 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Minutes of meeting 7
Time: 12.00p.m.-1.00 p.m.

Date : 30/12/2010

Location: Our Resident’s

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Progress Report

 Completed the DFD level 0 and correction DFD level 1


 Half way on the pseudo code
.

Details of the meeting

 Problem faced in the pseudo code


 Discussed about all the other minor problem in partial

76 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Minutes of meeting 8
Time: 12.00p.m.-1.00 p.m.

Date : 6/01/2010

Location: Our Resident’s

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Progress Report

 Completed pseudo code


 Completed all the minor partial documentation
.

Details of the meeting

 Waiting to get approve from the lecturer to get coding started

Remark

 Submitted on the 11th January and got approve from the lecturer to being coding
on the same day.

77 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Minutes of meeting 9
Time: 12.00p.m.-1.00 p.m.

Date : 13/01/2010

Location: Our Resident’s

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Progress Report

 Got the partial documentation approve from lecturer

Details of the meeting

 Discuss about the membership coding and interface


 Discuss about the POS coding

Remark

 Start the cooding on the particular day itself

78 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Minutes of meeting 10
Time: 12.00p.m.-1.00 p.m.

Date : 20/01/2010

Location: Our Resident’s

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Progress Report

 Complete the membership coding


 Half through coding on point of sale

Details of the meeting

 Discuss about the members billing


 Discuss about the POS coding

79 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Minutes of meeting 12
Time: 12.00p.m.-1.00 p.m.

Date : 27/01/2010

Location: Our Resident’s

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Progress Report

 Complete members billing coding


 Complete POS coding

Details of the meeting

 Discuss about the account receivable coding


 Discuss about Inventory management coding

Minutes of meeting 12

80 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Time: 12.00p.m.-1.00 p.m.

Date : 04/02/2010

Location: Our Resident’s

Attendance: Vargaa Arputhaselan

Suntherreswaran Santhanamoorthi

Prepared by: Vargaa Arputhaselan

Progress Report

 Complete account receivable coding


 Complete inventory management coding

Details of the meeting

 Discuss about the crystal report


 Discuss about full documentation

Remark

 The last meeting of the SDP project

81 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Coding

Login Form

Imports System.Data.OleDb
Public Class Login
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim str As String
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnlogin.Click
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("Select UserID, Password from [User] where
UserID ='" & txtuserid.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()
If dr.HasRows Then
If dr(1) = txtpwd.Text Then
Me.Hide()
MessageBox.Show("Succefully Login", "Successfully Login",
MessageBoxButtons.OK, MessageBoxIcon.Information)
MainMenu.Show()
Else

MessageBox.Show("Invalid Password", "Invalid Value",


MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
End If
Else
MessageBox.Show("Invalid UserID", "Invalid Value",
MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
End If

dr.Close()
cn.Close()
End Sub

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


System.EventArgs) Handles btncancel.Click
Me.Close()

End Sub

End Class

82 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Main Menu

Imports System.Windows.Forms

Public Class MainMenu

Private Sub NewMemberRegistrationToolStripMenuItem_Click(ByVal sender


As System.Object, ByVal e As System.EventArgs) Handles
NewMemberRegistrationToolStripMenuItem.Click

NewRegistration.MdiParent = Me
NewRegistration.Show()
End Sub

Private Sub ModifyTerminateToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ModifyTerminateToolStripMenuItem.Click
MembersDetails.MdiParent = Me
MembersDetails.Show()
End Sub

Private Sub LogoutToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
LogoutToolStripMenuItem.Click

Me.Close()
Login.Show()
End Sub

Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Me.Close()
Login.Show()
End Sub

Private Sub NewOrderToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
NewOrderToolStripMenuItem.Click
ChooseCafe.MdiParent = Me
ChooseCafe.Show()
End Sub

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


System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
Login.Show()
End Sub

Private Sub MonthlyStatementToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
MonthlyStatementToolStripMenuItem.Click
MonthlyStatement.MdiParent = Me
MonthlyStatement.Show()

End Sub

83 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Private Sub AddNewToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
AddNewToolStripMenuItem.Click
NewItem.MdiParent = Me
NewItem.Show()
End Sub

Private Sub ModifyDeleteToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ModifyDeleteToolStripMenuItem.Click
ItemDetails.MdiParent = Me
ItemDetails.Show()
End Sub

Private Sub PaymentToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
PaymentToolStripMenuItem.Click
Payment.MdiParent = Me
Payment.Show()
End Sub
End Class

Membership_New Registration

Imports System.Data.OleDb
Public Class NewRegistration
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim da As New OleDbDataAdapter()
Dim cb As OleDbCommandBuilder
Dim dsMember As New DataSet()

Dim str As String

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


System.EventArgs) Handles btnregister.Click

'Dim icount As Integer


Dim Symbol1 As Integer
Dim Symbol2 As Integer
Dim TestString As String

TestString = txtEmail.Text()
Symbol1 = InStr(TestString, "@")
Symbol2 = InStr(TestString, ".")

If txtAddress.Text = "" Or txtcontact.Text = "" Or txtEmail.Text =


"" Or txtFname.Text = "" Or txtLname.Text = "" Or txtICno.Text = "" Or
txtJoinedDate.Text = "" Or txtMembershipID.Text = "KDE" Or
txtOccupation.Text = "" Then

84 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

MessageBox.Show("Please fill in the required fields", "Error",


MessageBoxButtons.OK, MessageBoxIcon.Error)

ElseIf (Symbol1 <> 0) And (Symbol2 <> 0) Then


Try
cn = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source =
KDEManagementSystem.mdb")
cn.Open()
Catch ex As Exception
MsgBox(ex.Message)
End Try

cmd = New OleDbCommand("Select * from [Member]", cn)


dr = cmd.ExecuteReader
dr.Read()

If dr(0) = txtMembershipID.Text Then


MessageBox.Show("This Member ID is already has been
Registered!!! Please Enter New Member ID with increment of value '1' of
previous Member ID", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error)

Else
str = "INSERT INTO Member([MemberID], [FName], [LName],
[Title], [IC/Passport], [Gender], [DOB], [MaritalStatus], [Occupation],
[Address],[ContactNo], [Email], [JoinedDate]) Values('" &
txtMembershipID.Text & "', '" & txtFname.Text & "', '" & txtLname.Text &
"', '" & cbTitle.Text & "', '" & txtICno.Text & "', '" & cbGender.Text &
"', '" & DateTimePicker1.Text & "', '" & cbMaritalStatus.Text & "', '" &
txtOccupation.Text & "', '" & txtAddress.Text & "', '" & txtcontact.Text &
"', '" & txtEmail.Text & "', '" & txtJoinedDate.Text & "')"

cmd = New OleDbCommand(str, cn)


cmd.ExecuteNonQuery()

MessageBox.Show("Registered is Save Succefully", "Done",


MessageBoxButtons.OK, MessageBoxIcon.Information)

cn.Close()
Me.Close()
End If

Else
MessageBox.Show("Please enter a valid e-mail address", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End If

End Sub

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


As System.EventArgs) Handles MyBase.Load

85 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Dim MemID(6), add(6) As String

Dim jd As Date

jd = Now.Date
txtJoinedDate.Text = jd

txtJoinedDate.Enabled = False

'MemID(0) = "K"
'MemID(1) = "D"
'MemID(2) = "E"
'MemID(3) = "0"
'MemID(4) = "0"
'MemID(5) = "0"
'MemID(6) = "0"

cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("Select MemberID from Member", cn)
dr = cmd.ExecuteReader
dr.Read()

Dim qryMem As String = "Select MemberID from Member"


da.SelectCommand = New OleDbCommand(qryMem, cn)
cb = New OleDbCommandBuilder(da)

'Dim cb As OleDbCommandBuilder = New OleDbCommandBuilder(da)

da.Fill(dsMember, "Member")
Dim dt As DataTable = dsMember.Tables("Member")

If dr.HasRows Then

add(6) = dt.Rows(dt.Rows.Count - 1)("MemberID")

lblLastMemID.Text = add(6)

Else

'MemID(3) = "0"
'MemID(4) = "0"
'MemID(5) = "0"
'MemID(6) = "1"

'txtMembershipID.Text = MemID(3) & MemID(4) & MemID(5) &


MemID(6)

txtMembershipID.Text = "0001"

86 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

End If
End Sub

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


System.EventArgs) Handles btnClear.Click
txtAddress.Clear()
txtcontact.Clear()
txtEmail.Clear()
txtFname.Clear()
txtICno.Clear()
txtJoinedDate.Clear()
txtLname.Clear()
txtMembershipID.Clear()
txtOccupation.Clear()
txtMembershipID.Focus()
End Sub

End Class

Membership_Modify/Terminate

Imports System.Data.OleDb
Public Class MembersDetails
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim str As String
Private Sub MembersDetais_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load

txtFname.Enabled = False
txtICno.Enabled = False
txtLname.Enabled = False
txtMembershipID.Enabled = False
cbGender.Enabled = False
DateTimePicker1.Enabled = False

txtcontact.Enabled = False
txtAddress.Enabled = False
txtEmail.Enabled = False
txtOccupation.Enabled = False
cbMaritalStatus.Enabled = False
cbTitle.Enabled = False

btndelete.Enabled = False
btnedit.Enabled = False
btnsave.Enabled = False

lblAdd.Hide()
lblEmail.Hide()
lblNo.Hide()
lblOcc.Hide()

End Sub

87 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

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


System.EventArgs) Handles btnsearch.Click

txtAddress.Clear()
txtcontact.Clear()
txtEmail.Clear()
txtFname.Clear()
txtICno.Clear()
txtLname.Clear()
txtMembershipID.Clear()
txtOccupation.Clear()

If txtsearch.Text = "KDE" Then


MessageBox.Show("You haven't enter any Member ID. Please enter
a Member ID to Search Box.", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error)

Else
cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0;
Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [Member]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader

While dr.Read()
If dr(0) = txtsearch.Text Then

txtMembershipID.Text = dr(0)
txtFname.Text = dr(1)
txtLname.Text = dr(2)
cbTitle.Text = dr(3)
txtICno.Text = dr(4)
cbGender.Text = dr(5)
DateTimePicker1.Text = dr(6)
cbMaritalStatus.Text = dr(7)
txtOccupation.Text = dr(8)
txtAddress.Text = dr(9)
txtcontact.Text = dr(10)
txtEmail.Text = dr(11)

End If

End While

If txtMembershipID.Text = "KDE" Then


MessageBox.Show("The Member ID is not found in Database.
Please check the Member ID again.", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error)
Else
btnedit.Enabled = True

88 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

btndelete.Enabled = True

End If

End If

End Sub

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


System.EventArgs) Handles btnedit.Click
lblAdd.Show()
lblEmail.Show()
lblNo.Show()
lblOcc.Show()

txtcontact.Enabled = True
txtAddress.Enabled = True
txtEmail.Enabled = True
txtOccupation.Enabled = True
txtICno.Enabled = True
cbMaritalStatus.Enabled = True
cbTitle.Enabled = True

btnsave.Enabled = True
btnedit.Enabled = False
btndelete.Enabled = False
End Sub

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


System.EventArgs) Handles btnsave.Click

cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0; Data


Source = KDEManagementSystem.mdb")
cn.Open()

str = "Update Member SET [Title] = '" & cbTitle.Text & "',
[IC/Passport] = '" & txtICno.Text & "', [Gender] = '" & cbGender.Text & "',
[DOB] = '" & DateTimePicker1.Text & "', [MaritalStatus] = '" &
cbMaritalStatus.Text & "', [Occupation] = '" & txtOccupation.Text & "',
Address = '" & txtAddress.Text & "', [ContactNo] = '" & txtcontact.Text &
"', [Email] = '" & txtEmail.Text & "'where MemberID = '" &
txtMembershipID.Text & "'"

cmd = New OleDbCommand(str, cn)


cmd.ExecuteNonQuery()

MessageBox.Show("Changes had been Saved Succefully", "Done",


MessageBoxButtons.OK, MessageBoxIcon.Information)

cn.Close()

txtFname.Enabled = False
txtICno.Enabled = False
txtLname.Enabled = False
txtMembershipID.Enabled = False
cbGender.Enabled = False

89 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

DateTimePicker1.Enabled = False

txtcontact.Enabled = False
txtAddress.Enabled = False
txtEmail.Enabled = False
txtOccupation.Enabled = False
cbMaritalStatus.Enabled = False
cbTitle.Enabled = False

btndelete.Enabled = False
btnedit.Enabled = False
btnsave.Enabled = False

lblAdd.Hide()
lblEmail.Hide()
lblNo.Hide()
lblOcc.Hide()

txtAddress.Clear()
txtcontact.Clear()
txtEmail.Clear()
txtFname.Clear()
txtICno.Clear()
txtLname.Clear()
txtMembershipID.Clear()
txtOccupation.Clear()
txtsearch.Clear()

txtsearch.Focus()
End Sub

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


System.EventArgs) Handles btndelete.Click

If txtMembershipID.Text = "" And txtEmail.Text = "" Then


MessageBox.Show("Please insert a Member ID or get info before
delete!", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ElseIf MessageBox.Show("Are you sure want to delet this record?",
"ARE YOU SURE?", MessageBoxButtons.OKCancel, MessageBoxIcon.Stop) =
Windows.Forms.DialogResult.Cancel Then
Me.Show()
Else
cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0;
Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "delete from Member where [MemberID] = '" &
txtMembershipID.Text & "'"
cmd = New OleDbCommand(str, cn)
cmd.ExecuteNonQuery()

lblAdd.Hide()
lblEmail.Hide()
lblNo.Hide()
lblOcc.Hide()

90 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

txtAddress.Clear()
txtcontact.Clear()
txtEmail.Clear()
txtFname.Clear()
txtICno.Clear()
txtLname.Clear()
txtMembershipID.Clear()
txtOccupation.Clear()

txtsearch.Clear()
txtsearch.Focus()

MessageBox.Show("Record Successfully Deleted", "DONE",


MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
End Class

Point of Sales_New Order_Choose Café

Public Class ChooseCafe

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


System.EventArgs) Handles Button1.Click
If cbChooseCafe.SelectedItem = "" Then
MessageBox.Show("Please Select A Cafe Before You Take Order.
Thank You.", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
If cbChooseCafe.SelectedItem = "Malaysian Cafe" Then
NewOrder_MCafe.MdiParent = MainMenu
NewOrder_MCafe.Show()
Me.Close()
Else
NewOrder_WCafe.MdiParent = MainMenu
NewOrder_WCafe.Show()
Me.Close()
End If
End If

End Sub
End Class

91 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Point of Sales_New Order_Malaysian Café

Imports System.Data.OleDb
Public Class NewOrder_MCafe
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim da As New OleDbDataAdapter()
Dim cb As OleDbCommandBuilder
Dim dsPos As New DataSet()
Dim str, mon, add As String
Dim Sum As Decimal = 0
Dim d As Date = Now.Date
Dim t As DateTime = DateTime.Now.ToLongTimeString()

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


As System.EventArgs) Handles MyBase.Load
lbCafeName.Text = ChooseCafe.cbChooseCafe.Text

cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("Select BillNo from POS", cn)
dr = cmd.ExecuteReader
dr.Read()

Dim qryMem As String = "Select BillNo from POS"


da.SelectCommand = New OleDbCommand(qryMem, cn)
cb = New OleDbCommandBuilder(da)

'Dim cb As OleDbCommandBuilder = New OleDbCommandBuilder(da)

da.Fill(dsPos, "POS")
Dim dt As DataTable = dsPos.Tables("POS")

If dr.HasRows Then
add = dt.Rows(dt.Rows.Count - 1)("BillNo")
lblBillNo.Text = add + 1
Else
lblBillNo.Text = "1"
End If

mon = Month(Now).ToString

If mon = 1 Then
mon = "January"
ElseIf mon = 2 Then
mon = "February"
ElseIf mon = 3 Then
mon = "March"
ElseIf mon = 4 Then
mon = "April"

92 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

ElseIf mon = 5 Then


mon = "May"
ElseIf mon = 6 Then
mon = "Jun"
ElseIf mon = 7 Then
mon = "July"
ElseIf mon = 8 Then
mon = "August"
ElseIf mon = 9 Then
mon = "September"
ElseIf mon = 10 Then
mon = "October"
ElseIf mon = 11 Then
mon = "November"
ElseIf mon = 12 Then
mon = "December"
End If

Mfoodprice()
DrinksPrice()

btnAddDrink.Enabled = False
btnAddFood.Enabled = False
btnPrint.Enabled = False
btnRemove.Enabled = False
btnTotalPrice.Enabled = False
btnPrint.Enabled = False
btnSaveRec.Enabled = False

txtFname.Enabled = False
txtdate.Enabled = False

tabctrlMenu.Enabled = False
End Sub

Sub Mfoodprice()
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods
where FoodName = '" & rbtnAyamPenyet.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblAyam.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnBakKutTeh.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblBak.Text = dr(1)

93 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnBananaLeafRice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblBanana.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnBeeHoon.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblBee.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnCharKueyTeow.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblKueyTeow.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnHainaneseChickenRice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblHChickenRice.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnKuehChap.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblKuehChap.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnLaksa.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblLaksa.Text = dr(1)
End If

94 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnMeeRebus.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblMeeRebus.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnNasiLemak.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblNasiLemak.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnRotiCanai.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblRotiCanai.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnNasiBriyani.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblNasiBriyani.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnCurryMee.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblCurryMee.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnHokkienMee.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblHokkienMee.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnWontonMee.Text & "'", cn)
dr = cmd.ExecuteReader

95 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

dr.Read()

If dr.HasRows Then
lblWontonMee.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnClaypotChickenRice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblCChickenRice.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnSagoGulaMelaka.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSagoGulaMelaka.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnCendol.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblCendol.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnAisKacang.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblAisKacang.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, FoodPrice from MCafeFoods


where FoodName = '" & rbtnBuburChaCha.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblBuburChaCha.Text = dr(1)
End If

dr.Close()
cn.Close()
End Sub

Sub DrinksPrice()

96 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks
where DrinkName = '" & rbtnMilo.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblMilo.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnTea.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblTea.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnLemonTea.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblLemonTea.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnSirap.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSirap.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnBandung.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblBandung.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnSoyaBean.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSoyaBean.Text = dr(1)
End If

97 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnSoftDrinks.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSoftDrinks.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnMangoJuice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblMangoJuice.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnOrangeJuice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblOrangeJuice.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnAppleJuice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblAppleJuice.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnWatermelonJuice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblWatermelonJuice.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnLimeJuice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblCoffee.Text = dr(1)
End If

dr.Close()
cn.Close()

98 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

End Sub

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


System.EventArgs) Handles btnAddFood.Click

'MFOODS PRICE ADD


If MalaysianFoods.Enabled = True Then
If rbtnAyamPenyet.Checked = False And rbtnBakKutTeh.Checked =
False And rbtnBananaLeafRice.Checked = False And rbtnBeeHoon.Checked =
False And rbtnCharKueyTeow.Checked = False And
rbtnHainaneseChickenRice.Checked = False And rbtnKuehChap.Checked = False
And rbtnLaksa.Checked = False And rbtnMeeRebus.Checked = False And
rbtnNasiLemak.Checked = False And rbtnRotiCanai.Checked = False And
rbtnNasiBriyani.Checked = False And rbtnCurryMee.Checked = False And
rbtnHokkienMee.Checked = False And rbtnWontonMee.Checked = False And
rbtnWontonMee.Checked = False And rbtnClaypotChickenRice.Checked = False
And rbtnSagoGulaMelaka.Checked = False And rbtnCendol.Checked = False And
rbtnAisKacang.Checked = False And rbtnBuburChaCha.Checked = False Then
MessageBox.Show("Please Select a Food.", "ERROR",
MessageBoxButtons.OK, MessageBoxIcon.Error)

Else
If rbtnAyamPenyet.Checked = True Then
ListBox1.Items.Add(rbtnAyamPenyet.Text & vbTab & vbTab
& vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblAyam.Text *
NumericUpDown1.Text))

Sum = Sum + (lblAyam.Text * NumericUpDown1.Text)


rbtnAyamPenyet.Checked = False
End If

If rbtnBakKutTeh.Checked = True Then


ListBox1.Items.Add(rbtnBakKutTeh.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblBak.Text *
NumericUpDown1.Text))
Sum = Sum + (lblBak.Text * NumericUpDown1.Text)
rbtnBakKutTeh.Checked = False
End If

If rbtnBananaLeafRice.Checked = True Then


ListBox1.Items.Add(rbtnBananaLeafRice.Text & vbTab &
vbTab & vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " &
(lblBanana.Text * NumericUpDown1.Text))
Sum = Sum + (lblBanana.Text * NumericUpDown1.Text)
rbtnBananaLeafRice.Checked = False
End If

If rbtnBeeHoon.Checked = True Then


ListBox1.Items.Add(rbtnBeeHoon.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblBee.Text *
NumericUpDown1.Text))
Sum = Sum + (lblBee.Text * NumericUpDown1.Text)
rbtnBeeHoon.Checked = False
End If

99 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

If rbtnCharKueyTeow.Checked = True Then


ListBox1.Items.Add(rbtnCharKueyTeow.Text & vbTab &
vbTab & vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " &
(lblKueyTeow.Text * NumericUpDown1.Text))
Sum = Sum + (lblKueyTeow.Text * NumericUpDown1.Text)
rbtnCharKueyTeow.Checked = False
End If

If rbtnHainaneseChickenRice.Checked = True Then


ListBox1.Items.Add(rbtnHainaneseChickenRice.Text &
vbTab & vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " &
(lblHChickenRice.Text * NumericUpDown1.Text))
Sum = Sum + (lblHChickenRice.Text *
NumericUpDown1.Text)
rbtnHainaneseChickenRice.Checked = False
End If

If rbtnKuehChap.Checked = True Then


ListBox1.Items.Add(rbtnKuehChap.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblKuehChap.Text *
NumericUpDown1.Text))
Sum = Sum + (lblKuehChap.Text * NumericUpDown1.Text)
rbtnKuehChap.Checked = False
End If

If rbtnLaksa.Checked = True Then


ListBox1.Items.Add(rbtnLaksa.Text & vbTab & vbTab &
vbTab & vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " &
(lblLaksa.Text * NumericUpDown1.Text))
Sum = Sum + (lblLaksa.Text * NumericUpDown1.TextAlign)
rbtnLaksa.Checked = False
End If

If rbtnMeeRebus.Checked = True Then


ListBox1.Items.Add(rbtnMeeRebus.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & lblMeeRebus.Text *
NumericUpDown1.Text)
Sum = Sum + lblMeeRebus.Text * NumericUpDown1.Text
rbtnMeeRebus.Checked = False
End If

If rbtnNasiLemak.Checked = True Then


ListBox1.Items.Add(rbtnNasiLemak.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & lblNasiLemak.Text *
NumericUpDown1.Text)
Sum = Sum + lblNasiLemak.Text * NumericUpDown1.Text
rbtnNasiLemak.Checked = False
End If

If rbtnRotiCanai.Checked = True Then

100 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

ListBox1.Items.Add(rbtnRotiCanai.Text & vbTab & vbTab &


vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & lblRotiCanai.Text *
NumericUpDown1.Text)
Sum = Sum + lblRotiCanai.Text * NumericUpDown1.Text
rbtnRotiCanai.Checked = False
End If

If rbtnNasiBriyani.Checked = True Then


If rbtnRendangAyam.Checked = False And
rbtnRendangDaging.Checked = False And rbtnRendangKambing.Checked = False
Then
MessageBox.Show("Please Select the Rendang",
"ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error)
ElseIf rbtnRendangAyam.Checked = True Then
ListBox1.Items.Add(rbtnNasiBriyani.Text & " + " &
rbtnRendangAyam.Text & vbTab & vbTab & NumericUpDown1.Text & vbTab & vbTab
& "RM " & lblNasiBriyani.Text * NumericUpDown1.Text)
Sum = Sum + lblNasiBriyani.Text *
NumericUpDown1.Text
rbtnRendangAyam.Checked = False
ElseIf rbtnRendangKambing.Checked = True Then
ListBox1.Items.Add(rbtnNasiBriyani.Text & " + " &
rbtnRendangKambing.Text & vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM
" & lblNasiBriyani.Text * NumericUpDown1.Text)
Sum = Sum + lblNasiBriyani.Text *
NumericUpDown1.Text
rbtnRendangKambing.Checked = False
Else
ListBox1.Items.Add(rbtnNasiBriyani.Text & " + " &
rbtnRendangDaging.Text & vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM
" & lblNasiBriyani.Text * NumericUpDown1.Text)
Sum = Sum + lblNasiBriyani.Text *
NumericUpDown1.Text
rbtnRendangDaging.Checked = False
End If
rbtnNasiBriyani.Checked = False

End If

If rbtnCurryMee.Checked = True Then


ListBox1.Items.Add(rbtnCurryMee.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & lblCurryMee.Text *
NumericUpDown1.Text)
Sum = Sum + lblCurryMee.Text * NumericUpDown1.Text
rbtnCurryMee.Checked = False
End If

If rbtnHokkienMee.Checked = True Then


ListBox1.Items.Add(rbtnHokkienMee.Text & vbTab & vbTab
& vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & lblHokkienMee.Text
* NumericUpDown1.Text)
Sum = Sum + lblHokkienMee.Text * NumericUpDown1.Text
rbtnHokkienMee.Checked = False
End If

If rbtnWontonMee.Checked = True Then

101 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

ListBox1.Items.Add(rbtnWontonMee.Text & vbTab & vbTab &


vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & lblWontonMee.Text *
NumericUpDown1.Text)
Sum = Sum + lblWontonMee.Text * NumericUpDown1.Text
rbtnWontonMee.Checked = False
End If

If rbtnClaypotChickenRice.Checked = True Then


ListBox1.Items.Add(rbtnClaypotChickenRice.Text & vbTab
& vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " &
lblCChickenRice.Text * NumericUpDown1.Text)
Sum = Sum + lblCChickenRice.Text * NumericUpDown1.Text
rbtnClaypotChickenRice.Checked = False
End If

If rbtnSagoGulaMelaka.Checked = True Then


ListBox1.Items.Add(rbtnSagoGulaMelaka.Text & vbTab &
vbTab & vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " &
lblSagoGulaMelaka.Text * NumericUpDown1.Text)
Sum = Sum + lblSagoGulaMelaka.Text *
NumericUpDown1.Text
rbtnSagoGulaMelaka.Checked = False
End If

If rbtnCendol.Checked = True Then


ListBox1.Items.Add(rbtnCendol.Text & vbTab & vbTab &
vbTab & vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " &
lblCendol.Text * NumericUpDown1.Text)
Sum = Sum + lblCendol.Text * NumericUpDown1.Text
rbtnCendol.Checked = False
End If

If rbtnAisKacang.Checked = True Then


ListBox1.Items.Add(rbtnAisKacang.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & lblAisKacang.Text *
NumericUpDown1.Text)
Sum = Sum + lblAisKacang.Text * NumericUpDown1.Text
rbtnAisKacang.Checked = False
End If

If rbtnBuburChaCha.Checked = True Then


ListBox1.Items.Add(rbtnBuburChaCha.Text & vbTab & vbTab
& vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & lblBuburChaCha.Text
* NumericUpDown1.Text)
Sum = Sum + lblBuburChaCha.Text * NumericUpDown1.Text
rbtnBuburChaCha.Checked = False
End If
End If
End If

End Sub

102 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

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


System.EventArgs) Handles btnTotalPrice.Click
If MessageBox.Show("Are You sure want total the price?", "CONFIRM",
MessageBoxButtons.OKCancel, MessageBoxIcon.Question) =
Windows.Forms.DialogResult.Cancel Then

Else
ListBox1.Items.Add("")
ListBox1.Items.Add("")
ListBox1.Items.Add("-------------------------------------------
---------------------------------------------------------------------------
--")
ListBox1.Items.Add(vbTab & vbTab & vbTab & vbTab & "Total:" &
vbTab & vbTab & "RM " & Sum)
ListBox1.Items.Add("-------------------------------------------
---------------------------------------------------------------------------
--")
btnRemove.Enabled = False
tabctrlMenu.Enabled = False
btnTotalPrice.Enabled = False
btnSaveRec.Enabled = True
End If

End Sub

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


System.EventArgs) Handles btnPrint.Click
Bill.Show()

If MessageBox.Show("Are You Sure Want to Print the Bill", "SURE",


MessageBoxButtons.OKCancel, MessageBoxIcon.Question) =
Windows.Forms.DialogResult.OK Then

Bill.PrintForm1.Print()
End If

Bill.Close()

End Sub

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


System.EventArgs) Handles btnRemove.Click

If ListBox1.SelectedItem = "" Then


MessageBox.Show("Please Select a item to remove. Thank You",
"SELECT A ITEM", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf ListBox1.SelectedIndex <= 13 Then
MessageBox.Show("You Can Remove Header!!", "ERROR",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
End If

End Sub

103 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

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


System.EventArgs) Handles btnAddDrink.Click
'DRINK PRICE

If Drinks.Enabled = True Then


If rbtnMilo.Checked = False And rbtnTea.Checked = False And
rbtnLemonTea.Checked = False And rbtnSirap.Checked = False And
rbtnBandung.Checked = False And rbtnSoyaBean.Checked = False And
rbtnSoftDrinks.Checked = False And rbtnMangoJuice.Checked = False And
rbtnOrangeJuice.Checked = False And rbtnAppleJuice.Checked = False And
rbtnWatermelonJuice.Checked = False And rbtnLimeJuice.Checked = False And
rbtnMineralWater.Checked = False And rbtnCoffee.Checked = False Then
MessageBox.Show("Please Select a Drink", "ERROR",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
btnAddDrink.Enabled = True

If rbtnMilo.Checked = True Then


ListBox1.Items.Add(rbtnMilo.Text & vbTab & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblMilo.Text
* NumericUpDown2.Text)
Sum = Sum + lblMilo.Text * NumericUpDown2.Text
rbtnMilo.Checked = False
End If

If rbtnTea.Checked = True Then


ListBox1.Items.Add(rbtnTea.Text & vbTab & vbTab & vbTab
& vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblTea.Text *
NumericUpDown2.Text)
Sum = Sum + lblTea.Text * NumericUpDown2.Text
rbtnTea.Checked = False
End If

If rbtnLemonTea.Checked = True Then


ListBox1.Items.Add(rbtnLemonTea.Text & vbTab & vbTab &
vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblLemonTea.Text *
NumericUpDown2.Text)
Sum = Sum + lblLemonTea.Text * NumericUpDown2.Text
rbtnLemonTea.Checked = False
End If

If rbtnSirap.Checked = True Then


ListBox1.Items.Add(rbtnSirap.Text & vbTab & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblSirap.Text
* NumericUpDown2.Text)
Sum = Sum + lblSirap.Text * NumericUpDown2.Text
rbtnSirap.Checked = False
End If

If rbtnBandung.Checked = True Then


ListBox1.Items.Add(rbtnBandung.Text & vbTab & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " &
lblBandung.Text * NumericUpDown2.Text)
Sum = Sum + lblBandung.Text * NumericUpDown2.Text
rbtnBandung.Checked = False
End If

104 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

If rbtnSoyaBean.Checked = True Then


ListBox1.Items.Add(rbtnSoyaBean.Text & vbTab & vbTab &
vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblSoyaBean.Text *
NumericUpDown2.Text)
Sum = Sum + lblSoyaBean.Text * NumericUpDown2.Text
rbtnSoyaBean.Checked = False
End If

If rbtnSoftDrinks.Checked = True Then


If rbtnPepsi.Checked = False And rbtnSarsi.Checked =
False And rbtnCocaCola.Checked = False And rbtnMountDew.Checked = False
Then
MessageBox.Show("Please Select the Soft Drinks",
"ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error)
ElseIf rbtnPepsi.Checked = True Then
ListBox1.Items.Add(rbtnSoftDrinks.Text & "(" &
rbtnPepsi.Text & ")" & vbTab & vbTab & vbTab & NumericUpDown2.Text & vbTab
& vbTab & "RM " & lblSoftDrinks.Text * NumericUpDown2.Text)
Sum = Sum + lblSoftDrinks.Text *
NumericUpDown2.Text
rbtnPepsi.Checked = False
ElseIf rbtnSarsi.Checked = True Then
ListBox1.Items.Add(rbtnSoftDrinks.Text & "(" &
rbtnSarsi.Text & ")" & vbTab & vbTab & vbTab & NumericUpDown2.Text & vbTab
& vbTab & "RM " & lblSoftDrinks.Text * NumericUpDown2.Text)
Sum = Sum + lblSoftDrinks.Text *
NumericUpDown2.Text
rbtnSarsi.Checked = False
ElseIf rbtnCocaCola.Checked = False Then
ListBox1.Items.Add(rbtnSoftDrinks.Text & "(" &
rbtnCocaCola.Text & ")" & vbTab & vbTab & NumericUpDown2.Text & vbTab &
vbTab & "RM " & lblSoftDrinks.Text * NumericUpDown2.Text)
Sum = Sum + lblSoftDrinks.Text *
NumericUpDown2.Text
rbtnCocaCola.Checked = False
Else
ListBox1.Items.Add(rbtnSoftDrinks.Text & "(" &
rbtnMountDew.Text & ")" & vbTab & vbTab & NumericUpDown2.Text & vbTab &
vbTab & "RM " & lblSoftDrinks.Text * NumericUpDown2.Text)
Sum = Sum + lblSoftDrinks.Text *
NumericUpDown2.Text
rbtnMountDew.Checked = False
End If
rbtnSoftDrinks.Checked = False
rbtnCocaCola.Checked = False
rbtnMountDew.Checked = False
End If

If rbtnMangoJuice.Checked = True Then


ListBox1.Items.Add(rbtnMangoJuice.Text & vbTab & vbTab
& vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblMangoJuice.Text
* NumericUpDown2.Text)
Sum = Sum + lblMangoJuice.Text * NumericUpDown2.Text
rbtnMangoJuice.Checked = False
End If

105 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

If rbtnOrangeJuice.Checked = True Then


ListBox1.Items.Add(rbtnOrangeJuice.Text & vbTab & vbTab
& vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblOrangeJuice.Text
* NumericUpDown2.Text)
Sum = Sum + lblOrangeJuice.Text * NumericUpDown2.Text
rbtnOrangeJuice.Checked = False
End If

If rbtnAppleJuice.Checked = True Then


ListBox1.Items.Add(rbtnAppleJuice.Text & vbTab & vbTab
& vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblAppleJuice.Text
* NumericUpDown2.Text)
Sum = Sum + lblAppleJuice.Text * NumericUpDown2.Text
rbtnAppleJuice.Checked = False
End If

If rbtnWatermelonJuice.Checked = True Then


ListBox1.Items.Add(rbtnWatermelonJuice.Text & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " &
lblWatermelonJuice.Text * NumericUpDown2.Text)
Sum = Sum + lblWatermelonJuice.Text *
NumericUpDown2.Text
rbtnWatermelonJuice.Checked = False
End If

If rbtnLimeJuice.Checked = True Then


ListBox1.Items.Add(rbtnLimeJuice.Text & vbTab & vbTab &
vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblLimeJuice.Text *
NumericUpDown2.Text)
Sum = Sum + lblLimeJuice.Text * NumericUpDown2.Text
rbtnLimeJuice.Checked = False
End If

If rbtnMineralWater.Checked = True Then


ListBox1.Items.Add(rbtnMineralWater.Text & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " &
lblMineralWater.Text * NumericUpDown2.Text)
Sum = Sum + lblMineralWater.Text * NumericUpDown2.Text
rbtnMineralWater.Checked = False
End If

If rbtnCoffee.Checked = True Then


ListBox1.Items.Add(rbtnCoffee.Text & vbTab & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " &
lblCoffee.Text * NumericUpDown2.Text)
Sum = Sum + lblCoffee.Text * NumericUpDown2.Text
rbtnCoffee.Checked = False
End If
End If
End If

End Sub

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


System.EventArgs) Handles btnsearch.Click

106 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Dim name, id As String

If txtsearch.Text = "KDE" Then


MessageBox.Show("You haven't enter any Member ID. Please enter
a Member ID to Search.", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error)

Else
cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0;
Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [Member]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader

While dr.Read()
If dr(0) = txtsearch.Text Then

txtFname.Text = dr(1)

End If
End While

id = txtsearch.Text
name = txtFname.Text

If txtFname.Text = "" Then


MessageBox.Show("Invalid MemberID", "ERROR",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
txtdate.Text = d

btnAddDrink.Enabled = True
btnAddFood.Enabled = True

btnRemove.Enabled = True
btnTotalPrice.Enabled = True

tabctrlMenu.Enabled = True

ListBox1.Items.Add(" ...:::Kelab Darul


Ehsan:::... ")
ListBox1.Items.Add(" --=|Malaysian Cafe|=--
")
ListBox1.Items.Add("")
ListBox1.Items.Add("Date: " & d)
ListBox1.Items.Add("Time: " & t)
ListBox1.Items.Add("")
ListBox1.Items.Add("Member ID: " & id)
ListBox1.Items.Add("Member Name: " & name)
ListBox1.Items.Add("")
ListBox1.Items.Add("---------------------------------------
---------------------------------------------------------------------------
------")
ListBox1.Items.Add("Items" & vbTab & vbTab & vbTab & vbTab
& "Amount" & vbTab & vbTab & "Price")

107 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

ListBox1.Items.Add("---------------------------------------
---------------------------------------------------------------------------
------")
ListBox1.Items.Add("---------------------------------------
---------------------------------------------------------------------------
------")
ListBox1.Items.Add("")

btnsearch.Enabled = False

End If
End If
End Sub

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


System.EventArgs) Handles btnSaveRec.Click

Dim i, c As Integer

For i = 14 To ListBox1.Items.Count - 6

cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0;


Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [POS]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader
dr.Read()

str = "INSERT INTO POS([BillNo],[MemberID],[OrderedMenu],


[Date], [TotalPrice], [Month]) values ('" & lblBillNo.Text & "', '" &
txtsearch.Text & "', '" & ListBox1.Items.Item(i) & "', '" & txtdate.Text &
"', '" & Sum & "', '" & mon & "')"

cmd = New OleDbCommand(str, cn)


cmd.ExecuteNonQuery()

Next

MessageBox.Show("Registered is Save Succefully", "Done",


MessageBoxButtons.OK, MessageBoxIcon.Information)

cn.Close()
btnSaveRec.Enabled = False

btnPrint.Enabled = True
End Sub
End Class

108 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Point of Sales_New Order_Western Café

Imports System.Data.OleDb
Public Class NewOrder_WCafe
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim da As New OleDbDataAdapter()
Dim cb As OleDbCommandBuilder
Dim dsPos As New DataSet()
Dim str As String
Dim Sum As Decimal = 0
Dim d As Date = Now.Date
Dim t As DateTime = DateTime.Now.ToLongTimeString()

Dim mon As String

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


System.EventArgs) Handles MyBase.Load
Dim add As Integer
lbCafeName.Text = ChooseCafe.cbChooseCafe.Text

cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("Select BillNo from POS", cn)
dr = cmd.ExecuteReader
dr.Read()

Dim qryMem As String = "Select BillNo from POS"


da.SelectCommand = New OleDbCommand(qryMem, cn)
cb = New OleDbCommandBuilder(da)

'Dim cb As OleDbCommandBuilder = New OleDbCommandBuilder(da)

da.Fill(dsPos, "POS")
Dim dt As DataTable = dsPos.Tables("POS")

If dr.HasRows Then
add = dt.Rows(dt.Rows.Count - 1)("BillNo")
lblBillNo.Text = add + 1
Else
lblBillNo.Text = "1"
End If

mon = Month(Now).ToString

If mon = 1 Then
mon = "January"
ElseIf mon = 2 Then
mon = "February"
ElseIf mon = 3 Then

109 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

mon = "March"
ElseIf mon = 4 Then
mon = "April"
ElseIf mon = 5 Then
mon = "May"
ElseIf mon = 6 Then
mon = "Jun"
ElseIf mon = 7 Then
mon = "July"
ElseIf mon = 8 Then
mon = "August"
ElseIf mon = 9 Then
mon = "September"
ElseIf mon = 10 Then
mon = "October"
ElseIf mon = 11 Then
mon = "November"
ElseIf mon = 12 Then
mon = "December"
End If

DrinksPrice()
WFoodPrice()

btnAddDrink.Enabled = False
btnAddFood.Enabled = False
btnPrint.Enabled = False
btnRemove.Enabled = False
btnTotalPrice.Enabled = False
btnSaveRec.Enabled = False
btnPrint.Enabled = False

txtFname.Enabled = False
txtdate.Enabled = False

tabctrlMenu.Enabled = False
End Sub

Sub DrinksPrice()
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks
where DrinkName = '" & rbtnMilo.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblMilo.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnTea.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

110 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

If dr.HasRows Then
lblTea.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnLemonTea.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblLemonTea.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnSirap.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSirap.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnBandung.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblBandung.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnSoyaBean.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSoyaBean.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnSoftDrinks.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSoftDrinks.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnMangoJuice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblMangoJuice.Text = dr(1)

111 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnOrangeJuice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblOrangeJuice.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnAppleJuice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblAppleJuice.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnWatermelonJuice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblWatermelonJuice.Text = dr(1)
End If

cmd = New OleDbCommand("Select DrinkName, [Price] from CafeDrinks


where DrinkName = '" & rbtnLimeJuice.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblCoffee.Text = dr(1)
End If

dr.Close()
cn.Close()

End Sub

Sub WFoodPrice()

cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods
where FoodName = '" & rbtnSteak.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSteakKidneyPudding.Text = dr(1)
End If

112 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnMorrocanMeatballs.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblMorrocan.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnSweetChilliNoodles.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSweetChilliNoodles.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnSpaghettiBolognese.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSpaghetti.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnLasagne.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblLasange.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnSausage.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblSausage.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnCarbonaraPasta.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblCarbonara.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnFishandChips.Text & "'", cn)

113 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblFishChips.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnChickenCaesarSalad.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblChickenCaesarSalad.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnChickenChop.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblChickenChop.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnLambChop.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblLampChop.Text = dr(1)
End If

cmd = New OleDbCommand("Select FoodName, [Price] from WCafeFoods


where FoodName = '" & rbtnFrenchFries.Text & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
lblFrenchFries.Text = dr(1)
End If

dr.Close()
cn.Close()
End Sub

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


System.EventArgs) Handles btnAddFood.Click
'WFOOD PRICE
If rbtnSteak.Checked = False And rbtnMorrocanMeatballs.Checked =
False And rbtnSweetChilliNoodles.Checked = False And
rbtnSpaghettiBolognese.Checked = False And rbtnLasagne.Checked = False And
rbtnSausage.Checked = False And rbtnCarbonaraPasta.Checked = False And
rbtnFishandChips.Checked = False And rbtnChickenCaesarSalad.Checked = False

114 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

And rbtnChickenChop.Checked = False And rbtnLambChop.Checked = False And


rbtnFrenchFries.Checked = False Then
MessageBox.Show("Please Select a Food.", "ERROR",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
If rbtnSteak.Checked = True Then
ListBox1.Items.Add(rbtnSteak.Text & vbTab & vbTab &
NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblSteakKidneyPudding.Text *
NumericUpDown1.Text))
Sum = Sum + (lblSteakKidneyPudding.Text *
NumericUpDown1.Text)
rbtnSteak.Checked = False
End If

If rbtnMorrocanMeatballs.Checked = True Then


ListBox1.Items.Add(rbtnMorrocanMeatballs.Text & vbTab &
vbTab & NumericUpDown1.Text & vbTab & "RM " & (lblMorrocan.Text *
NumericUpDown1.Text))
Sum = Sum + (lblMorrocan.Text * NumericUpDown1.Text)
rbtnMorrocanMeatballs.Checked = False
End If

If rbtnSweetChilliNoodles.Checked = True Then


ListBox1.Items.Add(rbtnSweetChilliNoodles.Text & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " &
(lblSweetChilliNoodles.Text * NumericUpDown1.Text))
Sum = Sum + (lblSweetChilliNoodles.Text *
NumericUpDown1.Text)
rbtnSweetChilliNoodles.Checked = False
End If

If rbtnSpaghettiBolognese.Checked = True Then


ListBox1.Items.Add(rbtnSpaghettiBolognese.Text & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblSpaghetti.Text *
NumericUpDown1.Text))
Sum = Sum + (lblSpaghetti.Text * NumericUpDown1.Text)
rbtnSpaghettiBolognese.Checked = False
End If

If rbtnLasagne.Checked = True Then


ListBox1.Items.Add(rbtnLasagne.Text & vbTab & vbTab & vbTab
& vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblLasange.Text *
NumericUpDown1.Text))
Sum = Sum + (lblLasange.Text * NumericUpDown1.Text)
rbtnLasagne.Checked = False
End If

If rbtnSausage.Checked = True Then


ListBox1.Items.Add(rbtnSausage.Text & vbTab & vbTab &
NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblSausage.Text *
NumericUpDown1.Text))
Sum = Sum + (lblSausage.Text * NumericUpDown1.Text)
rbtnSausage.Checked = False
End If

If rbtnCarbonaraPasta.Checked = True Then

115 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

ListBox1.Items.Add(rbtnCarbonaraPasta.Text & vbTab & vbTab


& NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblSpaghetti.Text *
NumericUpDown1.Text))
Sum = Sum + (lblCarbonara.Text * NumericUpDown1.Text)
rbtnCarbonaraPasta.Checked = False
End If

If rbtnFishandChips.Checked = True Then


ListBox1.Items.Add(rbtnFishandChips.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblFishChips.Text *
NumericUpDown1.Text))
Sum = Sum + (lblFishChips.Text * NumericUpDown1.Text)
rbtnFishandChips.Checked = False
End If

If rbtnChickenCaesarSalad.Checked = True Then


ListBox1.Items.Add(rbtnChickenCaesarSalad.Text & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " &
(lblChickenCaesarSalad.Text * NumericUpDown1.Text))
Sum = Sum + (lblChickenCaesarSalad.Text *
NumericUpDown1.Text)
rbtnChickenCaesarSalad.Checked = False
End If

If rbtnChickenChop.Checked = True Then


ListBox1.Items.Add(rbtnChickenChop.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblChickenChop.Text
* NumericUpDown1.Text))
Sum = Sum + (lblChickenChop.Text * NumericUpDown1.Text)
rbtnChickenChop.Checked = False
End If

If rbtnLambChop.Checked = True Then


ListBox1.Items.Add(rbtnLambChop.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblLampChop.Text *
NumericUpDown1.Text))
Sum = Sum + (lblLampChop.Text * NumericUpDown1.Text)
rbtnLambChop.Checked = False
End If

If rbtnFrenchFries.Checked = True Then


ListBox1.Items.Add(rbtnFrenchFries.Text & vbTab & vbTab &
vbTab & NumericUpDown1.Text & vbTab & vbTab & "RM " & (lblFrenchFries.Text
* NumericUpDown1.Text))
Sum = Sum + (lblFrenchFries.Text * NumericUpDown1.Text)
rbtnFrenchFries.Checked = False
End If

End If
End Sub

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


System.EventArgs) Handles btnPrint.Click
Bill.Show()

116 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

If MessageBox.Show("Are You Sure Want to Print the Bill", "SURE",


MessageBoxButtons.OKCancel, MessageBoxIcon.Question) =
Windows.Forms.DialogResult.OK Then

Bill.PrintForm1.Print()

If MessageBox.Show("Are You Sure Want to Print the Bill Again",


"SURE", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) =
Windows.Forms.DialogResult.OK Then

Bill.PrintForm1.Print()
End If
End If

Bill.Close()
Me.Close()

End Sub

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


System.EventArgs) Handles btnAddDrink.Click
'DRINK PRICE

If Drinks.Enabled = True Then


If rbtnMilo.Checked = False And rbtnTea.Checked = False And
rbtnLemonTea.Checked = False And rbtnSirap.Checked = False And
rbtnBandung.Checked = False And rbtnSoyaBean.Checked = False And
rbtnSoftDrinks.Checked = False And rbtnMangoJuice.Checked = False And
rbtnOrangeJuice.Checked = False And rbtnAppleJuice.Checked = False And
rbtnWatermelonJuice.Checked = False And rbtnLimeJuice.Checked = False And
rbtnMineralWater.Checked = False And rbtnCoffee.Checked = False Then
MessageBox.Show("Please Select a Drink", "ERROR",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
btnAddDrink.Enabled = True

If rbtnMilo.Checked = True Then


ListBox1.Items.Add(rbtnMilo.Text & vbTab & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblMilo.Text
* NumericUpDown2.Text)
Sum = Sum + lblMilo.Text * NumericUpDown2.Text
rbtnMilo.Checked = False
End If

If rbtnTea.Checked = True Then


ListBox1.Items.Add(rbtnTea.Text & vbTab & vbTab & vbTab
& vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblTea.Text *
NumericUpDown2.Text)
Sum = Sum + lblTea.Text * NumericUpDown2.Text
rbtnTea.Checked = False
End If

If rbtnLemonTea.Checked = True Then


ListBox1.Items.Add(rbtnLemonTea.Text & vbTab & vbTab &
vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblLemonTea.Text *
NumericUpDown2.Text)
Sum = Sum + lblLemonTea.Text * NumericUpDown2.Text

117 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

rbtnLemonTea.Checked = False
End If

If rbtnSirap.Checked = True Then


ListBox1.Items.Add(rbtnSirap.Text & vbTab & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblSirap.Text
* NumericUpDown2.Text)
Sum = Sum + lblSirap.Text * NumericUpDown2.Text
rbtnSirap.Checked = False
End If

If rbtnBandung.Checked = True Then


ListBox1.Items.Add(rbtnBandung.Text & vbTab & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " &
lblBandung.Text * NumericUpDown2.Text)
Sum = Sum + lblBandung.Text * NumericUpDown2.Text
rbtnBandung.Checked = False
End If

If rbtnSoyaBean.Checked = True Then


ListBox1.Items.Add(rbtnSoyaBean.Text & vbTab & vbTab &
vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblSoyaBean.Text *
NumericUpDown2.Text)
Sum = Sum + lblSoyaBean.Text * NumericUpDown2.Text
rbtnSoyaBean.Checked = False
End If

If rbtnSoftDrinks.Checked = True Then


If rbtnPepsi.Checked = False And rbtnSarsi.Checked =
False And rbtnCocaCola.Checked = False And rbtnMountDew.Checked = False
Then
MessageBox.Show("Please Select the Soft Drinks",
"ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error)
ElseIf rbtnPepsi.Checked = True Then
ListBox1.Items.Add(rbtnSoftDrinks.Text & "(" &
rbtnPepsi.Text & ")" & vbTab & vbTab & vbTab & NumericUpDown2.Text & vbTab
& vbTab & "RM " & lblSoftDrinks.Text * NumericUpDown2.Text)
Sum = Sum + lblSoftDrinks.Text *
NumericUpDown2.Text
rbtnPepsi.Checked = False
ElseIf rbtnSarsi.Checked = True Then
ListBox1.Items.Add(rbtnSoftDrinks.Text & "(" &
rbtnSarsi.Text & ")" & vbTab & vbTab & vbTab & NumericUpDown2.Text & vbTab
& vbTab & "RM " & lblSoftDrinks.Text * NumericUpDown2.Text)
Sum = Sum + lblSoftDrinks.Text *
NumericUpDown2.Text
rbtnSarsi.Checked = False
ElseIf rbtnCocaCola.Checked = False Then
ListBox1.Items.Add(rbtnSoftDrinks.Text & "(" &
rbtnCocaCola.Text & ")" & vbTab & vbTab & NumericUpDown2.Text & vbTab &
vbTab & "RM " & lblSoftDrinks.Text * NumericUpDown2.Text)
Sum = Sum + lblSoftDrinks.Text *
NumericUpDown2.Text
rbtnCocaCola.Checked = False
Else

118 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

ListBox1.Items.Add(rbtnSoftDrinks.Text & "(" &


rbtnMountDew.Text & ")" & vbTab & vbTab & NumericUpDown2.Text & vbTab &
vbTab & "RM " & lblSoftDrinks.Text * NumericUpDown2.Text)
Sum = Sum + lblSoftDrinks.Text *
NumericUpDown2.Text
rbtnMountDew.Checked = False
End If
rbtnSoftDrinks.Checked = False
rbtnCocaCola.Checked = False
rbtnMountDew.Checked = False
End If

If rbtnMangoJuice.Checked = True Then


ListBox1.Items.Add(rbtnMangoJuice.Text & vbTab & vbTab
& vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblMangoJuice.Text
* NumericUpDown2.Text)
Sum = Sum + lblMangoJuice.Text * NumericUpDown2.Text
rbtnMangoJuice.Checked = False
End If

If rbtnOrangeJuice.Checked = True Then


ListBox1.Items.Add(rbtnOrangeJuice.Text & vbTab & vbTab
& vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblOrangeJuice.Text
* NumericUpDown2.Text)
Sum = Sum + lblOrangeJuice.Text * NumericUpDown2.Text
rbtnOrangeJuice.Checked = False
End If

If rbtnAppleJuice.Checked = True Then


ListBox1.Items.Add(rbtnAppleJuice.Text & vbTab & vbTab
& vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblAppleJuice.Text
* NumericUpDown2.Text)
Sum = Sum + lblAppleJuice.Text * NumericUpDown2.Text
rbtnAppleJuice.Checked = False
End If

If rbtnWatermelonJuice.Checked = True Then


ListBox1.Items.Add(rbtnWatermelonJuice.Text & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " &
lblWatermelonJuice.Text * NumericUpDown2.Text)
Sum = Sum + lblWatermelonJuice.Text *
NumericUpDown2.Text
rbtnWatermelonJuice.Checked = False
End If

If rbtnLimeJuice.Checked = True Then


ListBox1.Items.Add(rbtnLimeJuice.Text & vbTab & vbTab &
vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " & lblLimeJuice.Text *
NumericUpDown2.Text)
Sum = Sum + lblLimeJuice.Text * NumericUpDown2.Text
rbtnLimeJuice.Checked = False
End If

If rbtnMineralWater.Checked = True Then


ListBox1.Items.Add(rbtnMineralWater.Text & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " &
lblMineralWater.Text * NumericUpDown2.Text)

119 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Sum = Sum + lblMineralWater.Text * NumericUpDown2.Text


rbtnMineralWater.Checked = False
End If

If rbtnCoffee.Checked = True Then


ListBox1.Items.Add(rbtnCoffee.Text & vbTab & vbTab &
vbTab & vbTab & NumericUpDown2.Text & vbTab & vbTab & "RM " &
lblCoffee.Text * NumericUpDown2.Text)
Sum = Sum + lblCoffee.Text * NumericUpDown2.Text
rbtnCoffee.Checked = False
End If
End If
End If
End Sub

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


System.EventArgs) Handles btnTotalPrice.Click
If MessageBox.Show("Are You sure want total the price?", "CONFIRM",
MessageBoxButtons.OKCancel, MessageBoxIcon.Question) =
Windows.Forms.DialogResult.Cancel Then

Else
ListBox1.Items.Add("")
ListBox1.Items.Add("")
ListBox1.Items.Add("-------------------------------------------
---------------------------------------------------------------------------
--")
ListBox1.Items.Add(vbTab & vbTab & vbTab & vbTab & "Total:" &
vbTab & vbTab & "RM " & Sum)
ListBox1.Items.Add("-------------------------------------------
---------------------------------------------------------------------------
--")
btnRemove.Enabled = False
tabctrlMenu.Enabled = False
btnTotalPrice.Enabled = False
btnSaveRec.Enabled = True
End If

End Sub

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


System.EventArgs) Handles btnsearch.Click
Dim name, id As String

If txtsearch.Text = "KDE" Then


MessageBox.Show("You haven't enter any Member ID. Please enter
a Member ID to Search.", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error)

Else
cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0;
Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [Member]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader

120 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

While dr.Read()
If dr(0) = txtsearch.Text Then

txtFname.Text = dr(1)

End If
End While

id = txtsearch.Text
name = txtFname.Text

If txtFname.Text = "" Then


MessageBox.Show("Invalid MemberID", "ERROR",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
txtdate.Text = d

btnAddDrink.Enabled = True
btnAddFood.Enabled = True
btnPrint.Enabled = True
btnRemove.Enabled = True
btnTotalPrice.Enabled = True

tabctrlMenu.Enabled = True

ListBox1.Items.Add(" ...:::Kelab Darul


Ehsan:::... ")
ListBox1.Items.Add(" --=|Malaysian Cafe|=--
")
ListBox1.Items.Add("")
ListBox1.Items.Add("Date: " & d)
ListBox1.Items.Add("Time: " & t)
ListBox1.Items.Add("")
ListBox1.Items.Add("Member ID: " & id)
ListBox1.Items.Add("Member Name: " & name)
ListBox1.Items.Add("")
ListBox1.Items.Add("---------------------------------------
---------------------------------------------------------------------------
------")
ListBox1.Items.Add("Items" & vbTab & vbTab & vbTab & vbTab
& "Amount" & vbTab & vbTab & "Price")
ListBox1.Items.Add("---------------------------------------
---------------------------------------------------------------------------
------")
ListBox1.Items.Add("---------------------------------------
---------------------------------------------------------------------------
------")
ListBox1.Items.Add("")

btnsearch.Enabled = False

End If
End If
End Sub

121 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

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


System.EventArgs) Handles btnRemove.Click
If ListBox1.SelectedItem = "" Then
MessageBox.Show("Please Select a item to remove. Thank You",
"SELECT A ITEM", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf ListBox1.SelectedIndex <= 13 Then
MessageBox.Show("You Can Remove Header!!", "ERROR",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
End If

End Sub

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


System.EventArgs) Handles btnSaveRec.Click

Dim i, c As Integer

For i = 14 To ListBox1.Items.Count - 6

cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0;


Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [POS]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader
dr.Read()

str = "INSERT INTO POS([BillNo],[MemberID],[OrderedMenu],


[Date], [TotalPrice], [Month]) values ('" & lblBillNo.Text & "', '" &
txtsearch.Text & "', '" & ListBox1.Items.Item(i) & "', '" & txtdate.Text &
"', '" & Sum & "', '" & mon & "')"

cmd = New OleDbCommand(str, cn)


cmd.ExecuteNonQuery()

Next

MessageBox.Show("Registered is Save Succefully", "Done",


MessageBoxButtons.OK, MessageBoxIcon.Information)

cn.Close()
btnPrint.Enabled = True
End Sub

End Class

122 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

Points of Sales_New Order_Bill

Public Class Bill

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


System.EventArgs) Handles MyBase.Load
Dim i As Integer

If NewOrder_WCafe.lblBillNo.Text = "" Then


For i = 0 To NewOrder_MCafe.ListBox1.Items.Count - 1

ListBox1.Items.Add(NewOrder_MCafe.ListBox1.Items.Item(i))
Next

lblBillNo.Text = NewOrder_MCafe.lblBillNo.Text
Else
For i = 0 To NewOrder_WCafe.ListBox1.Items.Count - 1

ListBox1.Items.Add(NewOrder_WCafe.ListBox1.Items.Item(i))
Next

lblBillNo.Text = NewOrder_WCafe.lblBillNo.Text
End If
End Sub
End Class

Members Billing_ Monthly Statement

Imports System.Data.OleDb
Public Class MonthlyStatement
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim str As String
Dim fullname, addr As String
Private Sub MonthlyStatement_FormClosed(ByVal sender As Object, ByVal e
As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

End Sub

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


System.EventArgs) Handles MyBase.Load
txtFname.Enabled = False
txtLname.Enabled = False

btnCMS.Enabled = False
btnPrint.Enabled = False

End Sub

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


System.EventArgs) Handles btnCMS.Click

123 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

'MSViewer.MdiParent = MainMenu
MSViewer.Show()

End Sub

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


System.EventArgs) Handles btnsearch.Click
If txtsearch.Text = "KDE" Then
MessageBox.Show("You haven't enter any Member ID. Please enter
a Member ID to Search.", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error)

Else
cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0;
Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [Member]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader

While dr.Read()
If dr(0) = txtsearch.Text Then

txtFname.Text = dr(1)
txtLname.Text = dr(2)
fullname = dr(1) & " " & dr(2)
addr = dr(9)
End If
End While

btnCMS.Enabled = True
btnPrint.Enabled = True

If txtFname.Text = "" Then


MessageBox.Show("The Member ID is not found in Database.
Please check the Member ID again.", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error)

Else
cn = New OleDbConnection("provider=
Microsoft.Jet.OLEDB.4.0; Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [MemBilling] where MemberID= '" &
txtsearch.Text & "'"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader
dr.Read()

If dr.HasRows Then
MessageBox.Show("Monthly Statement Already Printed",
"INFORMATION", MessageBoxButtons.OK, MessageBoxIcon.Information)
btnCMS.Enabled = False
btnPrint.Enabled = False

End If

124 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

End If

End If

End Sub

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


System.EventArgs) Handles btnPrint.Click
MSViewer.Close()
MSViewer.Show()
If MessageBox.Show("Are You Sure Want to Print the Bill", "SURE",
MessageBoxButtons.OKCancel, MessageBoxIcon.Question) =
Windows.Forms.DialogResult.OK Then
MSViewer.PrintForm1.Print()
End If
MSViewer.Close()

End Sub

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


e As System.EventArgs)
MSViewer.Show()
End Sub
End Class

Members Billing_ Monthly Statement Viewer

Imports System.Data.OleDb
Public Class MSViewer
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim da As New OleDbDataAdapter()
Dim cb As OleDbCommandBuilder
Dim dsBilling As New DataSet()
Dim str, mon, com As String
Dim fullname, addr As String
Dim sum As Decimal
Dim d As Date = Now.Date
Dim t As DateTime = DateTime.Now.ToLongTimeString()
Private Sub MSViewer_FormClosed(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
MonthlyStatement.Show()

End Sub

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


System.EventArgs) Handles MyBase.Load

Dim add As Integer

lblMemberID.Text = MonthlyStatement.txtsearch.Text

125 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("Select MStateNO from MemBilling", cn)
dr = cmd.ExecuteReader
dr.Read()

Dim qryMem As String = "Select MStateNO from MemBilling"


da.SelectCommand = New OleDbCommand(qryMem, cn)
cb = New OleDbCommandBuilder(da)

'Dim cb As OleDbCommandBuilder = New OleDbCommandBuilder(da)

da.Fill(dsBilling, "MemBilling")
Dim dt As DataTable = dsBilling.Tables("MemBilling")

If dr.HasRows Then

add = dt.Rows(dt.Rows.Count - 1)("MStateNO")


lblMSNo.Text = add + 1

Else
lblMSNo.Text = "1"

End If
cn.Close()

cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("Select *from MemBilling where MStateNO='" &
add & "'", cn)
dr = cmd.ExecuteReader
dr.Read()

ListBox1.Items.Add("-----------------------------------------------
-------------------------------------------------------------------------")
ListBox1.Items.Add("BillNo" & vbTab & vbTab & "Date" & vbTab &
vbTab & "Payment")
ListBox1.Items.Add("-----------------------------------------------
-------------------------------------------------------------------------")
ListBox1.Items.Add("-----------------------------------------------
-------------------------------------------------------------------------")

mon = Month(Now).ToString

126 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

If mon = 1 Then
mon = "January"
ElseIf mon = 2 Then
mon = "February"
ElseIf mon = 3 Then
mon = "March"
ElseIf mon = 4 Then
mon = "April"
ElseIf mon = 5 Then
mon = "May"
ElseIf mon = 6 Then
mon = "Jun"
ElseIf mon = 7 Then
mon = "July"
ElseIf mon = 8 Then
mon = "August"
ElseIf mon = 9 Then
mon = "September"
ElseIf mon = 10 Then
mon = "October"
ElseIf mon = 11 Then
mon = "November"
ElseIf mon = 12 Then
mon = "December"
End If

lblCMonth.Text = mon

cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0; Data


Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [Member]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader

While dr.Read()
If dr(0) = MonthlyStatement.txtsearch.Text Then
fullname = dr(1) & " " & dr(2)
addr = dr(9)
End If

End While

cmd = New OleDbCommand("Select * from [POS] ", cn)


dr = cmd.ExecuteReader

While dr.Read()
If com <> dr(0) Then
If dr(1) = MonthlyStatement.txtsearch.Text Then

If dr(5) = lblCMonth.Text Then

ListBox1.Items.Add(dr(0) & vbTab & vbTab & dr(3) &


vbTab & "RM " & dr(4))
sum = sum + dr(4)

127 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

com = dr(0)
Else
MessageBox.Show("No Record for This Month",
"ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End If

End If

End While

ListBox1.Items.Add("")
ListBox1.Items.Add("")
ListBox1.Items.Add("-----------------------------------------------
-------------------------------------------------------------------------")
ListBox1.Items.Add(vbTab & vbTab & "Total Payment:" & vbTab & "RM "
& sum)
ListBox1.Items.Add("-----------------------------------------------
-------------------------------------------------------------------------")

lblDate.Text = d
lblTime.Text = t
txtName.Text = fullname
txtAddress.Text = addr

cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0; Data


Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [MemBilling]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader
dr.Read()

str = "INSERT INTO MemBilling([MStateNO],[MemberID],[Date],


[Month],[TotalPayment]) Values ('" & lblMSNo.Text & "', '" &
MonthlyStatement.txtsearch.Text & "', '" & lblDate.Text & "', '" &
lblCMonth.Text & "', '" & sum & "')"

cmd = New OleDbCommand(str, cn)


cmd.ExecuteNonQuery()

str = "INSERT INTO Payment([MStateNO],[MemberID],[Date],


[Month],[TotalPayment]) Values ('" & lblMSNo.Text & "', '" &
MonthlyStatement.txtsearch.Text & "', '" & lblDate.Text & "', '" &
lblCMonth.Text & "', '" & sum & "')"

cmd = New OleDbCommand(str, cn)


cmd.ExecuteNonQuery()
dr.Close()
cn.Close()

128 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

End Sub

End Class

Account Receivable_Payment

Imports System.Data.OleDb
Public Class Payment

Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim str As String
Dim total, pay, bal As Decimal
Dim d As Date = Now.Date
Private Sub btnsearch_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnsearch.Click
If txtsearch.Text = "KDE" Then
MessageBox.Show("You haven't enter any Member ID. Please enter
a Member ID to Search.", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error)

Else
cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0;
Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [Member]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader

While dr.Read()
If dr(0) = txtsearch.Text Then

txtFname.Text = dr(1)
txtLname.Text = dr(2)
txtdate.Text = d
End If
End While

btnGetPayment.Enabled = True
txtPayment.Enabled = True
dr.Close()
cn.Close()

End If

cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0; Data


Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [Payment]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader

129 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

While dr.Read()
If dr(1) = txtsearch.Text Then

total = dr(4)
End If
End While

txtTotalAmtDue.Text = "RM" & total

End Sub

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


System.EventArgs) Handles MyBase.Load
txtFname.Enabled = False
txtLname.Enabled = False
txtdate.Enabled = False
txtTotalAmtDue.Enabled = False
txtPayment.Enabled = False

btnGetPayment.Enabled = False
End Sub

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


As System.EventArgs) Handles btnGetPayment.Click
If txtPayment.Text = "" Then
MessageBox.Show("Enter a Payment", "ERROR",
MessageBoxButtons.OK, MessageBoxIcon.Error)

Else
pay = txtPayment.Text
bal = total - pay

MessageBox.Show("The Balance Payment Due: RM " & bal & "",


"INFORMATION", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If

cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0; Data


Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [Payment] where MemberID= '" & txtsearch.Text
& "'"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader
dr.Read()

'"Update Member SET [Title] = '" & cbTitle.Text & "', [IC/Passport]
= '" & txtICno.Text & "', [Gender]

str = "Update [Payment] set [MemberID]='" & txtsearch.Text & "',


[TotalPayment]= '" & bal & "'"

cmd = New OleDbCommand(str, cn)


cmd.ExecuteNonQuery()

130 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

MessageBox.Show("Changes had been Saved Succefully", "Done",


MessageBoxButtons.OK, MessageBoxIcon.Information)

cn.Close()

txtFname.Enabled = False
txtLname.Enabled = False
txtdate.Enabled = False
txtTotalAmtDue.Enabled = False
txtPayment.Enabled = False

btnGetPayment.Enabled = False

txtdate.Clear()
txtFname.Clear()
txtLname.Clear()
txtPayment.Clear()
txtsearch.Clear()
txtTotalAmtDue.Clear()

txtsearch.Focus()
End Sub
End Class

Inventory Management_Add New Item

Imports System.Data.OleDb
Public Class NewItem
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim da As New OleDbDataAdapter()
Dim cb As OleDbCommandBuilder
Dim dsMember As New DataSet()

Dim str, add As String

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


System.EventArgs) Handles btnregister.Click
If txtItemCode.Text = "" Or txtItemName.Text = "" Or txtQty.Text =
"" Or txtQUsage.Text = "" Or txtSupplier.Text = "" Then
MessageBox.Show("Please fill in the required fields", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)

Else
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [ItemList]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader
dr.Read()

If dr(0) = txtItemCode.Text Then

131 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

MessageBox.Show("This Item Code is already has been


Registered!!! Please Enter New Item Code with increment of value '1' of
previous Item Code", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error)
Else

str = "Insert Into ItemList([ItemCode],


[ItemName],[Amount], [Usage], [Supplier]) Values ('" & txtItemCode.Text &
"', '" & txtItemName.Text & "', '" & txtQty.Text & "', '" & txtQUsage.Text
& "', '" & txtSupplier.Text & "')"

cmd = New OleDbCommand(str, cn)


cmd.ExecuteNonQuery()

MessageBox.Show("Registered is Save Succefully", "Done",


MessageBoxButtons.OK, MessageBoxIcon.Information)

cn.Close()
Me.Close()
End If

End If
End Sub

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


System.EventArgs) Handles MyBase.Load
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source = KDEManagementSystem.mdb")

cn.Open()
str = "Select ItemCode from ItemList"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader
dr.Read()

Dim qryMem As String = "Select ItemCode from ItemList"


da.SelectCommand = New OleDbCommand(qryMem, cn)
cb = New OleDbCommandBuilder(da)

'Dim cb As OleDbCommandBuilder = New OleDbCommandBuilder(da)

da.Fill(dsMember, "ItemList")
Dim dt As DataTable = dsMember.Tables("ItemList")

If dr.HasRows Then

add = dt.Rows(dt.Rows.Count - 1)("ItemCode")


lblLastItemCode.Text = add

End If

End Sub

132 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

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


System.EventArgs) Handles btnClear.Click
txtItemCode.Clear()
txtItemName.Clear()
txtQty.Clear()
txtQUsage.Clear()

End Sub
End Class

Inventory Management_Modify/Delete Item

Imports System.Data.OleDb
Public Class ItemDetails
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim str As String
Private Sub btnsearch_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnsearch.Click
txtItemCode.Clear()
txtItemName.Clear()
txtQty.Clear()
txtQUsage.Clear()

If txtsearch.Text = "F" Then


MessageBox.Show("You haven't enter any Item Code. Please enter
a Item Code to Search Box.", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error)

Else
cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0;
Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "Select * from [ItemList]"
cmd = New OleDbCommand(str, cn)
dr = cmd.ExecuteReader

While dr.Read()
If dr(0) = txtsearch.Text Then
txtItemCode.Text = dr(0)
txtItemName.Text = dr(1)
txtQty.Text = dr(2)
txtQUsage.Text = dr(3)
txtSupplier.Text = dr(4)
End If
End While

If txtItemCode.Text = "KDE" Then


MessageBox.Show("The Item Code is not found in Database.
Please check the Item Code again.", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error)
Else
btnedit.Enabled = True

133 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

btndelete.Enabled = True

End If
End If
End Sub

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


System.EventArgs) Handles MyBase.Load
txtItemCode.Enabled = False
txtItemName.Enabled = False

txtQty.Enabled = False
txtQUsage.Enabled = False
txtSupplier.Enabled = False

btndelete.Enabled = False
btnedit.Enabled = False
btnsave.Enabled = False

End Sub

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


System.EventArgs) Handles btnedit.Click

txtQty.Enabled = True
txtQUsage.Enabled = True
txtSupplier.Enabled = True

btnsave.Enabled = True
btnedit.Enabled = False
btndelete.Enabled = False
End Sub

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


System.EventArgs) Handles btnsave.Click
cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0; Data
Source = KDEManagementSystem.mdb")
cn.Open()

str = " Update ItemList SET [Amount]= '" & txtQty.Text & "',
[Usage] = '" & txtQUsage.Text & "', [Supplier]='" & txtSupplier.Text &
"'where ItemCode = '" & txtItemCode.Text & "'"

cmd = New OleDbCommand(str, cn)


cmd.ExecuteNonQuery()

MessageBox.Show("Changes had been Saved Succefully", "Done",


MessageBoxButtons.OK, MessageBoxIcon.Information)

cn.Close()

txtItemCode.Enabled = False
txtItemName.Enabled = False

txtQty.Enabled = False
txtQUsage.Enabled = False
txtSupplier.Enabled = False

134 | P a g e
Software Development Project
Managing System
Kelab Darul Ehsan

btndelete.Enabled = False
btnedit.Enabled = False
btnsave.Enabled = False

txtItemCode.Clear()
txtItemName.Clear()
txtQty.Clear()
txtQUsage.Clear()

End Sub

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


System.EventArgs) Handles btndelete.Click

If txtItemCode.Text = "" And txtItemName.Text = "" Then


MessageBox.Show("Please insert a Item Code or get info before
delete!", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning)
ElseIf MessageBox.Show("Are you sure want to delet this record?",
"ARE YOU SURE?", MessageBoxButtons.OKCancel, MessageBoxIcon.Stop) =
Windows.Forms.DialogResult.Cancel Then
Me.Show()
Else
cn = New OleDbConnection("provider= Microsoft.Jet.OLEDB.4.0;
Data Source = KDEManagementSystem.mdb")
cn.Open()
str = "delete from ItemList where [ItemCode] = '" &
txtItemCode.Text & "'"
cmd = New OleDbCommand(str, cn)
cmd.ExecuteNonQuery()

txtItemCode.Clear()
txtItemName.Clear()
txtQty.Clear()
txtQUsage.Clear()
txtsearch.Clear()

txtsearch.Focus()

MessageBox.Show("Record Successfully Deleted", "DONE",


MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
End Class

135 | P a g e