I lt~l[~lljjll[l!ll~!II

Transcription

I lt~l[~lljjll[l!ll~!II
NEAR EAST UNIVERSITY
FACULTY OF ECONOMICS AND
ADMINISTRATIVE SCIENCE
. DEPARTMENT OF COMPUTER
INFORMATION SYSTEMS
2005 SUMMER TERM
CIS,400
(GRADUATION PROJECT)
WHITE GOODS AND ELECTRONIC SALES
INFORMATION SYSTEM
Submitted To:
Dept.OfCIS
Submitted BY:
Pervane AGA YEV A(20000564)
INEUlt~l[~l j l [l!l ~!I
Lefkosa,
2005
LIBRARY
ACKNOWLEDGEMENT
I want to thank to:
My instructors Dr. Yalcm AK(;ALI and Mr.Tansel DEVIN for their
support in completion of my project.
Also I want to thank Miss.Nadire CA VUS,Mr.Mustafa
MENEKA Y,Mr.Ilham HUSEYNOV and to all other instructors who educated
me during my university life.
My friends Derya Sari,Fatma Taskin for their psychological support
during my university life and during the period of preparing the project.
I am very happy to come to Cyprus.This sweet island ant its friendly
perople makes me to learn the real life and provide me to live with myself.
'
And this island provide me to get new and good friends.
Also thanks to:
My family for providing me with all their financial resources
for my education and while preparing the project and
for their psychological support in all parts of my life.They always provide
me a comfort life and the necessary conditions to improve and educate
myself into high levels .
1
ABSTRACT
My project is White Goods and Electronik Devices Selling
Information System. This system operates to purchase new goods
and sold these goods. Also the system provides stock control and
releationships with customers and employees.The aims of this system is
to make easy the activities of the people/employees and to provide
fast process/service to the Customers.As we know the customer greatefull
is very important.
Basicly this system pays attention to Selling process for the Customers.
Every process in this system is done by computer.
The users of this system are deviden two parts,Managers and employess.
All the important changes can be done by Managers.The employess can
not get reports or can not buy new goods without managers' directives.
The main purpose of White Goods and Electronic Devices Selling
Information System isto provide easy,comfortable and quick process
by obtaining purchaising new goods,searching and selling these goods.
2
INTRODUCTION
The White Goods and Electronik Devices Selling
Information System program can take place in anywhere which
selling and purchasing this type of products.Its main purpose
is to satisfy the needs of customer.When a customer comes to
buy a product the process should be quick and as customer's want
, and the workers/managers want to give the best service.
The White Goods and Electronik Devices Selling
Information System has 5 main process:
1-) Customer Process
2-)Product Process
- 3-)Employee Process
)
4-)Payments Process
5 )Reporting Process
1-) Customer Process: In this process the system gets
the general information of the Customer.Such as Name,address etc.
Here we can add.delete and update the cutomer information.
3
1-) Product Process: In this process the system make all the operations
about product.It is very important process of the system so it requires more
attention and spent more time to design.
Products process has four subprocesses:
i-)Searching: When the customer came to buy a product first the system shoul
search this product available or not.The searching process can be done by
Product Name,Product ID or Supplier Name.
ii- )Orders: In this process the customer can order a product without buying at
this time.System holds order information in the Order Table.
System gets order information about produst and customer
The employee has to enter his/her name when he/she gets order.
Because if there is any problem occures,it will be easy to solve it
by knowing which employee got this order.The system can add,delete
and update Order information,too.
iii-)Selling:In this process the customer can buy a product which
he/she ordered before.Also the customer can buy a product without
ordering before.When the compay sell a product the selled money adds
as Profit.After selling process the system has to give bill to customer.
'
Also after selling process the sellet product should be decrased from the
stock.The customers can pay cash or can by by credit.
iv-)Purchasing:In this process system buys product from the vendors.
4
I
The Vendor/supplier information also gets in this process.Here we can add new
suppliers,delete or update,too.The bpurchasing and selling prices are different
From each other.To get profit.
3-)Employee Process:
Here all the employee processes are done.
It has two sub process:
i-)~eneral Employee: When a new employee comes to company her/his
information is add here.Such as name,sumame,address,title
etc.By using
managers' directives an employee can be add or can be delete from the
system in this process.And the information of the employee can be update.
ii-)Password Subprocess:To
protect the system we need some security
operations.Normal users can not do the admins' job.So the system identify the
users as admins and normal users.So thje system give password and user names
for users. The users can add,delete or change their usemames and passwords in
this process.
4-)Payments Process:Here the payment processes are done by the users or
admins.
It has 2 Subprocess:
i-)Credit Payments: When the customers buy products by credit they should
come and pay tehir credits month to month.So this process is used by the
system.When the customer pay his/her loan/debt the systemn decreased his/her
loan from the account.After this process a bill is given to customer to prove
he/she pay.
5
iv-)Payment Methods: In this process the payment methods are determined
for company.This can be done by using managers directives.For example now
the company accept credit card,cash and check.Maybe in future the company
can be accept selling by Credit.In this situation the selling by credit should be
add to the Payment Methods.This information is used when a customer buys a
product from the company.And the admin can add new payment methods to the
system.
. -)Searching T"OO l.- , Here all the searchin process are done.As we know
searching is very important for a system to be fast and to find easily what we
want.It save time,too.
It has five subprocesses:
i-)Order searching: When the worker wants to find any order to make any
changes on it he/she can use this subprocess.This process linked him/her directly
to the Orders subprocess part.
ii-)Customer Searching Subprocess: It provides to search any customer
for some purpoces,such as to get information about a customer or to update the
information of customer.So it joins the user to the customer table.
iii-)Product Searching Subprocess: It also provide users easy access to the
products to get information or make some changes on them. This joined the user
6
- ---,
~~~~~-
-
---=
~~--
directly to the proucts table,too.So the use~ can easyly update or delete a product
by using this subprocess.
iv-)Supplier Searching Subprocess: This process provides to access a
supplier information by joining directly to the suppliers process or table.So the
user can easily make changes on suppliers' information or can delete.
v-)Employee Searching: It provides to search any employee for some
purpoces,such as to get information about a employee and to show the
performance or to update the information of customer.So it joins the
user to the customer table.
§-)Reporting Process:is usedonly by the manager (admin user) of the
bookstore. This process satisfy getting different report about the
processes
There are many type of reports;
lCustomer
2.Bill Reports
3 .Payments Reports
4.Supplier Reports
5.Sales Report
6.Stock Report
7 .Expense-Revenue Report
8.Employee Reports
9.0rdered Products Reports
7
_ Expense-revenue report satisfy a report to the manager to see the
information of how many book is purchased and what are their cost
and what total amount is getted in a given date interval.
Employee Reports.It satisfy the employee reports for the managers.
By using these reports the managers can show the weaknesses or strengths of
their employees and managaers can know ehich employee do they need in the
future.
Ordered Products Reports. It provides to managers to show details of
Ordered Products.By using this information they can decide which product they
need to buy from suppliers or which product is more preferable.
Payments Reports: By using this report managers can see which customer
regularly pay his/her debt or which customer do not pay r
regularly.And they can decide is the selling by credit profitable or not.
9
DESIGN OF THE SYSTEM
10
EXPLANATION
The minimum requirements of the system are;
Intel Pentium III processor
550MHz
256MBofRAM
3 0 GB harddisk
14" Monitor
Microsoft Windows 2003
HL~DT-ST RW/DVD GCC/4241N
The recommended requirements of the system are as follows ;
Intel Pentium Centrino
1600 MHz
512MB ofRAM
60 GB harddisk
1 7" Monitor
Microsoft Windows XP Proffesional
11
HL-DT-ST RW/DVD GCC/4241N
I used Microsoft Access2003 and its VB appllications to write
this program.
To be able to run this program, the MS Office 2003 Service Pack2
Program is required by the users.
Also the White Goods and Electronic Devices Sales Information System use
the FIFO (First-In First-Out) inventory management system. In this situation the
program gives priority to oldest product in inventory when making selling
process. By doing this, newest product kept in inventory and maintain the
,
inventory with newset product.
FIFO stands for first-in, first-out inventory tracking. This means as a
business purchases its inventory, holds the inventory, and finally sells the
inventory. This also implies that the remaining inventory at the end of a period
will be the fast group. This method of inventory tracking will provide the
highest gross profit for the period. At the same time this method also states that
the remaining inventory was purchased at the highest price level.
,
The FIFO method is generally preferred by the companys.Because
12
it is easy to apllay and determining the cost of the products.
WHITE GOODS AND ELECTRONIC SALES
INFORMATION SYSTEM
1.
PROJECT IDENTIFICATION AND SELECTION
THE AIM OF THE PROJECT :
The main purpose of White Goods and Electronic Sales
Information System isto provide easy,comfortable and quick process
by obtaining purchaising new goods,searching and selling these goods.
Another aimis to provide easy activity to employees.If employees
will be relax and greaitful the profit of the company is increased too.
As we know the manual processes are make the system delay ,difficult,
Lost of the information etc.By using computers all these bad situations are
dicreased or minimized.
13
THE PROJECT BOUNDERIES :
1.
By manual the product selling were done on papers that holds by
employees in hand and arranged them very hard.
2.
If the users want to learn the quantity of the product or which good
is where it takes long time to learn it by hand.
3. The general informations of thegoods and bill information of these goods
are hold in different papers or clusters and sometimes this cause some
confusing among the records.
4. As we know the papers can be depreciated by time so the records can not be
read as wanted,and it can couse the data loss.
5.
If the users want to transfer all data from one place to another they should
do it by hand and it takes a lot of time.
14
•
6.
As we know the customer satisfaction is very importan so with manual
system the customers have to wait a lot of time.
I
I
I
I
I
I
i
i
i
RESOURCE LIMITS :
The new system will be applay by computer and it will be more expensive than
before.But it will earn more mony to company,too.So the system does not have
budget limitations.
2. PROJECT INITIATION AND PLANNING
Technical Feasibility :
This system requires some Hardware devices:
~
a.
A computer for selling
I
b.
A printer to give printed bill and report
C.
A computer as server for manager for recording purchased and
II
I
selled, products.
I
--,
I
Operational Feasibility :
Before to applay this system we make some tests and surveys to find out
the computer knowledge level of the employees. According to the test result, the
employees who will use the system have basics knowledge abour computers, but
they will be educated about the new system.
15
-
Economical Feasibility :
All the expenses will be satisfied by Companies whic will use this system.
3. ANALYSIS
-
THE REQUIREMENT DETERMINATION
The requirements made by the users are as follows:
- Provide more customer satisfaction.
To increase the speed of operations
To prevent the loss of data
/
To prevent the data duplications
To provide easy and quick data access
To prevent the caos caused by purchasing and selling many
products
To restrict data access with the means of system security
(password entry).
NEW SYSTEM'S PROVIDENCES
- This new system will give the end format of the documents and papers that
are being held on hand and help workers to give better services for their
customers.Customers will not wait a long time.
16
- All information will be kept in computers, so there will be no storage problem
to kept this information.
- Bill will be prepared by computer automaticly.
- Reports will be able to taken easily, because of all documents are stored on the
computers.
- There will be no lost of data or it becomes minimized because all data will be
held or storage in computers.
- The reports can be printed from the computer when they wished or wanted.
~
t
[
l
l
17
DATABASES:
In this system there are ten database tables:
-Customers
-Employees
-Suppliers
-Products
-Orders
-ACCORDER
-Payments
-Payment Methods
-Bill
-Password
18
~~.-.--~--
.: Relationships
--·---~·-···
_
----·----
~--~-
·-·----·.-
-
_
__
_
_
_
19
----
DATA FLOW DIAGRAM
20
Ordered Product List
1
Accept/Reject Ordered Product
Vendor Informal.
SUPPLIERS
CUSTOMERS
('
'
I
'
p,,,,1,.,,;og
°""'° By
,... ·-·---·
.
I""
. ...o: •.
P"'I~-----
New Employee Information
Available Employee Information
EMPLOYEES
.
,...
7
I
Giving Recipt for Customer
-
1
I-"'---"
Pavment Fee for Customer
Accept/Reject Product Acknowledge.
'
7
Desired Product Information
.
Formatted Bill Reports
Formatted Profit Reports
White Goods and Electronic
Sales Information System
Formatted Sales Reports
I
\
/ Formatted Supplier Reports
~-
~
~·
Required Payment
c, ___ ,.
List of Needed Product
I
Formatted
Order Reoorts
Formatted Prod '"'·
~---~-
\
•
•
r
'
MANAGER
t
'·
Formatted Customer Reports
Formatted Employee Reports
Formatted Payment Reports
CONTEX DIAGRAM FOR WHITE GOODS AND ELECTRONIC SALES
INFORMATION SYSTEM
23
~
Cl
w
>-
:z: ~
<C
U)
U)
Cl
:z:
Oo
o(!) ~
w~
I--~
-0
~~
LL
-
ow
Cl
jl"'
LL
"'
te
C
C.
a,
t,~
a::
"t,
0~
~5:
•iect Order
1 lOOPOJd
-c,:::,
e
a..
1:'
a,
E
_J
a..
0
~i
0
C.
a,
C1
"'
0::
~ iii
'is.
--g
a.""
:::, "'
en
E
-c,a, ~
0
:o::u...
§
Product
peJepJQ
(.)
WO
_ig
:::,
0::
_J
> :z:
s:-c,
a,
<C
U)
W-
>-
0-
~
Cl
&
~
1--
(.)
I-- w
_J
w
0
C
~ I
~h
°'
~
~~
\-~
1~
~
"'
~
~
0
"'
I QS"
3
~
~
:=t
~
~
s""
-0
~1
6'
i~
~
~
~~
at
OI
~·
C
I
I
~
Sl,.
~
lg-
C
;g..
Q...
Q
s3
a-, l,rg
~~
h.
II
\-,§6
t-0
~
!"J1 en
I_
I~
i---- ~
,O)~
>
i
en
~
~
if
>
O
a..
C.
-e
(1)
•••
iii
~
iii'
-g
Q
S!:
(1)
I c.
\-:;...
'""Si
q
.\""
(1)
;:::i.
"'
"'
,-
ci'
I
a.
~
i&
~
r
I
I
1~>
•·1~,o
[
en
~
~
Al
"'
1s:
~
0
:Ill~
j
~
~
~
's;:::i.
rn.
0
~;;;
m
Ji=
=~
m
z
i
m
-§.f
~ ~
if
m
~
m
m
w
~ in
g -5
N~
~
Q
en
~
~~.-
m
~
.
m 0
"5
50;;
O
C
~ di a.
•
(D
t:j
rTJ
-l
J>
1-1
r
rTJ
t:j
..,,
t:j
t:j
..,,D
V,
rTJ
J>
;;:o
I
.....
zC)
V,
C
o::t
"'U
;;:o
D
n
V,V,
rTJ
•••
•
II
(I)
C
-0
-0
I
r
r,
H
;u
I
ct
r,
--l
J>
......•
r
r,
ct
,,
,,
ct
ct
D
x:
-u
;u
D
ct
C
n
--l
-u
;u
D
n
rn
ct
-0
J>
-<
(I)
C
;u
3:
r•....
-I
r,
z
-0
r,
3:
~
(I)
r,
~
D
t:::I
-I
\71
(I)
~;:!..
C'tr
\
'lt...,
.
J>
n
n
-u
-<
J>
3:
r,
z
-I
(;?
I
UOR-'OW.I04UJ PfOd
i!/
{'-
rn
\°'
·~
•
•
•
(>\
\~
\
·.in
q.,
\
t::::j
m
-I
J>
....
r,r
,RI
t::::j
0
;u
t::::j
..,,
H
I'-'
t::::j
t::::j
(ll
0
..,,
-u
J>
-<
3:
r,
z-I
3:
-u
J> ~
Cl
n
r,
Al
;u
0
J>
z
r,
po,n.-i4
,i.uawl.'Od pa
(;?
GI.)
.•.
I
I
CUSTOMERS
~
BILL
E=.z-1.. e
Formatted Bill
Customer Reports
Bill Reports
EMPLOYEES
ULE
PRODUCTS
F.r:L s
Formatted Employee Reports
ORDERS
F:1:-Le
Formatted Supplier Reports
~
Formatted Profrt Reports
MANAGER
PAYMENTS
r.e ce
Formatted Payment Reports
ACCORDER
t::r2 E
Profrt Reports
DETAILED DFD FOR REPORTS PROCESS
25
BLOCK DIAGRAM
PASSWORD ENTRY
WORKER MENU
ADMIN MENU
Customer
ustomer
j
Customer
,_____.Searc~Product
Order
Prcduct-e-»
Product
Sell
urchase
Sell
'AYMENT
PAYMENT------.
Credit Payment
EMPLOYEE --.
rc3eneral Employee
- redit Payment
----1
aymentMethod
General Employee
EMPLOYEE
t
arch
rder
l Password
-[
Password
Customer
Employee
SEARCH----.j
Product
upplier
SEARCH ______.
rder
Product
,--------_.customer
up plier
Order
Employee
REPORTS
•I
Customer
Employee
.supplier
ABOUT
Profit
Sales
Payment
-c
rogram
Programmer
Ordered Product
_____. Stock
Bill
• Program
BOUT ------{________Programmer
ELP
ELP
27
USER MANUAL
28
I
FLOWCHARTS
29
PASSWORD ENTRY
AND MAIN MENU
START
Enter User
name and
password
y
N
y
End
Main
MAIN MENU
1.Customer
2.Product
3.Payment
4.Employee
5 Search
6.Report
7.About
B.Help
9.Exit
Select Your
Chaise
C
i
i
30
I
------~-
Choice=1
N
User Name=Admin
I
N
N
C1
31
C1
y
Chice=6
N
y
Choice=7
N
y
Choice=S
N
y
Choice=9
Are you
sure to
exit?
End
N
32
CUSTOMER PROCESS
1.1.Add /Save
1.2.Update
1.3.Search
1.4.Delete
1.5.Close
Select your
Choice
y
Choice=1.1
N
N
Enter
Customer
Information
Click Save Button
N
33
UPDATING CUSTOMER
1.2
Click Next, Previous
Buttons
Fill the new
information of
Customer
Click Save Button
Click Close Button
34
CUSTOMER SEARCHING
Searching Submenu
1.3.1.Name
1.3.2.Sumame
1.3.3.Name&Sumame
1.3.4.Customer ID
1.3.5.Close
Select your
choice
y
N
Enter
Customer
Name
N
Click Search
Button
N
y
N
Record can
not be
found
Click Close Button
35
CUSTOMER SEARCHING BY SURNAME
1.3.2
Enter
Customer
Surname
Is Surname
empty?
.
/f{II
Click Search
Button
y
Please
Enter
y
N
Record can
not be
found
Click Close Button
36
SUSTOMER
SEARCHING
SURNAME
BY NAME
1.3.3
Enter
Customer
Name end
Surname
Name or
"Surnarneis empty?
N
y
Click Search
Button
Please Enter
Name and
Surname
N
Record can
not be
found
Click Close Button
y
37
·<"si,dl!IIIIIIIIIIHllfflllllR
._
CUSTOMER
SEARCHING
N
/
BY ID
Enter
Customer ID
Click Search
Button
y
Please
Enter ID
y
y
N
Click OK button
Record can
not be
found
1.3
Click Close Button
y
1.3
38
I
CUSTOMER DELETING
1.4
Press Next.Previous Button To
choose Customer
Choose Customer
Name
Press DELETE Button
\'Are you sure to-J.
delete
y
Customer is
deltedet
39
PRODUCT PROCESS
2
Product submenu
2.1Search
2.20rder
2.3.Purchase
2.4.Selling
Select Your
Choice
/J
y
2.1.Submenu
2.1.1Customer
2.1.2.Product
N
Select your
choice
N
N
::;............,.....=~~--===-
N
40
~=~~.-'"''::::·~l~lli~~IIIII
ORDER PROCESS
2.2
2.2.1.Add/Save
2.2.2.Update
2.2.3.Delete
Select your
Choice
y
Press Add Button
N
Press Save Button
Fill Product
Information
Press Buy Button
N
Press Credit
Press Cash
y
Press OK
CLOSE
Fill
Payment
Information
Press Bill
42
ODER UPDATING
Click Next.Previous
Buttons
Click Save button
Click Close Button
43
'
ORDER DELETING
2.2.3
Press Next.Previous Button
'
Choose Order
Press DELETE
N {
Answer?
Are you sure to
delete?
y
Order is
Deleted
44
''ii:::,illUIIIIIIIHIHHIII•----------------
PURCHASING PRODUCT PROCESS
Enter New
Quantity
Found?
y
N
N
Press Add Button
Enter ADD/
UPDATE Button
Enter
Supplier
Information
45
SELLING PROCESS
y
y
Enter By Credit
Button
Product
can not
found
Enter
Payment
Term
y
Click OK Button
Click CASH
Click Amortisation
Table
Click Print Button
Print Monthly
Payment Sheet
Click BILL
Print Bill
46
3
Payment Sumenu
3.1.Crecln Payment
3. 2.Payment Methods
Select your
Choice
y
Enter
OrderlD
N
N
Click OK Button
Click Print Button
Click Close
Print Monthly Bill
3.2
47
PAYMENT METHOD
You can not
Enter
y
Payment Sumenu
3.2.1.Add
3.2.2.Delete
3.2.3.Update/
Save
3.2.4.Close
Select your
choice
I
Main
I
I
~hoice=32~
Enter
Payment
Name
N
r
I
y
Press Update/
Save
~
Press Navigator
Buttons
Press Navigator
Select
deleted
method
Enter new
Name
Press Delete
Press Save
r------
3.2.4
48
!!)t!!l!l l l~~l~l l li
C4
Record
Deleted
y
49
EMPLOYEE
SubMenu
4. 1. General Employee
4.2.Password
Select Your
Choice
50
GENERAL EMPLOYEE
4.1
4.1.1.Add
4.1.2.Search
4.1.3.Delete
4.1.4.Update
4.1.5.Close
Select your
choice
y
Fill
Employee
Information
N
Press
NAVIGATOR
button to select
Employee
Click SAVE button
N
Click DELETE
Employee
is Saved
Click Navigator
Button
Click UPDATE
Click SAVE Button
Are you
sure to
delete?
Record is
deleted
Fill new
Information
51
CREATING ,CHAINGING .DELETING PASSWORD
PASSWORD SUBMENU
4.2.1.lnsert
4.2.2.Remove
4.2.3.Change Password
4.2.4.Close
y
N
Are you sure?
y
N
Click ok Button
Click cancel
button
N
y
Click ok Button
N
Click cancel
button
I
REMOVE CURRENT USER
y
User is
deleted
I
I
I
I
I
I
I
53
----------~--
-
,--------------------------------
CHANGING PASSWORD FOR CURRENT USER
4.2.3
Choose
user from
the list
Do you
want to
chanqe
password?
y
Answer is yes?
N
>----------~
Enter new
password
twice
y
N
Click ok button
Click cancel
button
54
SEARCHING PROCESS
5
Submenu
5.1.Customer
5.2.Employee
5.3.Product
5.4.Supplier
5.6.0rder
Select your
Choice.
55
EMPLOYEE SEARCHING
I
I
I
5.2.1.Name
5.2.2.Sumame
5.2.3. Name&Surname
5.2.4.Job Status
Select your
choice.
y
Enter Name
Choice=5.2.1
Please
enter Name
Click Search Button
N
N
y
Found?
Main
ClickOk button
N
5.2
Employee
can not be
found
56
EMPLOYEE SEARCHING BY SURNAME
Enter
Surname
y
Click Search Button
Surname
Empty?
Please
enter
Surname
N
y
Found?
N
Employee
can not be
found
5.2
57
I
I
I
EMPLOYEE SEARCHING
SURNAME
BY NAME
5.2.3
Enter Name
And Surname
I/
N
Name or "
~umameis empty?
'Y
I
Plea-s: Enter
Name and
Surname
'ti
i
Click Search
Button
I
'
'
y
Found?
y
N
Record can
not be
found
Click Close Button
58
-
-
·-
·-·
--
..
---
-----
PRODUCT SEARCHING
5.3
5.3.1.ProductlD
5.3.1.Name
Select your
choice
N
Enter ID
Choice=S.3.1
Click Search
y
N
CLOSE
y
Main
Fount
PRODUCT SEARCH BY
NAME
Enter Name
y
Click Search
Can not
Fount
lL_
61
J
SUPPLIER SEARCHING
5.4
5.4.1.SupplierlD
5.4.2.Name
Select your
choice
y
N
Choice=S.4.1
y
Enter ID
Click Search
L
y
N
EXIT
Can not
Fount
62
SUPPLIER SEARCH BY NAME
Enter Name
Click Search
Can not
Fount
EXIT
y
63
ORDER SEARCHING
Enter ID
Click Search
N
l;nfe..(
ID
64
--------~~
REPORTS
Bti!2lD.
6.1. Customer
6.2.Employee
6.3.Supplier
6.4.Profrt
6.5.Sales
6.6.Payment
6.7.Sold Product
6.8.Stock
6.9.Bill
Select your choice
Customer
Reports
CUSTOMER
REPORTS
N
CLOSE
65
C5
N
66
EMPLOYEE REPORTS
6.2
EMPLOYEE
EMPLOYEE
REPORTS
CUSTOMER
REPORTS
N
CLOSE
61
SUPPLIER REPORTS
6.3
SUPPLIER
SUPPLIER
REPORTS
SUPPLIER
REPORTS
N
N
6.2
CLOSE
68
PROFIT REPORTS
6.4
PROFIT
PROFIT
REPORTS
PROFIT
REPORTS
N
N
6.2
CLOSE
Main
I
r
69
SALES REPORTS
6.5
SALES
SALES
REPORTS
SALES REPORTS
N
6.5
CLOSE
70
PAYMENT REPORTS
6.6
PAYMENT
PAYMENT
REPORTS
PAYMENT
REPORTS
N
CLOSE
I
I
I
71
PURCHASED PRODUCT
6.7
PURCHASED
PRODUCT
PURCHASED
PRODUCT
y
PURCHASED
PRODUCT
N
CLOSE
Main
72
ORDERED PRODUCT
6.8
ORDER.ED
PRODUCT
ORDERED
PRODUCT
ORDERED
PRODUCT
N
6.8
CLOSE
73
STOCK REPORTS
6.9
STOCK
REPORTS
STOCK
REPORTS
STOCK
REPORTS
N
CLOSE
74
BILL REPORTS
6.10
BILL REPORTS
BILL
REPORTS
y
BILL REPORTS
N
CLOSE
75
PRODUCT COST
6.11
PRODUCT COST
PRODUCT
COST
PRODUCT COST
N
N
CLOSE
76
~. • ---~;:; ;f;i~l~~~~li
••••
I
I
I
I
6
ABOUT MENU
~
ABOUT MENU
1.Program
2.Programmer
I
I
I
-:..
y
'N
About
Program
y
y
Click return button
N
About
Programmer
y
ClickRetum
button
77
Help
y
Click Return
button
Main
78
USER GUIDELINES
To run and use the WHITE GOODS AND ELECTRONIC information
system, the following steps should be done:
79
Insert cd ofthe program in the CD-ROM then click My Computer on the
desktom.
80
In the "My Computer" window click on the CD Drive(E:) option to open ed.
On the opened window click setup option to start installation wizard.
Installation is started.
81
The user shoul click OK button to setup.
82
The user can identfy a different destination to install the program.To change the
different destination click change directory button.
In this step the user should wait some minutes while program installing.It spends
few minutes according to the program size.
After completed the installation enter OK button.
83
ilJ
(ii
Ulead VideoStudio 7
Q
Yahoo! Mail
-
Windows Katalogu
Yahoo!
•
Yahoo! Messenger
MSN Messenger 7 .0
Windows Update
Im) EngKsh Fast
•
•
•
•
~
-
•
Oyunlar
@I
QSound
ii
TOSHIBA
Microsoft Visual Basic 6.
•
•
•
•
~
Microsoft Office Tools
ifj
Webteh
~
Microsoft Visio
fmfj
Cyberlink PowerDVD
[ii Kyodai Mahjongg
fl!
•
•
Macromedia
in Patient Observation System
iii':I
G:l
•
Crystal Reports Tools
•
•
Crystal Reports
W:ne
Goods And Electronic Sales
~jj
Microsoft Office Word 2
Not Defteri
,~,
Microsoft 1/isio
~
'WWinamp
B Windows Media Player
.,S
Windows Messenger
I).
Windows Movie Maker
i!J
DriverGuide Toolkit
ill
Hex Workshop 4.2
•
Paint
When the program is opened firstly the user name and password will be
wanted.If the user enter wrong name or oassword the program will give three
chance to enter the program.The admin users and client users are different.They
can see different menus.Admins can see all menus but the client users can see
some menus whic admins allow them.
84
MAIN MENU
In main menu, there are ten processes.These are Customer, Product,
Payment, Password, Employee,Searching,Reports, About, Help and Exit. If user
wants to terminate the program, Exit should be clicked. Other processes are as
follows: ( .See-
;::;~pre- :l)
1. Customer Menu
When Customer menu is selected several options are shown under the
Customer. In this process the system gets
the general information of the Customer.Such as Name,address etc.
Here we can add,delete and update the cutomer information.This menu
is used for only new Customers.If you try to enter current customer the
program will show you a message about the available Customer.(ssie.·Fi':J"fe:))
2.Product Menu
In this process the system make all the operations
about product.It is very important process of the system so it requires more
attention and spent more time to design.
Products process has four submenus:
2.1-)Searching:When the customer came to buy a product first the system
should search this product available or not.The searching process has two
sub menu.Customer and Product.
2.1.l)Customer: When customer comes to buy or order product
85
the user should searc the customer is he/she available or not.if available
user make the operation.If not,the user first add the customer .Searching
can be done by name,sumame or id. ( S •.. .,. Fi3uf<-- '-1 )
2.l.2)Product: When a customer comes to buy a product or
order the user should search this product is it available or not.if the
product not available the user can not sell or oreder the product.
Product search can be done by name or ProductID. ( S ._._. Fi3ur e: 5)
2.2-)0rders: In this process the customer can order a product without buying
at this time.System holds order information in the Order Table.
System gets order information about produst and customer
The employee has to enter his/her name when he/she gets order.
Because if there is any problem occures,it will be easy to solve it
by knowing which employee got this order.The system can add,delete
and update Order information,too.But generally user shoul not
delete the Order. ( Fijur~ 6/)
2.3-)Selling:In this process the customer can buy a product which
he/she ordered before.Also the customer can buy a product without
ordering before.When the compay sell a product the selled money adds
as Profit.After selling process the system has to give bill to customer.
Also after selling process the sold product should be decreased from the
stock.The customers can pay by cash or by credit.If credit payment is
selected the user shoul prepare a regular paymentsheet for customer.
And customer should pay this evry month. (Fi3ure
r)
2.4-)Purchasing:ln this process system buys product from the vendors.
86
The Vendor/supplier information also gets in this process.Here we can add new
suppliers,delete or update,too.The purchasing and selling prices are different
from each other.To get profit.In purchasing process you can add new supplier.
When you enter the productlD the supplier information is automaticly shown in
thescreen.lf you want to update supplier information you can do this in
purchasing process. ( F,3vre. 6.,i)
3-)Payment Menu:Here the payment processes are done by the users or
admins.Some part of this process can be done only by Admin users.
It has 2 Submenu:
3.1-)Credit Payments: When the customers buy products by credit they
should come and pay tehir credits month to month.So this process is used by the
system.When the customer pay his/her loan/debt the systemn decreased his/her
loan from the account.After this process a bill is given to customer to prove
he/she pay.The count of next payments are shown on the screen in the Credit
Payment process. ( 5e.e- Fi3ure ~)
3.2-)Payment Methods: In this process the payment methods are
determined for company.This can be done by using managers directives.For
example now the company accept credit card,cash and check.Maybe in future
the company can be accept selling by Credit.In this situation the selling by credit
should be add to the Payment Methods.This information is used when a
customer buys a product from the company.And the admin can add new
payment methods to the system. ( {:; '.y.1r e: f o)
87
4-)Employee Menu:
Here all the employee processes are done. ( See..
f:,jure. f,2,J
It has two submenu :
4.1-)General Employee:When a new employee comes to company her/his
information is add here.Such as name,sumame,address,title etc.By using
managers' directives an employee can be add or can be delete from the
system in this process.And the information of the employee can be update.
4.2-)Password :To protect the system we need some security
operations.Normal users can not do the admins' job.So the system identify the
users as admins and normal users.So thje system give password and user names
for users.The users can add,delete or change their usemames and passwords in
this process.Only Admin users can open this menu.if admin wants to add a new
User he/she should enter insert button and fill the blanks.Then should press ok
button.If he/she want to delete a user he/she should select a user from the list
and click delete button.The user can change his/her current password.if he/she
wants he/she should press change button and should enter new password then
click OK button. ( F i~vre... t":>)
5-)Searching Menu: Here all the searchin process are done.As we know
searching is very important for a system to be fast and to find easily what we
want.It save time,too.
It has five submenu:
5.1-)0rder searching: When the worker wants to find any order to make
any changes on it he/she can use this submenu.This process linked him/her
88
directly to the Orders submenu.Order searching can be done by Orderld and
order Date.If user select by orderid he/she should enter the order id and press
Search button.if order is available user can show.if order is not available the
System show a message than can not be found the order.
If user select order by date he/ she should eneter a date and press search button. ( F,5ure t<J}
5.2-)Customer Searching Submenu: It provides to search any customer
for some purpoces,such as to get information about a customer or to update the
information of customer.So it joins the user to the customer table.If a user
wannts to search a customer he/she can search by name,sumame,name and
surname and customerid.Then he/she shoul press search button.if record is
available he/she can show if not the systemwill show a message that the person
can not be available. ( See.- Fi<Jltre IS)
5.3-)Product Searching Submenu: It also provide users easy access to the
products to get information or make some changes on them. This joined the user
directly to the proucts table,too.So the user can easyly update or delete a product
by using this subprocess.Products can be searched by name and id.When user
wants to search by name he/she should select search by name and enter the name
then press Search button.if the product is not available the message will shown
on the screen. ( F=/3t1re-
t1-)
5.4-)Supplier Searching Submenu: This process provides to access a
supplier information by joining directly to the suppliers process or table.So the
user can easily make changes on suppliers' information or can delete.Supplier
searching can be done by id or company name.User should select his/her choice
89
enter the data then press Search button.if available user can see.ifuser wants to
exit program should enter exit button. ( Fi:!Jllf~ lb)
5.5-)Employee Searching: It provides to search any employee for some
purpoces,such as to get information about a employee and to show the
performance or to update the information of customer.So it joins the
user to the employee table.Employee search can be done by
name,sumame,name and sumame,employeeid and Job sattaus.User shoul select
her/hischoice and then clikc search button.
(f/31.He I b)
6-)Reporting Process:is used only by the manager (admin user) of the
bookstore. This process satisfy getting different report about the
processes
There are many type of reports;
6. l.Customer
(Fity.1ce.. ~)
6. 2.Bill Reports (F,5ure.
.it-)
6. 3 .Payments Reports
6. 4.Supplier Reports
6. 5.Sales Report
6. 6.Stock Report (F;~ufe..~/,I}
6. 7 .Expense-Revenue Report ( Fi :ftfe..-
'J..,v
6. 8.Employee Reports
6. 9. Ordered Products Reports ( F 13 ar e, 2-, ':,)
6.1 O.Product Cost Report.
90
Customer Reports satisfy a report to the manager to
see the information of customers .
Bill report satisfy a report to manager to see information of bill
such as which products are purchased with this bill and how much is
paid for them.
Products Cost report satisfy a report to the manager to see the
information that which product is purchased and what is its cost.
Supplier report satisfy a report to the manager to
see the information of its supplier that is purchased
product.
Sales Report satisfy a report to the manager to see the information
of sold product in a date interval and what price they sold.
Stock report satisfy a report to the manager to see the information
of product that is the under the stock level. And according to this
report needed products can be purchased.
Expense-revenue report satisfy a report to the manager to see the
91
information of how many book is purchased and what are their cost
and what total amount is getted in a given date interval.
Employee Reports.It satisfy the employee reports for the managers.
By using these reports the managers can show the weaknesses or strengths of
their employees and managaers can know ehich employee do they need in the
future.
Ordered Products Reports. It provides to managers to show details of
Ordered Products.By using this information they can decide which product they
need to buy from suppliers or which product is more preferable.
Payments Reports: By using this report managers can see which customer
regularly pay his/her debt or which customer do not pay r
regularly.And they can decide is the selling by credit profitable or not.
7. About
About option on the main menu has two option: About Program and
About Programmer. When About Programmer option on the about option is
_9licked, ABOUT PROGRAMMER window is opened. This section gives
information about the author of the program.
92
When About Program option on the about option is clicked, ABOUT
PROGRAM window is opened. This section gives information about the
program.
8)Help
Help section gives detailed information about the program.
9)Exit:
When the user wants to exitthe program he/she shoul press Exit button.
The program will ask 'Are you sure to exit'if answer will be yes the program
will terminated.if answer will be no the user will be in the mainmenu.
COMMONLY USED BUTTONS
"SA VE" Button:
This button is used to save records to database.
"SEARCH" Button:
This button is used to make search about a given data such as Book name,
author name, publisher name etc.
"CLOSE" Button:
This button is used to close window that is currently open after the
process with that window is finished and return back to the previous window
that is the main page for each user type.
Instead of clicking on this button, the user can click on "X" sign at the top
of left of the window to close the window and return to previous one.
AN EXTRA EXPLANATION
93
As entering records "1" should 't be used all entries should be done with "i".
Also "~,il,9,o"letters should not be used instead of these letters use"s,u,c,o".
When Report window is shown on the screen, if user want to print it, he I she
print to print icon at the top of page and can make printer set up that as using
another icon (printer set up icon) on the top of page. Also user can save the
report with in different types such as word, pdf,excel document type. To do this
export button is clicked on the top of the page.
APPENDIX 1
94
SCREEN OUTPUTS
Figure 1
95
Figure 2
96
Figure 3
97
Figure 4
Figure 5
98
Figure 6, I
Figure 6. JJ
99
Figure 7
100
Figure 8
101
Figure 9
Figure 10
102
Figure 11
103
Figure 12
104
105
Figure 14
Figure 15
106
Figure 16
Figure 17
107
Figure 18
Figure 19
108
CUSTOMER REPORTS
02.12.2005
Fax
Gender
(__) __ Fmale
a fag
Surname
agayeva
Company
microsoft
Address ~
kucukkay gime
Phone
1
2
a fag
agayeva
marmara
nisantesi istanb
02124567
021267
3
Tom
Cruse
Cinema.
HGHJ
Losan
00167457
001654
ID
Name
(_
__ )
-
B irtliD a re M aritalStatu
_ _!__ ! _
Job
Progra
Figure 20 '
109
02.12.2005
PROFIT REPORT
ProductlD
100
101
104
103
101
101
103
102
104
108
108
104
IOI
101
IOI
101
100
104
IOI
IOI
100
100
SeWn~rice
0,01 TL
O,Ql TL
0,60 TL
0,15 TL
0,01 TL
O,Ql TL
0,15 TL
0,Q2 TL
0,55 TL
0,55TL
0,55 TL
0,55 TL
0,01 TL
O,Ql TL
0,01 TL
O,Ql TL
O,Ql TL
0,60TL
0,01 TL
0,Ql TL
0,01 TL
O,Ql TL
SellQuant ii!
5
2
1
1
3
1
1
1
2
1
1
1
1
2
2
2
2
I
1
2
2
1
Profit
0,Q3 TL
0,Q2 TL
0,70 TL
0,17 TL
0,Q2 TL
0,01 TL
0,17 TL
O,Q3 TL
1,21 TL
0,55 TL
0,52 TL
0,52 TL
0,00 TL
0,01 TL
0,01 TL
0,01 TL
0,01 TL
0,54 TL
0,01 TL
0,01 TL
0,01 TL
0,01 TL
Di!co:imt
3
2
4
5
4
2
5
5
10
10
5
5
10
10
10
10
5
10
5
10
10
10
Figure 21
02.12.2005
STOCK REPORTS
SueComean)'.Name
ProdutID
ProdutNune
Beko
Ulli1JlnStock
100
101
102
104
108
Utu
Camasir mak
pc
laptop
105
2
107
pda
109
bilgisayar
1.000
103
106
Bulasik mak
camasir m akinasi
1.000
1.000
tv
50
45
200
5.000
5.000
Bo she
•••I
3
ff
300
Samsung
Sony
110
~,
Figure 8
101
Figure 9
Figure 10
102
Figure 11
103
Figure 12
104
105
Figure 14
Figure 15
106
Figure 16
Figure 17
107
Figure 18
Figure 19
108
CUSTOMER REPORTS
02.12.2005
Fax
Gender
(__) __ Fmale
a fag
Surname
agayeva
Company
microsoft
Address ~
kucukkay gime
Phone
1
2
a fag
agayeva
marmara
nisantesi istanb
02124567
021267
3
Tom
Cruse
Cinema.
HGHJ
Losan
00167457
001654
ID
Name
(_
__ )
-
B irtliD a re M aritalStatu
_ _!__ ! _
Job
Progra
Figure 20 '
109
02.12.2005
PROFIT REPORT
ProductlD
100
101
104
103
101
101
103
102
104
108
108
104
IOI
101
IOI
101
100
104
IOI
IOI
100
100
SeWn~rice
0,01 TL
O,Ql TL
0,60 TL
0,15 TL
0,01 TL
O,Ql TL
0,15 TL
0,Q2 TL
0,55 TL
0,55TL
0,55 TL
0,55 TL
0,01 TL
O,Ql TL
0,01 TL
O,Ql TL
O,Ql TL
0,60TL
0,01 TL
0,Ql TL
0,01 TL
O,Ql TL
SellQuant ii!
5
2
1
1
3
1
1
1
2
1
1
1
1
2
2
2
2
I
1
2
2
1
Profit
0,Q3 TL
0,Q2 TL
0,70 TL
0,17 TL
0,Q2 TL
0,01 TL
0,17 TL
O,Q3 TL
1,21 TL
0,55 TL
0,52 TL
0,52 TL
0,00 TL
0,01 TL
0,01 TL
0,01 TL
0,01 TL
0,54 TL
0,01 TL
0,01 TL
0,01 TL
0,01 TL
Di!co:imt
3
2
4
5
4
2
5
5
10
10
5
5
10
10
10
10
5
10
5
10
10
10
Figure 21
02.12.2005
STOCK REPORTS
SueComean)'.Name
ProdutID
ProdutNune
Beko
Ulli1JlnStock
100
101
102
104
108
Utu
Camasir mak
pc
laptop
105
2
107
pda
109
bilgisayar
1.000
103
106
Bulasik mak
camasir m akinasi
1.000
1.000
tv
50
45
200
5.000
5.000
Bo she
•••I
3
ff
300
Samsung
Sony
110
~,
BILL REPORTS
Date
02.12.2005
lilm.
Ol.12.200S
01.12.2005
3
01.12.2oos
3,00
~
~
fatih
kisapannak
45
a fag
agayeva
142
etibar
elem
6500
Amount
02.12.2005
02122005
1
02.12.2085
--1,00
JO. ll.208S
30 11.2005
2
JO.ll.200S
2,00
Grand Total:
6,00
Figure 22
111
ORDERS REPORTS
02.12.2005
CustomerIDOrderID EmphyeeID OrderDa.te
7,00 I
RequiredDate Sh;i,pedDate
FreightCost
3
2
0,00 TL
1
I
0,00 TL
21
I
0,00 TL
30
I
0,00 TL
53
I
0,00 TL
66
2
0,00 TL
73
2
0,00 TL
253,00
10,00
EmployeeName
0,01 TI.
Figure 23
112
Figure 24
113
REFERENCES
13 6.0 Pro", KARAGULLE Ihsan, PALA Zeydin, Turkmen Kitabevi,2002
sual Basic 6" ,Deitel & Deitel NIETO,Prentice Hall, 1999
cess 2002 Programming",Peter NERTON & Virginia ANDERSEN,Peter
cess 2002 VBA Handbook",Susan NOV ALIS & Dana JONES,Sybex,2001
em Programming",John J.DONOVAN,McGraw-Hill
Kogushka,1994
em Analyse & Design" ,Krendall & Kendall,Prentice Hall, 1994
em Analyse And Design",D.R Jeffers &M.J.Lawrence,Prentice Hall,1984
;t,·.vbasicmaster.com
·.vbsourcecode.com
)
APPEND1X2
SOURCE CODES
116
Private Sub cmdOk _Click()
"UserName="' & txtUserName & ""'
dataPass.Recordset.FindFirst
If dataPass.Recordset("UserName")
<> txtUserName Then
1 user name . . . . . . . . . . " , , "L ogm
· "
M sg B ox "In va lid
cmdOk.Default = False
txtUserName.SetFocus
txtUserName.SelStart = 0
txtUserName.SelLength
= Len(txtUserName)
Exit Sub
End If
If dataPass.Recordset("Password")
<> txtPassword Then
a=a+l
If a= 3 Then
MsgBox "Don't be Over Smart", , "Login"
End
End If
MsgBox "Invalid Password, try again!", , "Login"
txtPassword. SetF ocus
SendKeys "{Home}+{End}"
Else
Id= txtUserName.Text
Adodcl.RecordSource
="Select* FROM Password Where UserName="'
Id & ""'
Adodc I .Refresh
MDIForml .Show
117
LoginSucceeded
=
True
l
If Adodcl.Recordset![usemame] <> "Admin" Then
MDIForml.Show
End If
Me.Hide
End If
End Sub
Private Sub Commandl _Click()
Unload Me
End Sub
Private Sub Form_Load()
Commandl.Cancel
=
True
End Sub
Private Sub txtPassword_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And KeyAscii = Ase(vbCr) Then
KeyAscii = 0
cmdOk.Default = True
End If
End Sub
Private Sub txtUserName_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And KeyAscii = Ase(vbCr) Then
118
KeyAscii = 0
txtPassword. SetFocus
End If
End Sub
Private Sub txtUserName_LostFocus()
txtUserName.Text = UCase(Left(txtUserName.Text, 1)) &
Mid(txtUserName.Text, 2)
End Sub
MAIN MENU
Private Sub MDIForm_Load()
End Sub
Private Sub mnuCPay_ Click()
Forml l.Show
End Sub
Private Sub mnuCSearch_ Click()
Form22.Show
End Sub
Private Sub mnuCusSearch_Click()
119
Form22.Show
End Sub
Private Sub mnuCust_ Click()
Forml3.Show
End Sub
Private Sub mnuEmpP _ Click()
Forml 8.Show
End Sub
Private Sub mnuEmpS _ Click()
Forml O.Show
End Sub
Private Sub mnuExit_ Click()
Dim ms As String
ms= "Are you sure?"
IfMsgBox(ms, vbQuestion + vbYesNo + vbDefaultButtonl)
= vb Yes Then
Unload Me
Else
Exit Sub
End If
End Sub
Private Sub mnuHelp _ Click()
120
Form9.Show
End Sub
Private Sub mnuOrder _ Click()
Forml.Show
End Sub
Private Sub mnuOrdRep _ Click()
Cr9.DataFiles(O)
=
App.Path & "\baglidb.MDB"
Cr9.WindowState = crptMaximized
Cr9.PageZoom (100)
Cr9 .Action = 1
End Sub
Private Sub mnuOSearch_ Click()
Form15.Show
End Sub
Private Sub mnuPass_ Click()
Form20.Show
End Sub
Private Sub mnuPayMet_ Click()
Form14.Show
End Sub
Cr5.WindowState = crptMaximized
121
Cr5.PageZoom (100)
Private Sub mnuProdS _ Click()
Form26.Show
End Sub
Private Sub mnuProgram _ Click()
Form23.Show
End Sub
Private Sub mnuProgrammer _ Click()
Form25.Show
End Sub
Private Sub mnuPSearch _ Click()
Form26.Show
End Sub
Private Sub mnuPurc _ Click()
Form 19. Show
End Sub
Private Sub mnuS _ Click()
Form2.Show
End Sub
122
Private Sub mnuSupp _ Click()
Form5.Show
End Sub
CUSTOMER FROM
Private Sub Combo 1 _ Click()
TextlO.Text = Combol.Text
End Sub
Private Sub ·Combo2_ Change()
Textl 1.Text = Combol.Text
End Sub
Private Sub Command!_ Click()
'it allow us to enter new record to db
'datal .Recordset.MoveLast
Datal .Recordset.AddNew
'Text2.SetFocus
' Datal .Recordset.MoveLast
'Datal .Recordset.AddNew
' Adodc l .Recordset.MoveLast
'Adodc l .Recordset.AddNew
123
Text5.Text = ""
'Combol.Text = ""
End Sub
Private Sub Command IO_ Click()
If Textl.Enabled
=
False Then
If Not Data! .Recordset.EOF Then
Data l .Recordset.MoveLast
Else
MsgBox "This is the last record"
End If
End If
End Sub
Private Sub Command! !_Click()
Form22.Show
End Sub
Private Sub Command2 _ Click()
'Adodcl .Recordset.Save
'Adodc I .Refresh
On Error GoTo err
Data! .Recordset. Update
Data I .Recordset.MoveLast
'Data l .Recordset.MoveLast
'Data I .Records et. Update
124
err:
If err.Number= 3426 Then Exit Sub 'MsgBox err.Description + " " + err.Source
End Sub
Private Sub Command3 _ Click()
Data 1.Recordset. Update
If Data 1.Recordset.EditMode <> dbEditAdd Then
Data 1.Recordset.MoveLast
End If
'IfText2.Enabled
= False Then
'Text9. Text = MaskEdBox3. Text
Text7.Text = MaskEdBoxl.Text
Text8. Text = MaskEdBox2. Text
MaskEdBoxl.Visible
= True
MaskEdBox2. Visible = True
'MaskEdBox3. Visible = True
Text7.Visible = False
Text8.Visible = False
Text9.Visible = False
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
125
Text8.Enabled
True
=
Text9.Enabled = True
Textl O.Enabled
=
Combo I .Enabled
True
=
True
RichTextBoxl.Enabled
= True
'End If
End Sub
Private Sub Command4 _ Click()
Form22.Show
End Sub
Private Sub Command5 _ Click()
Dim m As String
m = "Are you sure to delete the record?"
IfMsgBox(m, vbQuestion + vbYesNo + vbDefaultButton2)
=
vb Yes Then
Data 1.Recordset.Delete
MsgBox "Customer is deleted"
Datal .Recordset.MoveNext
If Datal .Recordset.EOF Then
Data l .Recordset.MoveLast
End If
126
End If
End Sub
Private Sub Command6 _ Click()
Unload Me
End Sub
Private Sub Command?_ Click()
If Textl .Enabled= False Then
If Not Datal .Recordset.BOF Then
Data 1.Recordset.MoveFirst
Else
MsgBox "This is the first record"
End If
End If
End Sub
Private Sub Command8 _ Click()
If Textl .Enabled= False Then
IfDatal.Recordset.AbsolutePosition
> 1 Then
Data 1.Recordset.MovePrevious
Else
MsgBox "This is the first record"
End If
127
End If
End Sub
Private Sub Command9 _ Click()
On Error GoTo err
IfTextl.Enabled = False Then
If Datal .Recordset.AbsolutePosition
< Datal .Recordset.RecordCount Then
Datal .Recordset.MoveNext
Else
MsgBox "This is the last record"
End If
End If
err:
If err.Number= 3021 Then MsgBox "This is the last record"
End Sub
Private Sub Form_Load()
Timer I .Enabled = True
Timer I .Interval = 1000
Label13.Caption = Date
End Sub
128
Private Sub MaskEdBoxl_Change()
Text7.Text = MaskEdBoxl.Text
End Sub
Private Sub MaskEdBox2_Change()
Text8.Text = MaskEdBox2. Text
End Sub
Private Sub MaskEdBox4_ Change()
Text9.Text = MaskEdBox4.Text
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
IfKeyAscii > Asc("O")And KeyAscii <= Asc("9") Then
KeyAscii = 0
Text2.SetFocus
Else
KeyAscii = Asc(LCase(Chr(KeyAscii)))
End If
End Sub
'Private Sub Timer 1 _Timer()
'Label13.Caption = Date
'End Sub
Private Sub Text3_Change()
129
End Sub
Private Sub Text3_KeyPress(KeyAscii
As Integer)
If Key Ascii > Asc("O") And Key Ascii <= Asc("9") Then
KeyAscii
=
0
Text2. SetF ocus
Else
KeyAscii
=
Asc(LCase(Chr(KeyAscii)))
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii
As Integer)
IfKeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii
=
0
Text2.SetFocus
Else
Key Ascii
=
Asc(LCase( Chr(Key Ascii)))
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii
As Integer)
IfKeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii
=
0
Text2. SetF ocus
Else
Key Ascii = Asc(LCase( Chr(Key Ascii)))
End If
End Sub
130
PRODUCT PROCESS
Private Sub Command I_ Click()
'Adodc I .Refresh
'Adodc I .Recordset.MoveLast
Adodc I .Recordset.AddNew
'Adodc I .Refresh
'Adodc2.Recordset.AddNew
End Sub
Private Sub CommandI_LostFocus()
End Sub
Private Sub CommandIO_Click()
If Adodc I .Recordset.AbsolutePosition
< Adodc I .Recordset.RecordCount Then
Adodc I .Recordset.MoveNext
Else
MsgBox "last record"
End If
End Sub
Private Sub Command I I_ Click()
If Not Adodc I .Recordset.BOF Then
Adodc I .Recordset.MoveF irst
Else
MsgBox "first record"
131
End If
End Sub
Private Sub Command12_Click()
If Not Adodcl.Recordset.EOF
Then
Adodc l .Recordset.MoveLast
Else
MsgBox "last record"
End If
End Sub
Private Sub Command2_ Click()
Dim ms As String
ms= "Are you sure to delete?"
IfMsgBox(ms, vbQuestion + vbYesNo + vbDefaultButton2) = vb Yes Then
Adodc l .Recordset.Delete
Adodc l .Recordset.MoveNext
Adodc2.Recordset.Delete
Adodc2.Recordset.MoveNext
If Adodc 1.Recordset.EOF Then
Adodc l .Recordset.MoveLast
End If
End If
End Sub
Private Sub Command5 _ Click()
frmOrderSell. Show
132
End Sub
Private Sub Command6 _ Click()
Unload Me
End Sub
Private Sub Command?_ Click()
'Form5.Show
End Sub
Private Sub Command8 _ Click()
Adodc 1.Recordset. Save
Adodc I .Refresh
Adodc 1.Recordset.MoveLast
' Adodc2.Recordset.Add
'Adodc2.Recordset.Save
' Adodc2 .Refresh
' Adodc2.Recordset.MoveLast
Private Sub Command9 _ Click()
Adodc l .Recordset.AbsolutePosition
> 1 Then
133
Adodc 1.Recordset.MovePrevious
Else
MsgBox "first record"
End If
End Sub
Private Sub Form_Load()
Saate gore mesaj vermek
saat=Now()
isaret = 0
Text8 = Format(saat, "hh")
If Text8 = "00" Then
Text8 = "O"
End If
For gunduz = 6 To 12
If Text8 = gunduz And isaret = 0 Then
MsgBox "Goodmoming"
isaret = 1
End If
For ogle= 12 To 17
If Text8 = gunduz And isaret = 0 Then
MsgBox "Goodaftemoon"
isaret = 1
End If
For aksam = 17 To 24
If Text8 = aksam And isaret = 0 Then
MsgBox "Goodevening"
isaret = 1
End If
134
For gece
=
0 To 6
IfText8
= gece And isaret = 0 Then
MsgBox "Good Night"
isaret = 1
End If
ext gece
ext aksam
ext ogle
ext gunduz
Timer2.Enabled
=
True
Timer2.Interval = 1
'ESC tusuna basinca Cancel tusu aktif olsun
Command4.Cancel = True
'Entere basinca ADD aktif olsun
Command8.Default
=
True
End Sub
Private Sub MaskEdBoxS _ Change()
End Sub
Private Sub MaskEdBoxS_KeyPress(KeyAscii
As Integer)
IfKeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii
=
0
135
Mask.EdBox5 .SetF ocus
Else
KeyAscii = Asc(LCase(Chr(KeyAscii)))
End If
End Sub
Private Sub Mask.EdBoxl _Change()
Textl 7. Text = Mask.EdBoxl .Text
End Sub
Private Sub Mask.EdBox2 _Change()
Textl 3. Text = Mask.EdBoxl. Text
End Sub
Private Sub Mask.EdBox3 _Change()
Textl4.Text = Mask.EdBoxl .Text
End Sub
Private Sub Mask.EdBox4 _Change()
Textl 1. Text = Mask.EdBoxl. Text
End Sub
Private Sub Optionl _Click()
Textl6.Text
=
Optionl.Caption
End Sub
Private Sub Option2 _Click()
Textl6.Text = Option2.Caption
136
End Sub
Private Sub Textl_LostFocus()
'Dim temp(l) As String
'Call Module I .Find Order( temp())
Text2.Text
=
temp(l)
'Text3.Text = temp(2)
'Text7.Text
=
temp(2)
'Textl2.Text = temp(3)
End Sub
Private Sub TextlO_KeyPress(KeyAscii
As Integer)
If KeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii
=
0
Textl O. SetF ocus
Else
Key Ase ii
=
Asc(LCase( Chr(Key Ascii)))
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii
As Integer)
'If Key Ascii > Asc("O") And Key Ascii <= Asc("9") Then
' Key Ase ii = 0
' Text2.SetFocus
'Else
' KeyAscii = Asc(LCase(Chr(KeyAscii)))
'
Endlf
End Sub
137
ivate Sub Text2_LostFocus()
·
temp(l) As String
'all Module l .FindProductO( temp())
Text15.Text = temp(l)
'Text3.Text = temp(2)
'Text7.Text = temp(2)
'Text12.Text = temp(3)
dSub
ivate Sub Text4_LostFocus()
Dim temp(l To 3) As String
Call Module l .FindCustomerO( temp())
Text6.Text = temp(l)
'Text3.Text = temp(2)
Text7 .Text= temp(2)
Textl2.Text = temp(3)
Private Sub Text6_KeyPress(KeyAscii
As Integer)
IfKeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii = 0
Text6.SetFocus
Else
Key Ase ii = Asc(LCase( Chr(Key Ase ii)))
End If
End Sub
~ 138
Private Sub Text7 _KeyPress(KeyAscii As Integer)
If Key Ascii > Asc("O") And Key Ascii <= Asc("9") Then
KeyAscii
=
0
Text7.SetFocus
Else
Key Ase ii = Asc(LCase( Chr(Key Ase ii)))
End If
End Sub
Private Sub Text9 _ Change()
If KeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii
=
0
Text9. SetF ocus
Else
Key Ase ii = Asc(LCase( Chr(Key Ase ii)))
End If
End Sub
'Private Sub Timer I_ Timer()
'End Sub
'Forml.Caption
=
Right(Forml.Caption,
'Left(Forml.Caption,
Len(Forml.Caption)
1) & _'
- 1 )'
'End Sub
'Private Sub Timer2 _Timer()
139
117.Caption = Time
d Sub
ivate Sub Timer2_Timer()
End Sub
Private Sub Commandl_Click()
Dim a, tot
On Error GoTo err
If Label2.Visible = False And Text2.Visible = False Then
Data2.Recordset.Edit
Data2 .Recordset.Update
' Datal .Recordset.MoveLast
'Data l .Recordset.MoveLast
'If Data l .Recordset.EOF Then
Datal .Database.Execute "insert into
Products(ProductID,UnitslnStock,ProductName,PurchasePrice,PurchasedDate,S
upplierlD)" & _
"Values("' & Text4.Text & "',"' & Textl.Text & "' ,"' & Text6.Text & "',"' &
Text7.Text & "',"' & Text8.Text & "', "' & Text16.Text & "')"
Datal .Refresh
Data l .Recordset.MoveLast
'End If
'Data l .Recordset.AddNew
'Datal.Recordset![UnitslnStock]
=
Textl
'Datal .Recordset![ProductName] = Text6
'Datal .Recordset![PurchasePrice] = Text7
'Datal .Recordset![PurchasedDate] = Text8
140
' Datal .Recordset! [SupplierID] = Textl 6
' Datal .Recordset.Update
'Datal .Refresh
Exit Sub
End If
a= Datal .Recordset.Fields("UnitslnStock")
tot= Val(Text2.Text) + a
Text3.Text = tot
err:
If err.Number= 3426 Then
MsgBox err.Source+" "+ err.Description
Exit Sub
End If
Data l .Recordset.Edit
Datal .Recordset![ProductName] = Text6
Datal .Recordset![PurchasePrice] = Text7
Data l .Recordset![PurchasedDate] = Text8
Datal.Recordset![UnitslnStock] = Text3
Data l .Recordset.Update
'Data2.Recordset.Edit
'Data2.Recordset! [ProductID] = Textl 6
'Data2 .Recordset.Update
141
'Textl6.Text = Text4.Text
'Datal.Recordset![UnitslnStock]
= tot
End Sub
Private Sub Command2 _ Click()
Data2.Recordset.AddNew
'Text5.SetFocus
End Sub
Private Sub Command3 _ Click()
Dim mes As String
mes= "Are you sure to delete supplier information"
IfMsgBox(mes,
vbQuestion + vbYesNo + vbDefaultButton2) = vb Yes Then
Data2.Recordset.Delete
Data2.Recordset.MoveNext
If Data2.Recordset.EOF Then
Data2.Recordset.MoveLast
End If
End If
End Sub
142
Private Sub Command4 _ Click()
Data2.Recordset. Update
If Data2.Recordset.EditMode
<> dbEditAdd Then
Data2.Recordset.MoveLast
End If
Textl6.Text
=
TextS.Text
End Sub
Private Sub Commando , Click()
Data2. UpdateControls
IfData2.Recordset.EditMode
=
dbEditAdd Then
Data2 .Recordset. Cancel Update
End If
End Sub
Private Sub Command6 _ Click()
Unload Me
End Sub
Private Sub Command?_ Click()
'Data l .Recordset. Update
'If recordl .Recordset.EditMode <> dbEditAdd Then
'Data l .Recordset.MoveLast
'End If
End Sub
143
Private Sub DTPickerl_CallbackKeyDown(ByVal
KeyCode As Integer, ByVal
Shift As Integer, By Val CallbackF ield As String, CallbackDate As Date)
End Sub
Private Sub DTPickerl_Change()
End Sub
Private Sub dtl _ Change()
Text8.Text = DTl.Value
End Sub
Private Sub Form_Load()
Textl
= ""
Text6 =
""
Text7.Text =
Textl6
""
= ""
DTl.Value
=
Date
End Sub
Private Sub MaskEdBox2_Change()
Text12.Text = MaskEdBox2.Text
End Sub
Private Sub MaskEdBox3_ Change()
Textl3.Text
=
MaskEdBox3.Text
End Sub
144
Private Sub TextlO_KeyPress(KeyAscii
As Integer)
IfKeyAscii > Asc("O")And KeyAscii <= Asc("9") Then
KeyAscii = 0
Text2.SetFocus
Else
\
Key Ascii = Asc(LCase(Chr(KeyAscii)))
End If
End Sub
Private Sub Textl5 _KeyPress(KeyAscii As Integer)
IfKeyAscii > Asc("O")And KeyAscii <= Asc("9") Then
KeyAscii = 0
Text2. SetFocus
Else
Key Aseii = Asc(LCase(Chr(KeyAseii)))
End If
End Sub
Private Sub Text16_Change()
Dim temp(l To 7) As String
Call Module l .FindSupp(temp())
Text9.Text = temp(l)
Textl O.Text= temp(2)
Textl l.Text = temp(3)
Textl2.Text
=
temp(4)
Text13.Text = temp(S)
Textl~.Text
= temp(6)
Text15.Text = temp(7)
145
IfText16.Text =""Then
Text9.Text = ""
Exit Sub
Endlf
~
'IfText16.Text
<>""Then
'Adodcl.RecordSource
="SELECT*
FROM Suppliers where SupplierID="
& Text16.Text
'Adode I .Refresh
'Set Text9.DataSource = Adodcl
' Text9.DataField = "SupCompanyName"
'End If
End Sub
Private Sub Text4_LostFocus()
Dim temp(l To 5) As String
Call Modulel .FindProduct(temp())
Textl.Text = temp(l)
Textl6.Text = temp(2)
Text6.Text = temp(3)
Text7.Text = temp(4)
Text8.Text = temp(5)
If Text6.Text =""Then
Label2.Visible =z False
146
I
I
I
I
Text2.Visible = False
End If
End Sub
Private Sub Text5_ Change()
'Text16.Text = Text5.Text
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
IfKeyAscii > Asc("O")And KeyAscii <= Asc("9") Then
KeyAscii = 0
Text2.SetFocus
Else
KeyAscii = Asc(LCase(Chr(KeyAscii)))
End If
End Sub
Private Sub Checkl _ Click()
'Eger Tasima isteniyorsa 10 ytl ek para
If Checkl.Value
=
1 Then
'White good seciliise %20 KDV
IfOptionl.Value
True Then
=
* Val(Text2.Text) - Val(Textl.Text) *
Val(Text2.Text) * Val(Text5.Text) I 100 + Val(Textl.Text) * Val(Text2.Text) *
Text6.Text = Val(Textl.Text)
20/100+10
)
'Eger Electronik secili ise % 10
147
Else
* Val(Text2.Text) - Val(Textl.Text) *
Val(Text2.Text) * Val(Text5.Text) I 100 + Val(Textl.Text) * Val(Text2.Text) *
Text6.Text = Val(Textl.Text)
10 I 100 + 10
End If
Else
'Freight istenmiyor
Text6.Text = Val(Textl.Text)
Val(Text2.Text)
* Val(Text2.Text) - Val(Textl.Text) *
* Val(Text5.Text) I 100
End If
Text6 = Format(Text6, "###,###")
Text12.Text = 10#
End Sub
Private Sub Commandl_Click()
Dim b, tota
Data3 .Recordset! [FreightCost] = Text 12
Data3 .Recordset![ CustomerID] = Text 13
Data3.Recordset![EmployeeID] = Text9
b = Data2.Recordset.Fields("UnitslnStock")
tota = b - Val(Text2.Text)
Textl O.Text= tota
Data2 .Recordset.Bdit
148
Data2.Recordset![UnitslnStock]
=
'Data2.Recordset![Units0n0rder]
TextlO
=
Text2
Data2 .Recordset![ProductID] = Text3
Datal .Recordset.AddNew
' Datal .Recordset![OrderID] = Text4
Datal .Recordset![ProductID] = Text3
Datal .Recordset![SellingPrice] = Textl
Datal.Recordset![SellQuantity]
Datal.Recordset![Discount]
Datal.Recordset![Profit]
=
=
=
Text2
Text5
Text6
Datal .Recordset![OrderID] = Text4
Data2.Recordset.Update
Data3 .Recordset.Update
Data3 .Recordset.MoveLast
Data l .Recordset.Update
End Sub
Private Sub Command2_ Click()
Form3.Show
End Sub
Private Sub Command3_Click()
149
I
Dim b, tota
I
Data3.Recordset![FreightCost]
I
=
Text12
Data3 .Recordsetl [ CustomerID]
=
Text 13
Data3.Recordset![EmployeeID]
=
Text9
b
=
tota
Data2.Recordset.Fields("UnitslnStock")
=
b - Val(Text2.Text)
TextlO.Text = tota
Data2 .Records et.Edit
Data2.Recordset![UnitslnStock]
'Data2.Recordset![Units0n0rder]
Data2 .Records et! [ProductID]
TextlO
=
=
=
Text2
Text3
Datal .Recordset.AddNew
' Datal.Recordset! [OrderID]
=
Text4
Datal .Recordset! [ProductID] = Text3
Datal .Recordset! [SellingPrice] = Textl
Datal .Recordset! [Sell Quantity] = Text2
Data 1.Recordset ! [Discount]
Datal .Recordset! [Profit]
=
=
Text5
Text6
Datal .Recordset! [OrderID] = Text4
150
Data2 .Recordset. Update
Data3 .Records et. Update
Data3 .Recordset.MoveLast
Data l .Recordset. Update
Forml6.Show
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Command5 _ Click()
Form7.Show
End Sub
Private Sub Form_Activate()
Data3 .Recordset.AddNew
End Sub
Private Sub Form_Click()
'Entere basinca Invoice tusu aktif olsun
Command3 .Default
=
True
End Sub
151
Private Sub Optionl _ Click()
* Val(Text2.Text) - Val(Textl.Text) *
Val(Text2.Text) * Val(Text5.Text) I 100 + Val(Textl.Text) * Val(Text2.Text) *
Text6.Text = Val(Textl.Text)
20 I 100
End Sub
Private Sub Option2_Click()
* Val(Text2.Text) - Val(Textl.Text) *
Val(Text2.Text) * Val(Text5.Text) I 100 + Val(Textl.Text) * Val(Text2.Text) *
Text6.Text = Val(Textl.Text)
10 I 100
End Sub
Private Sub Textl _ Change()
Text6.Text = Val(Textl.Text)
Val(Text2.Text)
* Val(Text2.Text) - Val(Textl.Text) *
* Val(Text5.Text) I 100
End Sub
Private Sub Text13_LostFocus()
Dim temp(l To 2) As String
Call Module l .FindCustomer(temp())
Text14.Text = temp(l)
'Text3.Text = temp(2)
Textl5.Text
=
temp(2)
End Sub
Private Sub Text14_KeyPress(KeyAscii As Integer)
If KeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii = 0
152
Text2. SetF ocus
Else
Key Ascii = Asc(LCase( Chr(Key Ascii)))
End If
End Sub
Private Sub Text15_KeyPress(KeyAscii
As Integer)
fKeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii
=
0
Text2. SetF ocus
Else
Key Ascii
=
Asc(LCase( Chr(Key Ascii)))
End If
End Sub
Private Sub Text2 _ Change()
Text6.Text = Val(Textl.Text)
Val(Text2.Text)
* Val(Text2.Text)
* Val(Text5.Text)
- Val(Textl.Text)
*
I 100
End Sub
Private Sub Text3_LostFocus()
Dim tempt l To 2) As String
Call Module l .FindProductS( temp())
Text8.Text
= temp(l)
'Text3.Text
=
temp(2)
Textl LText= temp(2)
153
Private Sub Text5 _ Change()
Text6.Text
=
Val(Textl.Text)
* Val(Text2.Text) - Val(Textl.Text) *
al(Text2.Text) * Val(Text5.Text) I 100
End Sub
Private iPayments As Integer ' iPayments = no. of MONTHLY payments
Private Sub cmdAmortise_Click()
This sub populates the MSFlexgrid
On Error Resume Next ' to compensate for the error sometimes given in the
11 colour changing routine
Dim sCurrMonth As String 'for the Date column
Dim iDay, iMonth, iYear, iCountPay As Integer' 1st 3 are for the date
lumn, 4th is the loop counter
Dim dCurrBal, dCurrlnt, dCurrPrin, dEndBal, dCumint, dTotPaid As Double
eriod's starting loan balance, interest this period,
'principal paid this period, loan
ance at end of period,
'cumulative interest at end of
riod, total paid to date at end of period
'; respectively!
Dim s When As String 'the commencement date
Form16.MousePointer = vbHourglass' cpu busy
154
s When
=
dtpStart ' assign commencement date
iDay = Val(Left(sWhen, 2)) 'the day
iMonth = Val(Mid(sWhen, 4, 2))' the month
'iYear = Val(Right(sWhen, 2))' the year - latter 2 are required to increment
period
dTotPaid = txtResult.Text' assign monthly payment
dCurrBal = txtLoan.Text' assign loan balance for 1st period
'dCurrint
=
dCurrBal I 12
* (txtlnterest I 100)'
assign interest for the first
period
dCurrPrin = dTotPaid - dCurrlnt' assign principal paid for the first period
dEndBal = dCurrBal - dCurrPrin ' assign balance at end of the first period
dCumint = dCurrlnt ' assign cumulative interest for the first period
dTotPaid = txtResult.Text' assign running total paid for first period
With MSFlexGridl
.Rows = iPayments + 1 ' number of rows in the FlexGrid. + 1, to cater for
the header row
.TextMatrix(l, 2) = Format(dCurrBal, "Currency", 2) 'print current
balance,
'.TextMatrix(l, 3) = Format(dCurrint, "Currency", 2) 'current interest,
.TextMatrix(l, 3) = Format(dCurrPrin, "Currency", 2)' current principal,
.TextMatrix(l, 4) = Format(dEndBal, "Currency", 2) 'end balance,
'.TextMatrix(l, 6) = Format(dCumint, "Currency", 2) 'cumulative
interest, and
.TextMatrix(l, 5) = Format(dTotPaid, "Currency", 2) 'running total paid
End With
' for the first period.
155
' Remeber that the FlexGrid row and
column indices both begin at 0.
' So the current balance will print in the
3rd column from the left,
'the current interest will appear in the 4th,
and so on.
'the all-important loop
For iCountPay = 1 To iPayments' 1 to the number of rows
With MSFlexGridl
.TextMatrix(iCountPay, 0) = iCountPay' populates the No. of payments
column i.e. the first column on the left
If iMonth > 12 Then 'If we're past December, we revert
iMonth = 1
' back to January,
iYear = iYear + 1 'and add a year.
End If
.TextMatrix(iCountPay,
1) = Format(Val(iDay), "00") & _
"/" & Format(Val(iMonth),
"00") & "/" & Format(Val(iYear), "00")
' The above split line populates the 2nd column with the payment dates.
'I get the feeling I could have done this more simply ...
'Basically, I converted the bits of the month back to little strings,
' and concatenated them with slashes to form 1 big, lovely string.
iMonth = iMonth + 1 ' increment the month
If iCountPay > 1 Then ' the loop for the financial figures really begins
' from the 3rd row (1st row=headers, 2nd was the first
period,
' and was already populated above.
' starting balance for this period is read from ending balance from
previous period
156
dCurrBal
=
.TextMatrix(iCountPay - 1, 4)
' print the starting balance for this period
.TextMatrix(iCountPay, 2) = Format(dCup:Bal, "Currency", 2)
'multiply the starting balance by the interst rate (which is divided by
100 to provide a percentage)
'and divide by 12 to get the interest paid for this month.
dCurrlnt = .TextMatrix(iCountPay, 2) I 12
* (txtlnterest I 100)
' print the interest paid this period
.TextMatrix(iCountPay, 3) = Format(dCurrint, "Currency", 2)
' this periods principal paid is the monthly total minus the interest paid
dCurrPrin = txtResult - dCurrlnt
' print the principal paid for this period
.TextMatrix(iCountPay, 3) = Format(dCurrPrin, "Currency", 2)
' this periods end balance is the start balance minus principal paid this
period
dEndBal = dCurrBal - dCurrPrin
' print the end balance for this period
.TextMatrix(iCountPay, 4) = Format(dEndBal, "Currency", 2)
' cumulative interest for this period is the cumulative interst paid in the
last period
' plus interest paid this period
dCumint
=
.TextMatrix(iCountPay- 1, 6) + dCurrint
' print the cumulative interest for this period
.TextMatrix(iCountPay, 6) = Format(dCumint, "Currency", 2)
' the total paid to date this period is simply the monthly payment
' multiplied by the payment number
dTotPaid = .TextMatrix(l, 5) * iCountPay
' print the total paid at the end of this period
.TextMatrix(iCountPay, 5) = Format(dTotPaid, "Currency", 2)
157
I
End If
End With
Next iCountPay' increment the all-important loop
With MSFlexGridl
.ColWidth(O)= 640 ' Adjust the column widths
.ColWidth(l) = 1220 'in 'twips' .
. Co1Width(2)= 1700
.Co1Width(3)= 1400
.Co1Width(4)= 1400
.ColWidth(S) = 1700
.Co1Width(6)= 1700
.Co1Width(7)= 1700
Dimi
For i = 0 To 7
'All columns
.ColAlignment(i) = 3 'to be centrally aligned
Nexti
End With
'
Dim iCols As Integer
'
Do Until MSFlexGridl .Row= MSFlexGridl .Rows - 1
MSFlexGridl .Row= MSFlexGridl .Row+ 1
For C = 0 To MSFlexGridl .Cols - 1
MSFlexGridl .Col = C
MSFlexGridl .CellBackColor = &HCOFFCO
Next
MSFlexGridl .Row= MSFlexGridl .Row+ 1
'
Loop
158
'This section colours alternate rows, making the
'grid a little easier to read.
Dim iCols As Integer
'for each row (select by row first)
Do Until MSFlexGridl .Row= iPayments
' skip the header row & select the next.
' start the first row white,
' and increment
MSFlexGridl.Row
= MSFlexGridl.Row
+ 1
'for all columns (remember that the Columns index
'begins with 0, but that the .Col property starts at 1
' hence the - 1
For iCols = 0 To 7 'MSFlexGridl .Cols - 1
' select each column in tum, after having already
· ' selected the row above
MSFlexGridl .Col = iCols
' change the cell colour (light green, in this case)
MSFlexGridl .CellBackColor = &HCOFFCO
Next iCols
' next column, please
MSFlexGridl .Row= MSFlexGridl .Row+ 1
Loop
MSFlexGridl .Visible = True
cmdChart.Enabled = True
' show the grid
' show the chart button
Form16.MousePointer = vbNormal 'revert mouse pointer
End Sub
159
Private Sub cmdCalculate _ Click()
'This calculates the monthly payment
On Error GoTo BadData' If you forget to fill in a field
Dim dRate, dLoan, dMonthlyPayment As Double ' The rate, the principal, the
eventual result
' This is the monthly interest rate. The interest rate per
' period is required for VB's own 'Pmt' function.
'It's divided by 1200 (a) to get the monthly rate: 12; and
' (b) to get a percentage: 100
"dkate = txtlnterest.Text I 1200
' assign the principal
dLoan
=
txtLoan. Text
' calculate the ubiquitous iPayments variable, which
' is required in the 'Pmt' function, and helps determine
' the number of rows within the FlexGrid
iPayments = txtTerm '* 12
' The 'Pmt' function calculates the monthly payment
dMonthlyPayment = Pmt( dRate, iPayments, -dLoan)
' assign the result to the relevant text box and format
' it as currency to 2 decimal places
txtResult.Text
= Format(dMonthlyPayment, "Currency", 2)
' show the print amortisation schedule button
cmdAmortise.Enabled
=
True
' exit the sub, so the program doesn't continue on to
'the 'BadData' error-handling section
Exit Sub
160
' What can I say? I'm a lazy swine. I've used the routine for
'handling all errors ...
BadData:
MsgBox "You have input your data incorrectly!", vbOKOnly + vbCritical,
"Error"
cmdAmortise.Enabled = False
cmdChart.Enabled = False
txtLoan. SetFocus
End Sub
Private Sub cmdChart_Click()
' this plots and shows the chart
' Charts can be thought of as graphic representations
' of a matrix of figures. And generally they are handled
'this way. A chart's data is based on a grid. You enter
' data in rows and columns, thereby affecting the chart's
' appearance.
Dim iRowCount, iColumnCount As Integer ' the chart's rows and columns
Dim dCurrData As Double ' I'll assign a chart 'cells' data with this variable
'Dim sDateLabel As String
Form16.MousePointer = vbHourglass' cpu busy
' This ensures that the chart will not redraw itself
' every time data is placed within a cell using the
'loop below.
MSChartl .Repaint= False
MSChartl.RowCount = iPayments' See? Just like the FlexGrid (well alomst)
161
' You can either select columns or rows to begin this
' little nested loop. I chose columns in this case.
' I don't know why ...
' Beginning first loop
' Only 2 columns needed - each periods interest & principal payments
For iColumnCount = 1 To 2
' You must also plot each row
For iRowCount = 1 To iPayments
'assign a FlexGrid cell's data to dCurrData
' I use iColumnCount + 2, because the first loop
' will seek for data in column number 4 (interst),
'then column 5 (principal) - again remember that
' a FlexGrid's column and row indices begin at 0,
' so you have to compensate ...
dCurrData = MSFlexGridl .TextMatrix(iRowCount, iColumnCount + 2)
' MSChart's SetData method allocates dCurrData to
'the chart's current cell
MSChartl .DataGrid.SetData iRowCount, iColumnCount, dCurrData,
False
Next iRowCount
Next iColumnCount
' These are the series' legends
MSChart I .Plot.SeriesCollection( 1) = "Interest"
MSChartl .Plot.SeriesCollection(2) = "Principal"
' show the chart
MSChartl.Visible
' repaint the chart
=
True
MSChartl .Repaint= True
' show chart options
Framel.Visible = True
' clicking the chart will now not produce any ugle lines:
MSChartl .Enabled= False
Form16.MousePointer
= vbNormal 'cpu finished
End Sub
Private Sub Commandl_Click()
Dim a, b
a= Val(txtLoan) - Val(txtResult)
b = Val(txtTerm) - 1
Datal .Recordset.AddNew
Datal .Recordset! [Taxit sayisi] = txtTerm
Data l .Recordset! [ OdenenMiktar] = txtResult
Datal .Recordset! [KalanMiktar] = a
Datal.Recordset![PaymentDate]
= dtpStart.Value
Datal .Recordset! [KalanTaxit] = b
Datal .Recordset! [CustomerID] = txtCID
Datal .Recordset! [OrderID] = txtOrderld
Data l .Recordset! [ToplamOdenenMiktar] = txtResult
Data 1.Recordset. Update
End Sub
Private Sub Command2 _ Click()
Unload Me
End Sub
163
Private Sub Form Activate()
'Taksitli satisin ayarlari
txtOrderid.Text = Form2.Text4.Text
txtLoan.Text = Form2.Textl L'Text
txtCID.Text = Form2.Text13.Text
End Sub
Private Sub Form_ Load()
' the FlexGrid's column headers ...
With MSFlexGrid 1
.TextMatrix(O, 0) = "No."
.TextMatrix(O, 1) = "Date"
.TextMatrix(O, 2) = "Begin Bal."
'.TextMatrix(O, 3) = "Interest"
.TextMatrix(O, 3) = "Principal"
.TextMatrix(O, 4) = "End Bal."
'.TextMatrix(O, 6) ="Cum.Interest"
.TextMatrix(O, 5) = "Total Paid"
End With
'assign today's date to the DateTimePicker control
dtpStart = Date
' start off with an Area type graph
optGraph(O).Value = True
End Sub
164
Private Sub Form_Unload(Cancel As Integer)
Set Form16 = Nothing
End Sub
Private Sub optGraph_Click(Index As Integer)
' sub to switch graph types
If Index = 0 Then
MSChartl .chartType = VtChChartType2dArea
' one series appears on top of the other
MSChartl .Stacking = True
' redraw the chart
MSChartl .Repaint = True
Else
MSChartl .chartType = VtChChartType2dLine
' series shown apart - necessary for a meaningful line graph
MSChartl .Stacking = False
' redraw the chart
MSChartl .Repaint= True
End If
End Sub
Private Sub txtinterest_ Change()
'altering any inputs will reset results
txtResult. Text = 0
cmdAmortise.Enabled = False
cmdChart.Enabled = False
MSFlexGridl.Visible
MSChartl.Visible
= False
= False
End Sub
165
Private Sub txtLoan _ Change()
'altering any inputs will reset results
txtResult. Text = 0
cmdAmortise.Enabled = False
cmdChart.Enabled = False
MSFlexGridl.Visible
MSChartl.Visible
= False
= False
End Sub
Private Sub txtResult_KeyPress(KeyAscii
As Integer)
IfKeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii = 0
Text2.SetFocus
Else
Key Ascii = Asc(LCase(Chr(KeyAscii)))
End If
End Sub
Private Sub txtTerm_ Change()
'altering any inputs will reset results
txtResult. Text = 0
cmdAmortise.Enabled = False
cmdChart.Enabled = False
MSFlexGridl.Visible = False
MSChartl .Visible= False
End Sub
166
Private Sub txtTerm_KeyPress(KeyAscii
As Integer)
'If Key Ascii > Asc("O") And Key Ascii <= Asc("9") Then
' Key Ascii = 0
' Text2.SetFocus
'Else
'
KeyAscii = Asc(LCase(Chr(KeyAscii)))
'End If
End Sub
Private Sub Commandl_Click()
Unload Me
End Sub
Private Sub Form_ Load()
Optionl (O).Value = False
End Sub
Private Sub Optionl_Click(Index
As Integer)
Dim a, b, c, fark
'pesin odemeden sonra kalan fark
fark = Val(Text3) - Val(Text4)
For i = 1 To Index + 2
'taksit sayisiyla yansiyan vade farki
'a= fark I (Index+ 2)
* i * Textl
I 100 + a
Next
167
'vade farkiyla beraber toplam tutar
a= Val(Text3) + a
Label8 = a & "$"
'toplam tutann taksit sayisma bolunmesiyle bulunan miktar
b = Int(a I (Index+ 2))
Label6 = b & "$"
Labell 1 = Format(Val(Label6.Caption)
Label13 = Format(Val(Label8.Caption)
* Val(Text5),
* Val(Text5),
"###,###") & "TL"
"###,###") & "TL"
End Sub
Private Sub Checkl _ Click()
'Eger Tasima isteniyorsa 10 ytl ek para
If Checkl.Value = 1 Then
'White good seciliise o/020 KDV
If Optionl.Value = True Then
* Val(Text2.Text)
Text6.Text = Val(Textl.Text)
Val(Text2.Text)
* Val(Text5.Text)
*
- Val(Textl.Text)
I 100 + Val(Textl.Text)
* Val(Text2.Text) *
•. 0 I 100 + 10
'Eger Electronik secili ise %10
Else
Text6.Text = Val(Textl.Text)
Val(Text2.Text)
* Val(Text2.Text)
* Val(Text5.Text)
- Val(Textl.Text)
I 100 + Val(Textl.Text)
*
* Val(Text2.Text) *
10 I 100 + 10
End If
Else
168
'Freight istenmiyor
* Val(Text2.Text)
Text6.Text = Val(Textl.Text)
Val(Text2.Text)
* Val(Text5.Text)
- Val(Textl.Text)
*
I 100
End If
Text6 = Format(Text6, "###,###")
Text12.Text = 10#
End Sub
j
Private Sub Commandl _ Click()
Dim b, tota
Data3 .Recordset.Edit
Data3 .Records et! [FreightCost]
=
Text 12
Data3 .Recordset! [ CustomerID] = Text 13
= Text9
Data3.Recordset![EmployeeID]
b = Data2.Recordset.Fields("UnitslnStock")
tota
=
b - Val(Text2.Text)
Textl O.Text = tota
Data2.Recordset.Edit
Data2.Recordset![UnitslnStock]
=
'Data2.Recordset![Units0n0rder]
Data2.Recordset! [ProductID]
=
TextlO
= Text2
Text3
Datal .Recordset.AddNew
169
Datal .Recordset! [OrderID] = Text4
Datal .Recordset! [ProductID] ~ Text3
Datal .Recordset! [SellingPrice] = Textl
Datal.Recordset! [Sell Quantity]= Text2
Data 1.Recordset ! [Discount] = Text5
Datal .Recordset! [Profit]= Text6
Datal .Recordset! [OrderID] = Text4
Data2.Recordset. Update
'Data3 .Recordset.MoveLast
Data l .Recordset. Update
Data3 .Recordset. Update
ivate Sub Command2_Click()
· vate Sub Command3 _ Click()
· vate Sub Command4 _ Click()
170
End Sub
Private Sub Command5 _ Click()
Form7.Show
End Sub
Private Sub Form_Activate()
Text4 = Forml.Textl.Text
Text3.Text = Forml.Text2.Text
Text8.Text = Forml.Text15.Text
Text2.Text = Forml.Text3.Text
Textl3.Text
=
Forml.Text4.Text
Text14.Text = Forml.Text6.Text
Text15.Text = Forml.Text7.Text
Text9.Text = Forml .Text5.Text
End Sub
Private Sub Form_Click()
'Entere basinca Invoice tusu aktif olsun
Command3.Default = True
End Sub
Private Sub Optionl_Click()
* Val(Text2.Text) - Val(Textl.Text) *
Val(Text2.Text) * Val(Text5.Text) I 100 + Val(Textl.Text) * Val(Text2.Text) *
Text6.Text = Val(Textl.Text)
20 I 100
End Sub
171
Private Sub Option2 _ Click()
* Val(Text2.Text) - Val(Textl.Text) *
Val(Text2.Text) * Val(Text5.Text) I 100 + Val(Textl.Text) * Val(Text2.Text) *
Text6.Text
=
Val(Textl.Text)
10 I 100
End Sub
Private Sub Textl _Change()
* Val(Text2.Text) - Val(Textl.Text) *
Text6.Text = Val(Textl.Text)
Val(Text2.Text) * Val(Text5.Text) I 100
End Sub
Private Sub Text13_LostFocus()
Dim temp(l To 2) As String
Call Module 1.FindCustomer(temp())
Text14.Text = temp(l)
'Text3.Text = temp(2)
Text15.Text = temp(2)
End Sub
Private Sub Text2_Change()
Text6.Text = Val(Textl.Text)
* Val(Text2.Text) - Val(Textl.Text) *
Val(Text2.Text) * Val(Text5.Text) I 100
End Sub
Private Sub Text3_LostFocus()
Dim temp(l To 2) As String
172
Call Module l .F indProductS( temp())
Text8.Text
=
temp(l)
'Text3.Text = temp(2)
Textl 1.Text = temp(2)
End Sub
Private Sub Text5 Change()
Text6.Text = Val(Textl.Text)
* Val(Text2.Text) - Val(Textl.Text) *
Val(Text2.Text) * Val(Text5.Text) I 100
End Sub
PAYMENT PROCESS
Private Sub Commandl _ Click()
Datal .Recordset.AddNew
Text2.SetFocus
End Sub
\
Private Sub Command2_ Click()
Dim mesaj As String
mesaj = "Are you sure to delete the record"
173
IfMsgBox(mesaj,
vbQuestion + vbYesNo + vbDefaultButton2)
=
vb Yes
Then
Datal .Recordset.Delete 'KA YDI SIL
Datal .Recordset.MoveNext 'Sonrakini goster
IfDatal.Recordset.EOF Then 'Eger sonraki kayit yoksa
Datal .Recordset.MoveLast 'son kaydi goster
End If
End If
End Sub
Private Sub Command3 _ Click()
Data 1.Recordset. Update
If Datal .Recordset.EditMode <> dbEditAdd Then
Data 1.Recordset.MoveLast
End If
End Sub
Private Sub Command4 _ Click()
Data 1. UpdateControls
IfDatal.Recordset.EditMode
= dbEditAdd Then
Datal .Recordset.CancelUpdate
End If
End Sub
174
Private Sub Command5 _ Click()
Unload Me
End Sub
Private Sub Text2_KeyPress(KeyAscii
As Integer)
If Key Ascii > Asc("O")And KeyAscii <= Asc("9") Then
KeyAscii = 0
Text2.SetFocus
Else
KeyAscii = Asc(LCase(Chr(KeyAscii)))
End If
End Sub
Private Sub Commandl_Click()
Dim b, tota, a, sum, c, sums, d, f
d = Text?
f= "OrderID=" + d
Data2.Recordset.FindLast f
b = Data2.Recordset.Fields("KalanMiktar")
tota = b - Val(Text3.Text)
Textl 1.Text = tota
a= Data2.Recordset.Fields("OdenenMiktar")
sum= a+ Val(Text4.Text)
175
Text4.Text = sum
= Data2.Recordset.Fields("KalanTaxit")
sums= c - 1
Text9. Text = sums
Texts.Visible=
False
Textl l .Visible = Ti:ue
Textl 1.Left = TextS.Left
Textl l.Top = Texts.Top
Data2.Recordset.AddNew
Data2.Recordset ! [Kalan Taxit] = Text9
Data2.Recordset! [ OdenenMiktar] = Text3
Data2.Recordset![KalanMiktar]
= Textl 1
Data2.Recordset! [PaymentDate] = dtl .Value
Data2.Recordset! [CustomerID] = Text8
Data2.Recordset! [OrderID] = Text7
Data2.Recordset![Toplam0denenMiktar]
= Text4
Data2.Recordset. Update
End Sub
Private Sub Command3 _ Click()
Unload Me
End Sub
Private Sub DTPickerl _CallbackKeyDown(ByVal
KeyCode As Integer, By Val
Shift As Integer, By Val CallbackField As String, CallbackDate As Date)
176
Private Sub DTPicker 1 _Change()
Text6.Text = dtl.Value
Private Sub Form_Activate()
I.Value= Date
Private Sub TextlO_KeyPress(KeyAscii
As Integer)
KeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii = 0
Text2. SetF ocus
Key Ascii = Asc(LCase( Chr(Key Ascii)))
End If
ivate Sub Text2_KeyPress(KeyAscii
As Integer)
KeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii = 0
Text2. SetF ocus
177
KeyAscii
=
Asc(LCase(Chr(KeyAscii)))
End If
End Sub
Private Sub Text7_LostFocus()
Dim temp(l To 5) As String
Call Modulel.FindOrder(temp())
Text3.Text = temp(l)
Text5.Text = temp(2)
Text8.Text = temp(3)
Text9.Text = temp(4)
Text4.Text = temp(5)
'Text3.Text = temp(2)
'Text7.Text = temp(2)
'Textl2.Text
=
temp(3)
End Sub
Private Sub Text8_Change()
Dim temp(l To 2) As String
Call Module l .FindCustomerP(temp())
Text2.Text = temp(l)
TextlO.Text = temp(2)
'Text3.Text = temp(2)
'Text7.Text = temp(2)
'Textl2.Text
=
temp(3)
d Sub
178
EMPLOYEE PROCESS
ivate Sub Commandl_Click()
Textl .Enabled= False Then
Not Datal.Recordset.BOF Then
Datal .Recordset.MoveFirst
MsgBox "This is the first record"
ivate Sub Command2_Click()
Textl .Enabled= False Then
Datal .Recordset.AbsolutePosition > 1 Then
Datal .Recordset.MovePrevious
MsgBox "This is the first record"
179
Private Sub Command3 _ Click()
On Error GoTo err
If Text I .Enabled= False Then
If Data l .Recordset.AbsolutePosition
< Data l .Recordset.RecordCount Then
Data I .Recordset.MoveNext
Else
MsgBox "This is the last record"
End If
J
End If
err:
If err.Number= 3021 Then MsgBox "This is the last record"
'End If
End Sub
Private Sub Command4_ Click()
If Textl.Enabled = False Then
IfNot Datal.Recordset.EOF Then
Data l .Recordset.MoveLast
Else
MsgBox "This is the last record"
End If
End If
End Sub
180
Private Sub Comrnando , Click()
For X
1 To 5000: DoEvents: Next X
=
Label 15 .ForeColor
=
vb Red
For X = 1 To 5000: DoEvents: Next X
Labell5.ForeColor
For X
=
1 To 5000: DoEvents: Next X
=
Labell5.ForeColor
For X
vbBlue
=
=
vbGreen
1 To 5000: DoEvents: Next X
Label 15 .ForeColor = vbRed
End Sub
J
Private Sub FormActivater)
I
'
'Text8.Visible = True
adoDeneri1e.KecordSource ="Select* from employees.Job'Titles " & _
1
1
T"'"~
~
1:
,....
(:HJuu~11trn~ .. r'-~1r~~1i
~
Lnu
1
Di:1(1
e ;
n
1.
LlUl)
Sub
.! !. ~
'
"i '
I t:Xi:':I. 1 tXl
.!
;;..
-
~
i
T>
iT"";,
jy_;asKDUOOX
~
,-,:
L, I
.,
ext
End Sub
!Oi
~
1
0 T
•. ky-,dB
ext 1lu.I
ext= -..Mas
t<,
ox 1 .1 ext
1
,......,
•
End Sub
Private Sub IvfaskEdBox3_LostFocus()
~1 extt l l! . m! ext=
, 'f"Mask EdB ox 3 . m1 ex t
1
End Sub
Pnvate Sub Optionl_Click()
Text l 7 .Text== Optionl .Caption
End Sub
Private
Sub
Optio ....11.i.1 r;
.i. 11
u
v _ i--...];,.,Jrf\
vllv.l\..\/
Textl8.Text
==
Option lu.Caption
End Sub
Private Sub Option! l_ Clicki)
Textl 8.Text = Option I I .Caption
End Sub
Private Sub Optionl2_Click()
Text
c ml ext· -- Option1.l.10.._,vQ.1-'UV
r= •..•.•.••. ion
.l. A~.l.l U,
End Sub
Private Sub Optionl3_Click()
Textl8.Text
=
Optionl3.Caption
End Sub
Private Sub Optionl4_Click()
Texti8.Text
==
Optioni5.Caption
182
vate Sub Optionl5_Click()
ext l o.Text
Optionl5.Caption
=
vate Sub Optionl 6_ Ciick()
extl6.Text
=
Optionl6.Caption
vate Sub Option! 7_ Ciick()
ext8.Text
=
Optionl 7.Caption
Private Sub Optionl8_Ciick()
.....,
,r\m
.
· exus. 1 ext
=
..--~ , •.
upnon
..ir-.. .~
,•
1 ~.caption
End Sub
Private Sub Option 19 _Ciick()
Texts.Text
=
Optionl9.Caption
End Sub
Private Sub Opiion2 _ Click()
Textl 7.Text = Option2.Caption
Private Sub Option20 _Ciick()
Text8.Text
=
Option20.Caption
End Sub
183
Text8.Text
Option2l.Caption
=
End Sub
Private Sub Option22 _ Click()
Text8.Text
Option22.Caption
=
End Sub
Private Sub Option23 _ Click()
Texil4.Text
Option23.Caption
=
End Sub
Private Sub Option24_Click()
Texti4.Text
=
Option24.Caption
End Sub
Private Sub Option25 _Click()
Texti4.Text
=
Option25.Caption
End Sub
Private Sub Option26_Click()J
Texil4.Text
=
Option26.Caption
End Sub
Private Sub Option27 _ Click()
Text8.Text
=
Option27.Caption
End Sub
184
Private Sub Option3 _ Ciick()
Text l 7.Text = Option3.Caption
End Sub
Private Sub Option4_Click()
'ilkokul ise
Frame4.Visible
--:---'\
..• ,..m
1 exu
,
o .1 ext
~
••
.
LJ'1'>1-,:-rn1""e
,r'f
11
=
••....•••
=
.,--_
False
,•
,. ~
' -
,-
•111,,:11110 I i-¥,t.T1r'l.""r'\""'
0U
\JPUVHJ_'L,ll\;.&.\
J. llV(U
,•
upt1on4.Lapt1on
....---t'I•
..•
i
-11nlrl)
.,,,._
'ortaokul ise
Frame-l.Visible
~
'111 ,-
l""T"\
•
=
,--....
False
'..
.-
J'"'"'t
•••
ictniri
\
1 ext1:,.1 ext= upt1on:,.capt1on
End Sub
Private
J. llVGU.,
n
+;" . •. .• ;;:
C11111"h
f
0UlJ
\JtJUVllV_'L-.Uv.&.\/
'lise ise
Frame4.Visible
.
, ,; .-
m
,
False
~
,•
f
-~
,•
1 exn o.I ext== upt1ono.capt1on
J
End Sub
Private Sub Option/_ Click()
tm
'=
•
11
",
•
,=
,
,..
,
· 1 ans11 aurumu unversite tse cepartmenti goster
Frame4.Visible
True
End Sub
185
Private. Sub Optio118 _ Ciick()
TeJL:tl8.Text == Option8.Captio11
End Sub
Frivate Sub Option9 _ Click()
Textl8.Text
=
Option9.Caption
End Sub
J
Private Sub Text2_KeyPress(KeyAscii
As Integer)
IfKeyAscii > AscCiOn)And KeyAscii <= AscCi911) Then
KeyAscii = 0
Text2.SetFocus
Else
Key Ase ii
=
Asc(LCase( Chr(Key Ascii)))
End If
'betulun notlarindan kucuk harfi buyuge cevirmeyide bul yaz
End Sub
Private Sub Tcxt.IKeyl'resst keyascii As L-iteger)
"fr'r
:.
,r,.
--
K.eyASCII - U
T ext3. SetF ocus
Else
Key Asen
=
Asc(LCase( Chr(Key Ase ii)))
End If
i86
End Sub
Private Sub Text5_KeyPress(KeyAscii
As Integer)
IfKeyAscii > Ascr'f)") And KeyAscii <= Asc("9") Then
'Key Ase ii = 0
'T ext5. SetF ocus
'Else
'Key Ase ii
=
Asc(LCase( Chr(Key Ase ii)))
'End If
End Sub
vate Sub Text6_KeyPress(KeyAscii
As Integer)
eyAscii > AscC'On) Arid KeyAscii <= Asc("911) Then
reyAscii
=
0
\
Text2.SetFocus
·reyAscii
=
Asc(LCase(Chr(KeyAscii)))
End If
vate Sub Tooibarl_ButtonClick(ByVal
Button As iv1SComctlLib.Button)
Error Go To err
Button.Index=
t
1 Then
allow us to enter new record to db
Data lRecordset.Addl-Iew
Text2. SetF ocus
187
End If
If Button.Index = 3 Then
Dim msj As String
msj
=
"Are you sure to delete the record"
Ifl\tlsgBox(msj, vbQuestion + vbYesNo + vbDefaultButton2)
= vb Yes Then
Datal .Recordset.Delete
Data 1.Recordset.MoveNext
If Data 1.Recordset.EOF Then
Data 1.Recordset.MoveLast
End If
End If
End If
If Button.Index
= 2 Then
Form21.Show
End If
.Button.Index= 5 Then
'Text2.Enabied = True Then
'Text2.Text <>""And Text9.Text <>""And TextlO.Text <>""And
ich'Textlsoxl.Text <>""And Text6.Text ~'
Textl Z.Text <>
,rn
And Text7.Text <>
nn
And
And Text13.Text <>""Then
ata l .Recordset.Update
188
MaskEdBoxl.Visible
= False
MaskEdBox2.Visible = False
MaskEdBox3.Visible = False
MaskEdBox4.Visible = False
Text9.Visible = True
TextlO.Visible = True
Text! I.Visible= True
Text12.Visible = True
Text13.Visible = True
err:
If err.Number= 438 Then MsgBox err.Description+" "+ err.Source
Text I .Enabled = False
r
Text2.Enabled = False
Text3.Enabled
= False
Text4.Enabled = False
= False
Text6.Enabled = False
Text7.Enabled = False
Text5.Enabled
Text8.Enabled = False
'Adodc I .Refresh
'Adodc l .Recordset.MoveLast
189
'MsgBox "Name, Surname, Birthdate, Adress, Started Date and Supervisor
extl.Text = Adodcl.Recordset.Fields("EmployeeID")
· ilen recordlan kayit eder
dodcl.Recordset.Fields("EmployeeName")
= Text2.Text
= Text3. Text
dodc l .Recordset.Fields("EmployeeSurName")
dodc 1.Recordset.Fields("EmployeeName")
.dodcl .Recordset.Fields("EmployeeName")
= Text4. Text
=
Text5.Text
C
190
I
~--~--~--~~-~~~~~
'Deneme
'adoDeneme.Recordset.AddNew
'adoDeneme.Recordset.Fields("EmployeeName")
'adoDeneme.Recordset.Fields("JobTitleID")
= Text2.Text
= Text3.Text
===========
'====== data sql ornegi
'Data l .Database.Execute "insert into
ployees,JobTitles(Employeename,EmployeeSumarnc,cmploocc.JobTitlcid)
Button.Index= ·7 Ihen
-pdatc yapmak icin
xt9. Text
ext l () Text
.i\..L.l.
V•
Maskfidlsoxj Text
=
..L"-".L"\...
=
Masklidboxz 'I'ext
l'vJ.
i~
,._....{~•
xt 11 Text = l\Maskli
•.. dRnx.2
4
.J..
..I..•
"-".L
Li.-
i...l'-J
~.L~L
Text
• ..L
12.Text
=
MaskEdBox4.Text
13.Text
=
IviasJ.EdBox5.Text
I,
1 I\.,
l~l
MaskEdBoxl .Visible= True
MaskEdBox2.Visible = True
askEdBox3.Visible = True
askEdBo2(:4.Visible = True
askEdBox5.Visible = True
Text9.Visible = False
TextlO.Visible = False
Textl I.Visible= False
ext12.Visible = False
ext13.Visible = False
extl .Enabled = False
ta 1.Recordset. Update
Datal .Recordset.EditMode <> dbEditAdd Then
ata l .Recordset.Movel.ast
tal .Recordset.Update
Datal .Recordset.Editlvlode <> dbEditAdd Then
tal .Recordset.Movel.ast
192
SEARCHING PROCESS
ivate Sub Commandl_Click()
Textl <> "" Or Text2 <>""Then
DataGrid I.Enabled = True
Set DataGridl.DataSource = Adodcl
Adodc l .RecordSource = "select
ployeeID,EmployeeName,EmployeeSurname,Job,Phone,Performance,Emplo
,. . cSupcrvisor,SalarJ,Adress,City
from Employees where EmployeeName="' &
cxtl .Text & "'And Employccsumamc=" & Tcxt2.Tcxt & ""'
Adodc I .Refresh
DataGridl .Refresh
'grid i gorunur yap vc kolonlara isim vcr
DataGridl .Visible = True
~
DataGridl.Columns(l).Caption
=
"Employee Name"
1
i
o-:
/.J
)
DataGridl .Columns(2).Caption = "Employee Surname"
DataGridl.Columns(3).Caption
= "JobTitleID"
DataGridl .Columns(4).Caption = "Phone"
DataGridl.Columns(5).Caption =" Performance"
DataGridl .Columns(6).Caption = "EmployeeSupervisor"
DataGridl .Columns(7).Caption = "Salary"
DataGridl .Columns(8).Caption = "Adress"
DataGridl .Columns(9).Caption = "CityID"
'If Adodcl.Recordset![EmployeeName] <> Textl Or
dodcl.Recordset![EmployeeSurname] <> Text2 Then
' MsgBox "Record was not found"
' DataGridl .Enabled= False
If Adodc 1.Recordset.EOF Then
MsgBox "RECORD ISNT AVAILABLE"
End If
'End If
MsgBox "Please enter name and surname"
End If
End If
194
sadece isime gore arama
If Option! Then
If Text 1. Text <> "" Then
DataGridl .Enabled= True
Set DataGridl.DataSource
Adodcl.RecordSource
= Adodcl
= "select
EmployeeID,EmployeeName,EmployeeSurname,Job,Phone,Performance,Emplo
yeeSupervisor,Salary,Adress,City
from Employees where EmployeeName="' &
Textl.Text & ""'
Adodc I.Refresh
DataGridl .Refresh
'patient icin grid i gortmur yap ve kolonlara isim ver
DataGridl .Columns(O).Caption = "Employee ID"
DataGridl.Columns(l).Caption
= "Employee Name"
DataGridl .Columns(2).Caption = "Employee Surname"
DataGridl .Columns(3).Caption = "JobTitleID"
DataGridl.Columns(4).Caption
= "Phone"
Data Grid 1. Columns( 5). Caption = " Performance"
DataGridl .Columns( 6).Caption = "EmployeeSupervisor"
DataGridl .Columns(7).Caption = "Salary"
DataGridl .Columns(8).Caption = "Adress"
DataGridl .Columns(9).Caption = "City ID"
'If Adodcl.Recordset![EmployeeName]
<> Textl Then
' Msglsox "This Record was not found"
' DataGridl.Enabled
= False
'End If
195
If Adodc l .Recordset.EOF Then
MsgBox "RECORD ISN'T AVAILABLE"
End If
'Else
'MsgBox "Please enter Name And Surname"
End If
Endlf
Option4 Then
IfText3.Text <>""Then
DataGridl .Enabled= True
Set Data Grid l .DataSource = Adodc 1
Adodc l .RecordSource = "select
EmployeeID,EmployeeName,EmployeeSumame,Job,Phone,Performance,Emplo
yeeSupervisor,Salary,Adress,City
from Employees where EmployeeID=" +
Text3.Text
Adodc 1.Refresh
DataGridl .Refresh
'patient icin grid i goruniir yap ve kolonlara isim ver
DataGridl .Columns(O).Caption= "Employee ID"
DataGridl.Columns(l).Caption = "Employee Name"
DataGridl .Columns(2).Caption = "Employee Surname"
DataGridl .Columns(3).Caption = "JobTitleID"
DataGridl.Columns( 4).Caption = "Phone"
DataGridl .Columns(5).Caption =" Performance"
DataGridl .Columns(6).Caption = "EmployeeSupervisor"
196
DataGridl .Columns(7).Caption = "Salary"
DataGridl .Columns(8).Caption = "Adress"
DataGridl .Columns(9).Caption = "City ID"
'If Adodcl.Recordset![EmployeeID]
<> Text3 Then
'MsgBox "This Record was not found"
'DataGridl .Enabled= False
'End If
If Adodc l .Recordset.EOF Then
MsgBox "RECORD ISN'T AVAILABLE"
End If
Else
MsgBox "Please enter EmployeeID"
End If
End If
'Sadece soyisme gore arama
If Option2 Then
If Text2.Text <>""Then
197
DataGridl .Enabled= True
Set DataGrid l .DataSource = Adodc 1
Adodcl .RecordSource = "select
EmployeeID,EmployeeName,EmployeeSurname,Job,Phone,Performance,Emplo
yeeSupervisor,Salary,Adress,City
from Employees where EmployeeSurname='"
Adodc l .Refresh
Data Grid l .Refresh
'patient icin grid i gorunur yap ve kolonlara isim ver
DataGridl.Columns(O).Caption = "Employee ID"
DataGridl.Columns(l ).Caption= "Employee Name"
DataGridl .Columns(2).Caption = "Employee Surname"
DataGridl .Columns(3).Caption = "JobTitleID"
DataGridl .Columns(4).Caption = "Phone"
DataGridl .Columns(5).Caption =" Performance"
DataGridl .Columns(6).Caption = "EmployeeSupervisor"
DataGridl .Columns(7).Caption = "Salary"
DataGridl .Columns(8).Caption = "Adress"
DataGridl .Columns(9).Caption = "CityID"
'If Adodcl.Recordset![EmployeeSurname] <> Text2 Then
' MsgBox "This Record was not found"
' DataGridl.Enabled = False
'End If
If Adodc l .Recordset.EOF Then
MsgBox "RECORD ISN'T AVAILABLE"
End If
Else
198
MsgBox "Please enter Name And Surname"
End If
Textl .SetFocus
err:
If err.Number= 3021 Then
MsgBox err.Number+ err.Source
DataGridl .Enabled= False
End If
End Sub
Private Sub Command2 _ Click()
Unload Me
End Sub
Private Sub Command3 _ Click()
Unload Me
End Sub
Private Sub DataGridl_Click()
199
loyeeSearch.Text2.Text = DataGridl .Columns(O).Text
Sub
· ate Sub Form_Load()
Gridl.Enabled = False
bell.Visible= False
bel2.Visible = False
Listl .Addltem " "
Listl .Addltem "On"
Listl .Addltem "Yirmi"
Listl .Addltem "Otuz"
Listl .Addltem "Kirk"
Listl .Addltem "Elli"
List2.Addltem ""
List2.Addltem "Bir"
List2.Addltem "iki"
List2.Addltem "U9"
List2.Addltem "Dort"
200
Function FindProductO(temp() As String)
On Error Resume Next
With Form l .Data3 .Recordset
.MoveFirst
While .EOF = False
If .Fields("ProductID") = Forml.Text2.Text Then
'temp(!)
=
.Fields("UnitsinStock")
'temp(2) = .Fields("SupplierID")
temp(!)
=
.Fields("ProductName")
!temp(2) = .Fields("PurchasePrice")
'temp(4)
=
.Fields("PurchasedDate")
Exit Function
Else
.MoveNext
End If
Wend
End With
End Function
Function FindSupp(temp() As String)
On Error Resume Next
With Forml9.Data2.Recordset
.MoveFirst
While .EOF = False
If .Fields("SupplierID") = FormJ9.Textl6.Text Then
temp(l) = .Fields("SupCompanyName")
temp(2) = .Fields("SupContactName")
temp(3) = .Fields("SupContactTitle")
temp(4) = .Fields("Phone")
temp(S)
= .Fields("Fax")
temp(6) = .Fields("Adress")
temp(7) = .Fields("City")
Exit Function
Else
.MoveNext
End If
Wend
d With
d Function
While .EOF = False
If .Fields("ProductID") = Form19.Text4.Text Then
temp(l) = .Fields("UnitslnStock")
temp(2) = .Fields("SupplierlD")
temp(3) = .Fields("ProductName")
temp(4) = .Fields("PurchasePrice")
temp(5) = .Fields("PurchasedDate")
Exit Function
Else
.MoveNext
End If
Wend
Function FindProductS(temp() As String)
Error Resume Next
ith Form2.Data2.Recordset
.MoveFirst
While .EOF = False
If .Fields("ProductlD") = Form2.Text3.Text Then
'temp( 1) = .Fields("UnitslnStock")
Cr7.DataFiles(O) = App.Path & "\baglidb.MDB"
Cr7. WindowState
= crptMaximized
Cr7 .PageZoom ( 100)
Cr7 .Action = 1
MODULES AND FUNCTIONS
0 elemanb bir kayit deseni tammlamyor.
lobal taksatis As Taksit
Iobal kayitsay As Integer
Function FindProduct(temp() As String)
Error Resume Next
ith F orm 19 .Data 1.Recordset
.MoveFirst
Cr3. WindowState
= crptMaximized
Cr3 .PageZoom (100)
Cr3 .Action
=
1
Private Sub mnuPurch _Click()
Cr4.DataFiles(O) = App.Path & "\baglidb.MDB"
Cr4.WindowState = crptMaximized
Cr4.PageZoom (100)
Cr4.Action = 1
Private Sub mnuSaleRep _Click()
Cr2.DataFiles(O)
Cr2. WindowState
= App.Path
& "\baglidb.MDB"
= crptMaximized
Cr2.PageZoom (100)
Cr2.Action
=
1
Private Sub mnuSRep _ Click()
Cr8.DataFiles(O)
Cr8. WindowState
= App.Path & "\baglidb.MDB"
=
crptMaximized
Cr8 .PageZoom ( 100)
Cr8.Action
=
1
Private Sub mnuStockRep _ Click()
ivate Sub mnuOrdRep _ Click()
Cr9.DataFiles(O) = App.Path & "\baglidb.MDB"
Cr9. WindowState = crptMaximized
Cr9 .PageZoom ( 100)
Cr9 .Action = I
Private Sub mnuPayRep _ Click()
Cr6.DataFiles(O) = App.Path & "\baglidb.MDB"
Cr6. WindowState = crptMaximized
Cr6.PageZoom (100)
Cr6.Action
=
I
Private Sub mnuPCostRep _ Click()
Cr5.DataFiles(O)
Cr5.WindowState
= App.Path & "\baglidb.MDB"
=
crptMaximized
Cr5.PageZoom (100)
Cr5 .Action = I
Private Sub mnuPReport_ Click()
Cr3.DataFiles(O) = App.Path & "\baglidb.MDB"
.
End If
dSub
REPORTS
Private Sub mnbill_ Click()
= App.Path & "\baglidb.MDB"
CrlO.WindowState = crptMaximized
CrlO.DataFiles(O)
CrlO.PageZoom (100)
CrlO.Action = 1
End Sub
Private Sub mnuCrep _ Click()
Crl.DataFiles(O)
= App.Path
Crl.WindowState
& "\baglidb.MDB"
= crptMaximized
Cr 1.PageZoom ( 100)
Cr l .Action = 1
End Sub
Private Sub mnuERep _ Click()
Cr.DataFiles(O) = App.Path & "\baglidb.MDB"
Cr. WindowState = crptMaximized
Cr.PageZoom (100)
Cr.Action
=1
,
Private Sub Command4_Click()
Data I .Records et. Update
If Data! .Recordset.EditMode <> dbEditAdd Then
Data l .Recordset.MoveLast
End If
End Sub
Private Sub MaskEdBoxl _ Change()
Text3.Text = MaskEdBoxl.Text
End Sub
Private Sub Text2_KeyPress(KeyAscii
As Integer)
IfKeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii = 0
Text2.SetFocus
Else
Key Ase ii = Asc(LCase( Chr(Key Ase ii)))
End If
End Sub
Private Sub TextS_KeyPress(KeyAscii
As Integer)
IfKeyAscii > Asc("O") And KeyAscii <= Asc("9") Then
KeyAscii
=
0
Text2. SetF ocus
Else
KeyAscii = Asc(LCase(Chr(KeyAscii)))
Private Sub Option2 _Click()
Label2.Visible = False
Text I .Visible= False
Label3. Visible = True
Text2.Visible = True
Label 1. Visible = True
End Sub
BILL PROCESS
Private Sub Command2 _ Click()
Data I .Recordset.AddNew
Text2.SetFocus
End Sub
Private Sub Command3 _ Click()
Unload Me
End Sub
If Adodc l .Recordset.EOF Then
MsgBox "RECORD ISN'T AVAILABLE"
End If
'Else
'MsgBox "Please enter Name And Surname"
End If
End If
If Option4 Then
If Text3.Text <> "" Then
DataGridl .Enabled= True
Set Data Grid 1.DataSource = Adodc 1
Adodcl.RecordSource
= "select
Employeell)
EmolcvccSumai .•, . . .
J
-i
' Employccblamc
_..
.f...,,...,i_
..l..,1,.A..
.c:<
A..
..1..
:
~ .; . ~==~=;----:;-i~1 ~
'• c:1 .. • .. , ..
"'1
A .-1 .•.....
,.
1 .ljJ.lV)...-~U~.i..i..i.i,.i,..iJ.j.V,..i'V~:t..i.
r'.f..,_
+-·
r
Tr.h Dhn.1-.0
D.~
.••f.-.~-.c:e,-..,.,.~r:'e..,..,~_L.
i..i..;.f.i:;-,-A
~.i...a,-..J.i,.~..;.,i~.,i.-:;:~-.;,_,.7;,
<t.::}£ ..:-,
. _..
'
1
R~ire~11
t- _ _; _ _~~] ~~·n-r"~..,."L._.,,.~.-mn
,:;
"'
~ o, ~
~ ~ "-
:
r-:>..
,;.
•
n D .... :-~----------···-P
•.
r
•
sr~-fi
,
f°J;; ~ ;;(~h-~;!!
...
HT"'\
----~---~; ; ;; ;; ;; ;
n __ ~
l
..... :;,. :.- ..• ;;:;.
,; ; ; ; ; ;.; ;;t
;~ '~
;;
..:
T~;~L1
;;;:-;L
-
11'"1,,.._:a.c~,~
-=- :;_~,.;_;_;:-~-
""T""";
II r•;...:;:r-,:
..:....E-.E-""-..-'2-.E-
I
~':--;..:
_;__·.;_;_';__;:
A
;i,
,r
-.,
A TT A DT "C"
= ,
1 'l
'I ~
If
'I
,; .ol' l
;
;.;
• ,!
lf""""{;
••• ,L.J,
~-.;.'---'~--
!-..'..-·u~
.;:___·.;..;.';._;:
:
!""'"
.•.....
21
T .C
'T'--·+'"l
'T'--·+
_...,....___ !!II
.l.l .l t;ll..L~ • .l t;ll..L ...._,,--
"T'L, -.l llt;U
DataGridl .Enabled= True
Set DataGridl.DataSource
= Adodcl
= "select
Ad ode l .RecordSource
EmployeeID,EmployeeName,EmployeeSumame,Job,Phone,Performance,Emplo
ycc Supervisor.Salary, . Adress.City
.
from Employees where ErnployeeSumame="
& Texl2~Text s.
DataGridl .Refresh
kolonlara
nr
'I..
/
'{!01""
••.•••••.•
j.
1-..T;+L~TY-'\H
:::c:::
!~[~i""""-::~""t"1'i...,_C'!/
A\
.::::::
-:,: ----,,- =
1s1111
=
==="- = =
rn~+;~--~
so
.:::::c·
a·:.
!
-
f'~;1;t;~ -~~~
rn~i--;
.,,
.:
:::-:::::
~
if"'C1:"';."';.~i r-.~--""'"--~~'!-~-~~~;
= . = ~ = = : = = = .,,.. = .::. . . =
.,
r_--.1= =-=-:.-:.~~,!'7\.r
0
0_ -~-------
.
,. ; ~•
;;
.,.,.;
t •. f ••,. , ••••.•
i •. ' ,_.; ;. . "'.
..S.E.. L .=,._~-:._;~-,,_,.·-=--.,,_;;__-,.,,__-=:..,":,,_,!-:._.:·z_~.,_'!'•.,_.·';._,
.•••. ~
•. .E.......,.-:_;_,;;_
HRf:.f:0Rf} -r~~}-:;T
0
~
~-~;_~ i;.
/;_
TT
,-";.:
r ,;_
""!
-.,,.-
!"'"~-~-H
Else
, -
,-i.
·=T"l.11
,
l\.
A
T
•
Msgbox "t'!ease enter l -rame . .' 21a
undif
n
..l TC
DUU.U
Text l.Text = ""
""
Text3.Text
Textl. ~fotF ocus
err:
If err.Number== 3021 Then
rvisguox err.r.,,.\J.umoer ---r err.Source
"
.fr
D-...l
DUU
-e
T""'I.
•
TC
l.l.
tnd Sub
Unload Me
End Sub
.......i, •.
Sub Commandj _ LllC-K:(__j
!'""'I\
.,_
1
/",.
Unload Me
End Sub
213
.....,
'
S:.
' 'T'extz.
·"' .....,
~
n . 'll .Coiumnsr
'"' 1
'fl"
bmp10yee...;earcn.
I ext= Datat.ind
,_, j. T~ ext
l.
TT-1
A l\F,f .
u111uau
1v.1c;
End Sub
DatafiridlEnabled
'T',.....
+1
'T' .............•. -
.l C:A.l l • .l C:A.l -
=
False
""
Textf.Text = ""
Textl .Visible= False
Textz.Visible
False
=
Text.l.Visiblc = False
Label l.Visible
=
False
Label.I, Visible
=
False
T : ......•.. 1
Ll:::ill
A ..l..lT1- ..... n
.J-\..UU.llt::111
ff
Listl .Addltern "On"
Listl .Addltem "Yirmi''
Listl .Addltem "Kirk"
List2 .Addltem
List2.Addltem "Bir"
List2.Addltem "iki"
Listz.Addltem
214
Listz.Addltem "Dort"
T ;:""'l+..-,
AA.-1T+p.~~"':. "D'""nH
.uC;,;
Ll;:";;t..L.• ..i.- ..•.. uu...:..:..-111
T ! ....••...,
,;. ...l ...rr •.. _.......,.. n A 1 •.• n
Ll:SL.::..rtUU.llClll
rtlll
T
:~+")
A ,l;IT+--
ll"'iT-...l:H
Ll:Sl.:c,.rtUU.llCUl
.l CU!
List2.Additem "Dokuz"
Timer l .Enabled
=
True
Timer I .Interval
=
1000
Priv!ltP
.A.
-&-A•_
••• _
~111"\
,,,_, ---
{)nt1nn
t-',._ . .•. . ..._.. . •. . •. j
'-'
.aL. -
r11f'k'll
...__.l..'L.\./
-.,-
Labelz.Visible
=
False
Label3.Visible
=
False
Texts.Visible
...••.
False
=
· ,.,. _L~lCK()
,....,1.
Private Sun Lnptionz
•
0
•
1-"
Label l.Visiblc
=
False
Labelf.Visible
=
False
Textl.Visible
=
False
Text3.Visible
=
False
·""\1
~
L.1.)
r_...1 C' .. 't,
L..UU
0UU
LabellVisible
Textl.Visiblc
=
=
False
False
l>nv~ti:>
~nh Ont1nn.1
'I'-"- ---'-"' .t"""' . •. ....., ..•.
.&..
......_ .&...t..
-
r11"k-f'i
-..
Labell.Visible
=
False
Labelz.Visible
=
False
..•....•.. _
..•.. ,._,./
Label3.Visible = True
Private Sub Textl_KeyPress(KeyAscii As Integer)
·11
/
.LlU
! .i. !""!"_,..,,_
.l i.I.J~-
.• -- ~
End it
-----
End Sub
....-~....-r
A
••
A
evascu
1.,;U
·> ~AS"
~ v
IT.,1.'\... .; fl
~~
(ltr..u,
A.
"'I"'
U
)
.,
....-r
A
••
"'""'Q 1.'\...
"eyA"'"11
.n..J..l.
:Svu
a
l""'T"'!1
fttr'l.tt'\.
<=A"Cf"4"l
:S . ,
..,
/
nen~
~I u
Text2.SetFocus
Else
Key Ase ii
=
Asc(LCase( Chr(Key Ase ii)))
End If
End Sub
'Private Sub Timer l _Timer()
·~.
. ' · A s Byte,
R
. Rvt re
'Lnm 'nmer
on 1 ar As~.;
Label-l.Caption
= Time
birler
=
Val(IV!id(Label4.Caption, 8, l ))
onlar
=
Val(Mid(Label4.Caption,
Listl .T .istlndex
==
7, 1))
onlar
"';-1 ~
Lii
T-C' f""\_,_;
1 I
\
--"'
1!11.lttll/.
'T'L
--
I llt:":11
Datafirid l .Enabled= True
Set DataGrid l .DataSource = Adodc l
AdodclRecordSource
=
"select
CustomerID,CustomerName,CustomerSumame,CompanyName,Address,City,P
hone,Fax,Gender,BirthDate,ivlaritalStatus,Job
from Customers where
Adodc I .Refresh
Datat.irid l .Refresh
lrue
"f'.nstomerTD"
"C11stomerSlim~men
"Address"
H(:]t·\rH
- --.;
"Phone"
n~trinriri
- ----- -- - - - J- - f'n1nmn~{7)
-- - --- - -- --- ' - / - r~nfrnn
--- --r- -- -- - -
11;;t~G-rirl
- ----- ------ 1- - rr:!11mn~r1
- -- ·· --------·, ·· O)
-- r f:;;nti~tn
- ·--r
'DataGridl .Columns(12).Caption
=
"Mail"
'DataGridl.Columns(13).Caption
=
"Fax"
'DataGridl.Columns(14).Caption
=
"Performance"
'DataGridl.Columns(15).Caption
=
"History"
'DataGridl .Columns( 16).Caption
=
"Employeebupervisor"
'DataGrid l .Columns( 17).Caption = "Salary"
'Datafirid l .Colmnns( 18).Caption
=
"Graduatedbchool"
'Datafirid l .Coiumns(20).Cap6on
=
"Position"
'Datafirid 1.Columns(2 l j.Capticn= "Faculty"
DataGridl. Visible = True
if Adodc l .Recordset.EOF Then
'Datafirid l .Enabled= False
'-
~
~
TfT"\>.11
,-,
,
;-,
,
_;:""";
U
1vrngttox Please rsnter t._,ustorner~urnarne"
Endlf
If Option3 Then
If Textl.Text <>""Or Text2.Text <>""Then
On Error Resume Next
Dataflrldl Enebled
= True
Set Dataclridl.DateSourcc
Adodc l.RecordSource
=
= Adodcl
"select
CustomerID,CustomerName,CustomerSumame,CompanyName,Address,City,P
219
hone,F ax, Gender ,BirthDate,MaritalStatus,Job
from Customers where
CustomerName="' & Textl.Text & "'And CustomerSurname="' & Textz.Text
& ""'
Adodc I.Refresh
DataGridl .Refresh
'grid i gorunur yap ve kolonlara isim ver
DataGridl .Visible
=
True
DataGridl .Columns(O).Caption = "Customer ID"
DataGridl.Columns(l).Caption = "CustomerName"
DataGridl .Columns(2).Caption = "Customer Surname"
DataGridl .Columns(3 ).Caption= ''Company Name"
DataGridl .Columns(4).Caption
=
"Address"
DataGridl.Columns(5).Caption
= "City"
DataGridl .Columns( 6).Caption
=
"Phone"
DataGridl .Columns(7).Caption
=
"Fax"
DataGridl.Columns(8).Caption
=
"Gender"
DataGridl .Columns(9).Caption
=
"Birthfiatc"
If Adodc l .Recordset.EOF Then
Msglsox "Record is not Found r,
DataGridl .Enabled= False
End If
Else
JVIsgBox "Please Enter Customer Name and Surname Ii
End If
End If
220