NEAR EAST UNIVERSITY
LIBR.4.RFACULTY OF ECONOMICS AND
ADMINISTRATIVE SCIENCES
DEPARTMENT OF COMPUTER
INFORMATION SYSTEMS
2006/2007 FALL TERM CIS 400 (Graduation Project)WHOLE SELLER BUSINESS MANAGEMENT SYSTEM
Submitted to: Dept. of CIS
Submitted by: Omar.F .ENBA WI (20010828)
TABLE OF CONTENTS
ACKNOWLEDGMENT ABSTRACT
INTRODUCTION
1. DESIGN OF THE SYSTEM 1.1 Explanation
1.2 Data Flow Diagrams 1.3 Database Design 2. USER MANUAL
2J User guidelines 2.2 User Flow Chart 3. REFERENCES 4. APPENDEX 1 4.1 Screen Outputs 5. APPENDEX 2 5 .1 Source Code LIBRARY 2
3
4 4 5 1421
21 2240
41
41
52 52ACKNOWLEDGEMENT
First of all I would like to thanks Allah {God} for guiding me through my studies.
More over I want to pay special regards to my parents who are enduring these all expenses and supporting me in all events. I'm nothing without their prayers. They also encouraged me in crises. I shall never forget their sacrifices for my education so that I can enjoy my successful life as they are expecting. They may get peaceful life in Heaven.
Also, I feel proud to pay my special regards to our project adviser (Assoc. Professor Dr llham
Huseyinov). He never disappointed me in any affair. He delivered me too much information and
did his best of efforts to make me able to complete my project. Not to forget to give my thanks to the NEAR EAST UNIVERSITY education staff especially to FACULTY OF ECONOMICS AND
ADMINISTRATIVE SCIENCE {CIS) doctors for their helping to take this degree and to achieve this
level of education.(Assist. Professor Dr Yalcm Akyah (Chairman - C.I.S.)), (Nadire QAVU$
(Assistant to Chairman, CIS)) AND (Tansel Devin).
I will never forget the davsthat I have been in Cyprus, from the University to the good friends that I have enjoyed my 4 years with them. I would like to thank them for there kindness in helping me to complete my project, ENG.Tala KHADER I ENG.Ala MANSOUR, ENG.Saha'
KHALAF, ABU Sharkas, Mohammed MANSOUR and Adnan ABDULLMANNAN.
I would like also to thank my family again my father (Fawaz.0. AL-ENBAWI} my mother (Wafa.A.MUHSEN), my brother (Mohammed.F.Al-ENBAWI), my sisters (Lubna, Lyana, Rawan and Sara). Not to forget the big family in JORDAN AND ABU DHABI I would like to give them my regards and thanks for asking about me from my grand mother (3AYOSH) to the smallest child,
ABSTRACT
This software is a specific program only suitable for electrical and electronics company which is used by the employees of the company it self.
This system is dived into seven processes in order for better user interface and friendly.
My
solution to the problem I guess is quite understandable as I divided the system into main seven- processes, such as employees, customers, sales, suppliers, products, payments and reports. Each of the section I designed is easy to understand and learn fast.I hope this software will help the company to keep close eye on there business, account, sale, profit and what store products need.
INTRODUCTION
Toshiba is one of the most famous companies that deal in electrical and electronic equipments, and it's having a good rate in sailing around the world.
There for computers comes into work, in this project some languages will be used such as DELPHI in order to make the buttons, the navigation and the forms, some additions will be made over them in away that improve the program.
Access programming will be needed to design the data base by entering the information.
There are some processes in this project and these are:
• Customer: information about the customers and the products that will be purchased.
• Suppliers: information about the suppliers. • Employees: information about the employees.
• Sales: showing the company sales and the amount that had been sold. • Payments: selling by cash and credits will be calculated.
• Products: information about the products, how many products are sold and how much the company have in the store.
• Reports: there will be sales, customers, suppliers, employees, payments, purchases and products reports.
1. DESIGN OF THE SYSTEM
1.1 Explanation
1. This company sells electronic equipments to individual customers. 2. The electronic products are bought from different suppliers.
3. The company will give an order to the suppliers in order to prepare it.
4. In selling process customers will give his order and according to that, the data is recorded by a company and tell the customers if there is a product or if there is
in the store.
5. The payment can be done by cash or credits.
6. In credit process the installment and profits depends on the method. 7. For each supplier a file will be opened in the company.
8. The information of the employees and reports will be checked just by the general manager.
9. There are many kinds of reports in this company and these are; • Customer's reports. • Purchases reports.
•
Supplier's reports .•
Employee's reports .•
Sales reports .•
Payment reports . • Reports.1.2 DATA FLOW DIAGRAM
CUSTOMERS
USER
$
C Q) E >, (11a.
~Business whole seller management system
USER SUPPLIERS CUSTOMERS :z rn -z ~
i
~i
"9, 'O 'O\
C ~ ~g.
g_ 9.- .?A Q) (/)t
~ ~ (1) 0 CJ)a.
? Suppliers process I!! Q) E ..9 (/)[
CUSTOMERS FILE C !!!. 0 3 (!) al ,Si .!: (/) $ >, 0 a. E U) MANAGER (·) 1.customers reports. 2.sales reports. 3.products reports. 4.purchases reports. 5.payments reports. 6.employees reports. 7 .suppliers reporCUSTOMERS
3.1
New customers
process
3.2
Edit customers
process
CUSTOMERS
3.1
New customers
process
3.2
Edit customers
process
CUSTOMERS
FILE
+,I 'O
'Jvi ~.Os
m
Q)9:
0
&ii,
r110
I'+ ••••s·
~
/J,
VJ;
'O '.s
qfi qJt~ s;{J,
Q)i9
&s
s
&
'<
C.$
'~fo ~ts
i
0,re
3 ·-
in
->: -.
(D
!
(/J
:J
,.... C Q):;· E
CY ~
' (lj0..
lJ
6.1
New payments
process
USER
6.2
Edit payments
process
USER
1.2
Edit products and
purchases
process
1.1
new Products and
purchases
process
s
c
....
(/J Q) ~ 0-
0.E
UJ
PRODUCTS
FILE
SUPPLIERS
FILE
EMPLOYEES
FILE
s
.s
~ s
g
s
ti ~
e
0
0..
t
s
"'~
'f
·~~~~~~!
e
Employees
1n
o.
I
_]
USER
SALES FILE
CUSTOMERS
5.2
Edit sales
process
2.1
New suppliers
process
SUPPLIERS
2.2
Edit suppliers
process
~
~
~
m
~
J
0t
~ ~ 9:, 0 d\ 7c)§
;.:.
~ ~ ~~-
:0~. IPj·
·~
~ ~ 0 0 ISi. .~s·
.j
~~ ~.~
~ 0U?
I
0§.
SUPPLIERS
FILE
CUSfOME:RS FILE () C
I
~ 7.6 Sales report process SALES FILE (*) 1.customers reports. 2.suppliers reports. 3.products reports. 4.purchases reports. 5.sales reports. SUPPLIERS FILE PRODUCTS FILE 7.5 Reports(•) •~ANAGER .l!l C . Q) 0 E 'E >-·- co a.. 7.7 Payments Reports process Employees Reports process EMPLOYEES FILE PAYMENTS PILE 6.payments reports. ?.employees reports.1.2 DATABASE DESIGN Table 1.1: Customers
ml
customers \.._
__
I
' :Ifleld Name
. I
Data TyRe
I~·
customer id
AutoNumber
-
first name
Text
last name
Text
email. address
Text
mobile _J)hon~.
Number
fax number
Number
address
--
Text
-
--
I ,-·· ----...-·-·--
-·· -- ---- - - - ~- -- · Generali
Look;p
1jFieldSize
I
Long Integer-
, lt·lew
Values Increment-
--
, Format
-
-
'-
-
Caption
--
-
-
' Indexed . Yes (l'lo Duplicates) ' Smart Tags- - -· ~
---·
~--~-
Table 1.2: Employees
.
employees.,."
--
--
Field Name
'
Data Tyoe
.
-
Auto Number
first name
Text
second name
Text
third name
Text
last name
Text
email address
-
Text
address
Text
Text
-
Currenc
-
Text
ihcne
Text
home ohcne
Text
interest in job
Number
attendance
Number
erformance
Number
remark
Text
General I Lookup Field Size New Values format Long Integer---
!Incrementf Yes (t{o Dup4icates)
-'--!.-.~~-~~ Smart lags
Table 1.3: Payments and Payments Method
ml
pa,yments and payments method 'I
'I
Field Name
r
Data Tyoe
ll•r •••
Auto Number
~ I"'='-·
-
sale id
Number
Qayment date
Date/Time
by_cash
Yes/No
by credit
Yes/No
>--
-
installment
Number
--
payment_each month
Number
customer debit
Number
-
total orice
Number
I--
--
I-- - -
-
.·-
--- - . -- -·-·• ..----
-- ----__ L
' General
I
Looku;,_
IjField Size , Long Integer i~lew Values 1 lncr,ement \Format
iCaption
1ln{f~ed Yes (~lo Duplicates)
--
~ ~Tagsi ,Text Align _ - • ---- : General
~--
Table 1.4: Products and Purchases
products and purchases information
Field Name
r - --~---Data
Tv~e
AutoNumber
employee id
I Number
supQlier id
I Number
roduct name
!Text
I
mduct code - -- --
Text
Text
Date!Time
Currenc
Currency
uantity
_purchases
I Number
u- ,
units _in store _
I
Number
total
Q_rice~purc~ases
Currenc
i
General~ FieldSiz,er·9~r
ncremsnt format I --- 1 Cap,tionIndexed !Yes {No Duplicates)
- --
+----
----
Table 1.5: Sales Information
I]
sales
,
'---·-
--
'IField Name
'
Data
TyRe
'~·-
AutoNumber
Qroduct_id
Number
emplovee _id
Number
customer id
Number
order quantity
Number
I
discount
Number
total price
Number
I
k-,-·- -
-..---
IGeneral
I
Lookup
1I
i
FieldSi~e
-
; Long Integer _
l'lewValues
Increment
Format
I
ICaption
!
---
-
-
-
' ln:deied
1Y,es (~lo Duplicates)
-
___,
-
\ Smart Tags
--+--
1TextA~9n_ ---~e~
Table 1.6: Supplier Information
suppliers
--
Field Name
DataT
AutoNumber
first name
Text
last name
Text
email address
Text
mobile phone
Text
fax number
Text
address
Text
Gen.era!j~~~ut
1I
Long Integer Increment Format Cllptionln.dexeo lyes (Ho Duplicates) Smart Tags
Table 1.7: Relation Between Tables emplo1m
9
employee.id 111 firrt_name mond_name third.name !art.name email_addrrn address city sala~ major mobile_phone home_phone interest_injob attendance pertormance remarkproducts and purchases inf or m
~j ~
product _id employee.id supplier.id product.name product.code dimiption purchm_date purchase _pnce sell_price quantity_purcham unrts_in_store total_pnce. of_purcham DO suppl!m 11 ~ supplter.1d .. firrt_name customersII
I
!art.name ~ customer_id I sal11 email_addrmI 9
sale_idI
first.name mobile_phone
product.id I fax.number lart_name I
email_addrm
I
employee_id address mobile_phone customer.idfax.number I order. quantity address discount
total_pnce
pa1ment1 and pa1ments me ... I
1
pa)ment_id DO sale.id pa)111enl_date by_cash by_credit inrtallment pa)111ent_mh_month curtomer_ deb rt total_pnce2. USER MANUAL 2.1 USER GUIDLINES:
When the user opens the program, it will show him two kinds of buttons and these are; 1. Enter button.
2. Exit button.
When the user clicks on the enter button its will open another form, in this form in the left top side a bar will be founded. There you will find the main menu, quick start and about,
In the main menu you can find two sub menus (user and manger) in the user sub menu you can find another sub menu (sales) in it you will find sub menus where its (customers ,sales and payments ). In the customer you can do in it the following operation (add, search and delete) in the sales menu you can do the sales operation for the customers and information of the sales). In the payment there are two sub menu payment and repayment. .in the payment menu the user will do the payment operation( cash and credit) , if the customer pay full amount it will be account as cash but if the customer pays by credit so the user will go to the payment by credit button ,it will open another form where some information is needed in order to get {he payment by cash such as (unlimited installments, ,payment information).In purchase sub menu products and suppliers will be founded. In the both of them you can do the operation such as (add, edit, delete and search).In manger sub menu employees and reports are founded in this sub menu just the manger can use it by a password which is (Omar).
2.2 USER FLOW CHART start 1. EXIT 2.ENTER YES "'( STOP ) 1.MAIN MENU 2.QUICK START 3.ABOUT 4.BACK NO
1.INFO. ABOUT PROGRAMME
YES-.{ 2.INFO.ABOUT PROGRAM
3.INFO. ABOUT TOSHIBA
YES 1.USER 2.MANAGER 1.EMPLOYEES 2.REPORTS 1.MSN MASSENGER 2.YAHOO MASSENGER 3.CALCULATURE 1.SALES 2.PURCHASES
2
N0--8
NO -< m Cf> -'< m (/) ENTER PASSWORD 1.CUSTOMERS 2.SALES 3.PAYMENT YES-0 0~r
I
I
~---~
YES-0 m en(
z<$>
I
-< m en -<t
m Cf> 1.PAYMENTSI
~A1~
YES87YES+8
NO~ ~YES-E) -'< m1.1
IF CH 2
)--N0-0
-<
rn
(/)1.SUPPLIERS
2.PRODUCTS
IF CH 1 '>-YES ~
(
z
0
(
IF CH 2 '>-YES-~
(
z
0
EDIT GUST INFO. z 0 EDIT CORRECT GUST. INFO. SAVE .YE 1.ADD 2.EDIT 3.DELETE 4.SEARCH 5.BACK 6.SALES 7.SCROLL THROUGH DB z Q YES Z DELETE GUST INFO. IF CH4 C.1 C.1 SAVE .YES ENTER GUST INFO. z 0 NTER CORRECT GUST. INFO.
YE:s----@
.YES NAVIGATION BETWEEN RECORDS20 1.CUSTOMER ID 2FIRST NAME 3.LAST NAME SEARCH ENTER ID ENT!;R FIRST NAME SEARCH z 0 IFCH 3 ENTER LAST NAME SEARCH
EMP EDIT EMP. INFO. z Q EDIT CORRECT EMP. INFO. SAVE 1----1.,9'11 E 1 .YE 1ADD 2.EDIT 3.DELETE 4.SEARCH 5.BACK 6.SCROLL THROUGH DB YES Yl:s~ YES z DELETE EMF' INFO. .YES-g z Q SAVE ENTER EMP. INFO. NTER CORRECT EMP. INFO. ,0 NAVIGATION BETWEEN
SEARCH 20 ENTER ID ENTER FIRST NAME SEARCH z 0 IFCH3 z '< m ([) ENTER PHONE SEARCH YES ENTER LAST NAME SEARCH
Customers Employees Suppliers Products Purchases Sales payments If products? Customers re_e_orts Employees re_e_orts suppliers products If purchases? If sales? If payments exit purchases sales payments
EDIT SUPP. INFO. EDIT CORRECT SUPP. INFO. SAVE .YE
s
1.ADD 2.EDIT 3.DELETE 4.SEARCH 5.BACK 6.SCROLL THROUGH DB IF CH 1 .YES YES YES~ z I DELETE SUPP INFO. z 0 IF CH 5 .YES--g z 0 IF CH 6 YES S.1 z 0 SAVE ENTER SUPP . INFO. .YE z 0 NTER CORRECT SUPP. INFO. 0 NAVIGATION BETWEEN RECORDSEDIT PRO. INFO. SAVE PRO YE 1.ADD 2.EDIT 3.DELETE 4.SEARCH 5.BACK 6.SALES 7.SCROLL THROUGH DB IF CH 1 ENTER PRO. INFO. YES YES IFCH 2 DELETE PRO INFO. Y!:s~ SAVE YES NTER CORRECT PRO. INFO. 0 NAVIGATION YES---! BETWEEN RECORDS
EDIT PRO. iNFO. ( . 1.ADD 2.EDIT 3.DELETE · 4.SEARCH 5.BACK 6.SALES SCROLL THROUGH DB
'
~'ES I z ~ YES~ z<$>-,cs~j
z 0 YES-1 LIBRARY ENTER PRO. INFO. YESG
~'
7"'0
z QG
1SALE ID 2PRODUCT ID 3 EMPLOYEE ID 4.CUSTOMER ID YES SEARCH SALEE ID NOT FOUND YES IF CH 3 ENTER ID ENTER ID z 0
'
I z /MPLOYEEID NO 0I
I
FOUND'
~I
'
YES kHER~ NO ~ . TRYING <, /l
m (J)I EDIT PAYMENT. INFO.
'
PAYMEN~YESl INFO. -: EDIT CORRECT PAYMENT INFO. SAVE p 1 1.ADD 2.EDIT 3.DELETE 4.SEARCH 5.BACK 6.SALES ?.SCROLL ENTER IF CH 1 >-YES PAYMENT. INFO. I z Q YES IF CH 2>
z DELETE ~ PAYMENT?~.~i°
z 0 IF CH 4 YES---~ 0 NAVIGATION YES---i BETWEEN RECORDS SAVE YES z1
I
:NTER CORRECT PAYMENT. INFO1.PAYMENTID 2.SALE ID
;>i
~ER
IFCrES
ID z 0EN~S3Alj,H
2 SEARCH ID , SEARCH IF FOUND z Q SALE ID NOT FOUND YES'
IF FOUNDYEsG
z QYEs.G
z 0 PAYMENT ID NOT, FOUND YES ANOTHER TRYING NO- NO-rep _)
8
••
8
EDIT1--r--,
I
PAYMENT. INFO.t
1ADD 2.EDIT ~:>YES 3.DELETE 4.SEARCH INFO. . l 5.BACK 6.SALES I SAVE ?.SCROLL I 11 z 0 I I'
11'
EDIT CORRECTI
11V -; "'"
PAYMENT. INFO. YES PAYMENT. INFO. z 0 I <. " ' ::;~;:_~"' >YES
'
~H2SA:-i-
-8
;\:
I
DELETE ~"~~~"
3 ~ ~ z 0 Yi:s~ })O NAVIGATION YES--W BETWEEN RECORDS3. REFERENCES
[1] Fugazzotto,L .Mastering Delphi 7 (2003) [2] Hladni,B. Inside Delphi 2006
APPENDEXl
SCREEN OUTPUTS
EXIT
jj/ WELCOM[ TO TOSHIBA COMPANY
"r'_; ,-rt-,-t rrT"' - ""' "P'r
Figure 1.29: Main Menu
jJi WU.COME TO TOSHIBA COMPANY
Figure 1.31: Main Menu for Purchases
Figure 1.33: Customers Information Form
Figure 1.37: Repayments Information Form
'!JI WllCOME TO TOStllllA OOMPANY
Figure 1.39: Employees Informatiort Form
Figure 1.41: Reports
CUST0\1ERS INFORM\TION
OJSID.W:Rm:
I
FJRSTNME: cxx:ox:ooe
LAST~ erix.rM
El\l\JL ADDRESS: erba.ti@l oh,uil .een l\UBII.EPHCNE:
am~
FAXNU.l\fiER: 89998889 ADDRESS: lefl<osa OJSID.W:Rm:I
F1RSTNA1\E:ND-WJB:> LASTNAl\E: .llilik El\l\JLAl)J)REXS: ~ l\UBII.E PHCNE: 324234224 FAXNU.l\fiER: 3432424:ilf,mtPr"*- 0c:,•'iiit;
DBell M • •" ilc9 "I#~
El\1Pl0~
JNFORMAilON AND EVALUAilON
INFORMATION
EM>IOYEE ID.
I
FIRSTNAl\E: tala SEa)NI) NAl\E: saleh IllIRD~=
jltj LAST~ l\il<d El\.J:\ILADDRl]SS: tdal@hatmJil.am ADDRESS:cyprus CTIY: lefcosa SAI.ARY: l<XX> 1\1\.JOR: soles MHLEP~ 8767821 HO\E~: 76!:SU16EVALUAilON
INIERSTIN JOB: 90 ATIENDANCE: 99 PERFORM\NCE: 90 REM\RK: e,c:elle,t Pa11,1o11Figure 1.43: Employees Information Report
SUPPUERID.
I
FIRSTNAl\E: mita111ed LAST~ ertiaM El\.J:\ILADDRl]SS: rn!ihJtmil.am MHLE P~ 00971!:X>-7!127472 FAX~ER: 76!%Y!i67 ADDRFSS: uae SUPPUERID.I
Jlf'rlr,t?feview D9E!IIM•••S91i1lii'~
PRODUCTS INFORMATIO'l
PR.Ol){X;l' ID:I
NAl\E:~ m70--192 (X)J)E; psni71e-011ahr DISCRIPll(N; ld)tq:> SELL PRICE: 1200 UNIIS INSIORE: 63 PR.Ol){X;l' ID:I
NAl\E: satelliet m71-192 (X)J)E: psni77't-02ldc2 DISCRIPIICN": ldrtq:> SEIL PRICE: 999 UNIIS INSIORE: 63 Pa~el oflFigure 1.45: Products Information Report
'JjPmtPremw" IIIIBEflM<>HSilllilia'~
PURCHAS~ INFORMATIO'l
pR.Ol){X;l'm
I
El\FI.DYEE ID: 2 SUPPLIER ID: 1PURCHASE DA'IE: 11/29/2CX%i
PURCHA.SE PRICE: eoo QUANIIIYPURCHASE: 30
'RHAL PRICE OF PURCHASE: 15CXXl
PR.Ol){X;l' ID:
I
El\FI.DYEE ID: 2 SUPPLIER.ID: 2 PURCHA.SE DA'IE: 2/11/2006 PURCHASE PfflCE: -400 QUANIIIYPURCIJASE: 7'RHAL PRICE OF PURCHASE: 2800 Paielof2
\_1T-""l_i
~f'nntPre¥1tw Dllltl H < • H ~-·-~.;, ~ SAIEID:
I
PROIX.X:TID: 2 El\'.FI.OYEE ID: 1 CTJSIO.\ERID: 1 ORDERQUANIIlY: 1 DISCOUNT: 1UL\L PRICE: 1200 SAi.EID:I
PROIX.X:T ID: 2 El\FI.OYEE ID: 1 cus:ra\ERID: 1 ORDERQUANIIlY: 7 DISCOUNT: 22 1UL\L PRICE: (;,993 P1g_elo13 -~-1. '~ -.Figure 1.47: Sales Information Report
'!J/PootPrrriew
Ql!!Hl!I H < > H 841 Iii lli' ~
PAYMENIS ANS PAYMENIS l\1EIHOD INFORM.AilON
PAYJ.\ENI'ID:
I
SAi.EID: !5PAYJ.\ENI'DA1E: 1/12/2/XTT
PAYJ.\ENI' BY CA.SH: Fase PAYJ.\ENI'BY CREDIT: Fase
JNSTALU\,ENI': 3
PAYJ.\ENI'FAOI~ 2331 OJSIO'\ERDEBIT:
o
5. APPENDEX2 5.1 SOURCE CODE
SOURCE CODE FOR THE MAIN MENU FORM:
procedure TForm2.Button1Click(Sender: TObject);
~~ -
CLOSE; end;
procedure TForm2.Tirnerl Timer(Sender: TObject); begin
Progresslsar I .Position:= ProgressBar I .Position
+
1; if ProgressBarl.Position >= 50 thenbegin
ProgressBarl.Visible;= False; ProgressBar I .Position:=
O;
CUSTOMERS I .Enabled := true; Timerl.Enabled:= false;
form3 .Show Modal; end
end; -,
procedure TForm2.CUSTOMERS 1 Click(Sender: TObject); begin
ProgressBarl .Visible:=true; timer I.Enabled:= true; end;
procedure TForm2.Timer2Timer(Sender: TObject); begin
Progresslsar I .Position.= ProgressBar I .Position
+
1; if ProgressBarl.Position >= 50 thenbegin
ProgressBarl.Visible;= False; ProgressBar 1 .Position.= O; SALES I .Enabled := true; Timer2.Enabled:= false; form4.ShowModal; end
end;
procedure TForm2.SALES2Click(Sender: TObject); begin
begin
ProgressBarl.Position:= Progresslsar l.Position
+
1; if ProgressBarl.Position >= 50 thenbegin
ProgressBar I .Visible:= False; ProgressBar I .Position:= O; PAYMENTS I .Enabled := true; Timer3.Enabled:= false; form5 .Show Modal; end
end;
procedure TF orm2 .PAYMENTS 1 Click(Sender: TObject ); begin
ProgressBar l .Visible:=true; timer3.Enabled := true; end;
procedure TForm2.Timer4Timer(Sender: TObject); begin
ProgressBar I .Position:= Progresslsar I .Position
+
1; if ProgressBarl.Position >= 50 thenbegin
Progresslsarl .Visible.= False; ProgressBar I .Position:= O; SUPPLIERS I .Enabled := true; Timer4.Enabled:= false; form6.ShowModal; end
end;
procedure TForm2.SUPPLIERS1Click(Sender: TObject); begin
ProgressBarl.Visible:=true; timer4.Enabled := true; end;
procedure TForm2.PURCHASES2Click(Sender: TObject); begin
ProgressBar 1.Visible:=true; timer5.Enabled := true; end;
begin
ProgressBar I .Position.= ProgressBar I .Position
+
I; if ProgressBarl.Position >= 50 thenbegin
ProgressBar I .Visible:= False; ProgressBar I .Position:= O; PRODUCTS I .Enabled := true; Timer6.Enabled:= false; form8.ShowModal; end
end;
procedure TForm2.PRODUCTSIClick(Sender: TObject); begin
ProgressBarI.Visible:=true; timer6.Enabled := true; end;
procedure TForm2.EMPLOYEESIClick(Sender: TObject); begin
FORM9.SHOWMODAL; end;
procedure TForm2.REPORTSIClick(Sender: TObject); begin
FORMI I .ShowModal; end;
procedure TForm2.MSNMASSENGERI Ciick(Sender: TObject); begin
winexec('C:\Program Files\MSN Messenger\msnmsgr .exe' ,9); end;
procedure TForm2.CALCULATERI Click(Sender: TObject); begin
winexec('C:\windows\system32\calc.exe',9); end;
procedure TForm2.INTERNETEXPLOLERI Click(Sender: TObject); begin
winexec('C:\Program Files\Intemet Explorer\IEXPLORE.EXE',9); end;
procedure TForm2.Y AHOOMASSENGERl Click(Sender: TObject); begin
begin
FORM24.SHOWMODAL; end;
SOURCE CODE FOR THE CUSTOMER FORM:
procedure TForm3.Button1Click(Sender: TObjeet); var
A,b,C:boolean; begin
if radio button I .checked then begin
A:= AD0table 1.Locate('CUSTOMER _ID' ,edit 1.Text,[lopartialkey ,locaseinsensitive]); canvas.font.Color:=clred;
if not A =true then
showmessage('CUSTOMER ID NOT FOUND'); editl .setfocus; end; if radi9button2.checked then begin b:=ADOtablel.Locate('FIRST_NAME',editl.Text,[lopartialkey,locaseinsensitive]); canvas.font.Color:=clred;
if not b=true then
showmessage('CUSTOMER NAME NOT FOUND'); editl .setfocus;
end;
if radiobutton3 .checked then begin 1
C := ADOtab le 1.Locate('LAST _ NAME',edit 1. Text, [lopartialkey ,locaseinsensitive ]); canvas.font.Color:=clred;
if not C=true then
showmessage('CUSTOMER NAME NOT FOUND'); edit t.setfocus;
end; end;
procedure TForm3.Button3Click(Sender: TObject); begin
FORM4.SHOWMODAL; FORM3.Hide;
end; end.
SOURCE CODE FOR SALES FORM:
procedure TForm4.Button3Click(Sender: TObject); var
A,B;C,D:boolean;
begin
if radiobuttonl .checked then begin
A:=ADOtable 1.Locate('SALE _ ID',edit l .Text.lloparrialkey.locaseinsensitive ]); canvas.font.Color:=clred;
if not A=true then
showmessage('SALE ID NOT FOUND'); editl .setfocus; end; if radiobutton2.checked then begin b:=ADOtablel.Locate('PRODUCT_ID',editl.Text,[lopartialkey,locaseinsensitive]); canvas.font.Color.=clred;
if not b=true then
showmessage('PRODUCT ID NOT FOUND'); editl .setfocus;
end;
if radiobutton3 .checked then begin
C:=ADOtable 1.Locate('EMPLOYEE _ ID',editl .Text,[lopartialkey,locaseinsensitive ]); canvas.font.Color:=clred;
if not C=true then
showmessage('EMPLOYEE ID NOT FOUND'); edit l .setfocus; end; if radiobutton4.checked then begin D:=ADOtablel.Locate('CUSTOMER_ID',editl.Text,[lopartialkey,locaseinsensitive]); canvas.font.Color:=clred;
if not Dstrue then
showmessage('CUSTO~R ID NOT FOUND'); edit l .setfocus;
end; end;
procedure TForm4.Button5Click(Sender: TObject); begin
form 10-.showmodal; end;
procedure TForm4.Button6Click(Sender: TObject); begin
form} .showmodal; end;
procedure TForm4.Button7Click(Sender: TObject); begin
FORMS.SHOWMODAL; end;
procedure TForm4.DBLookupComboBoxl Click(Sender: TObject); begin
dbedit2. Text:=dblookupcombobox 1. Text; end;
procedure TForin4.DBLookupComboBox2Click(Sender: TObject); begin
dbedit3 .Text:=dblookupcombobox2.Text; end;
procedure TForm4.DBLookupComboBox3Click(Sender: TObject); begin
dbedit4. Text:=dblookupcombobox3. Text; end;
procedure
TForm4.Button2Click(Sender: TObject); VAR P,Q,STORE:REAL; begin Q:=STRTOFLOAT(DBEDITS .Text); P:=STRTOFLOAT(DBEDIT8.Text); AD0Table2.Close; AD0Table2.0pen; ADOTable2.Edit;if ADOTable2.FieldByName('units_in_store').Aslnteger >= strtoint(dbedit5.text) then begin
AD0Table2.Close; ADOTable2.0pen; ADOTable2.Edit;
ADOTable2.FieldByName('units_in_store').Aslnteger:=ADOTable2.fieldbyname('units ~in _store').Aslnteger-strtoint( dbedit5 .Text);
begin
showmessage('Stock ls Less Than Your Entered!!!!'); end;.
end; end.
procedure TForm4.Button8Click(Sender: TObject); begin ifDBChecl$ox2.Checked then begin fortn 14.ShowMoc!al; end; end; end.
SOURCE CODE FOR THE PAYMENTS FORM:
procedure TF orm5 .Button2Click(Sender: TObject); var
A,B,C:boolean; begin
if radio button I .checked then begin
A:=ADOtablel.LocaterPAYMENT_ID',editl.Text,[lopartialkey,locaseinsensitive]); canvas.fom.Colori=clred;
if not A=true then
showmessage('PA YMENT ID NOT FOUND'); edit l .setfocus; end; if radiobutton2.checked then begin b:=ADOtablel.Locate('SALE_ID',editl.Text,[lopartialkey;locaseinsensitive]); canvas.font.Color:=clred;
if not b=true then
showmessage('SALE ID NOT FOUND'); edit I .setfocus;
end; end;
procedure TForm5.Button4Click(Sender: TObject); begin
FORM4.ShowModal; form 14.hide;
end;
procedure TForm5.Button5Click(Sender: TObject); begin
FORMl 7.SHOWMODAL; end;
procedure TForm5.DBLookupComboBoxlClick(Sender: TObject); begin
dbedit2.Text:=dblookupcomboboxl .Text; end;
procedure TForm5.DBEdit7Change(Sender: TObject); begin
DBEDIT6.Text:=DBEDIT7 .Text; end;
SOURCJ: CODE FOR SUPPLIERS FORM:
procedure TFonn6.Button2Click(Sender: 'I'Object); var
A,B,C,D:boolean; begin
if radiobutten l.checked then begin
A:=ADOtable 1.Locate('SUPPLIER _ ID' ,editl .Text,[lopartialkey,locaseinsensitlve ]); canvas.font.Color.=clred;
if not A=trUe then
showmessage('SUPPLIERS ID NOT FOUND'); editl .setfocus;
end;
if radiobuttonz.checked then begin
b:= ADOtable l .Locate('FIRST _ NAME' ,editl. Text, [lopartialkey ,locaseinsensitive ]); canvas.font.Color:=clred;
if not b=true then
showmessage('NAME NOT FOUND'); edit l .setfocus;
end;
if radiobutton3 .checked then begin
C:=ADOtable l .Locate('LAST _ NAME',editl .Text,[lopartialkey,locaseinsensitive ]); canvas.font.Color:=clred;
if not C=true then
showmessage('NAME NOT FOUND'); editl .setfocus; end; if radiobutton4.checked then begin D:=ADOtablel.Locate('MOBILE_PHONE',editl.Text,[lopartialkey,locaseinsensitive]); canvas.font.Color:=clred;
if not D=true then
showmessage('MOBILE NUMBER NOT FOUND'); editl .setfocus;
SOURCECODEFORPRODUCTSANDPURCHASESFORM:
procedure TForm8.Button2Click(Sender: 'I'Object);var
A,B,C,D:boolean; begin
if radio button I .checked then begin
A:.=ADOtablel.Locate('PRODUCT_ID',editl.Text,[lopartialkey,locaseinsensitive]); canvas.font.Color.=clred;
if not A =true then
showmessage('PRODUCT ID NOT FOUND'); editl .setfocus;
end;
if radiobutton2.checked then begin
B :=ADOtable 1.Locate('PRODUCT _ NAME' ,editl .Text,[lopartialkey,locaseinsensitive]) canvas.font.Color:=clred;
if not b=true then
showmessage('PRODUCT NAME NOT FOUND'); editl .setfocus;
end;
if radiobutton3 .checked then begin
C:=ADOtablel.Locate('PRODUCT_CODE',editl.Text,[lopartialkey,locaseinsensitive]); canvas.font.Color:=clred;
if not C=true then
showmessage('PRODUCT CODE NOT FOUND'); editl .setfocus;
end;
if radiobutton4.checked then begin
D:= ADOtable l .Locate('D1SCRIPT10N' ,edit 1. Text, [lopartialkey ,locaseinsensitive ]); canvas.font.Color:=clred;
if not D=true then
showmessage('DISCRIPTION NOT FOUND'); editl .setfocus;
end; end;
procedure TF orm8 .DBLookupComboBox 1 Click(Sender: TObject ); begin
dbedit7 .Text:=dblookupcomboboxl .Text; end;
procedure TForm8.Button3Click(Sender: TObject); VAR Q,U,PUR:REAL; begin Q:=STRTOFLOAT(DBEDITl 1.Text); U :=STRTOFLOAT(DBEDIT6.Text); PUR,=STRTOFLOAT(DBEDIT9. Text); DBEDIT6.Text:=FLOA TTOSTR(Q+U); DBEDITl 4.Text:=FLOA TTOSTR(Q*PUR); end;
procedure TForm8.Button4Click(Sender: TObject); begin
FORM6.SHOWMODAL; end;
SOURCE CODE FOR SECURITY OF EMPLOYEES:
procedure TForm9.Button1Click(Sender: TObject); begin
if editl.Text ='omar' then begin formlO.Showmodal; end else begin MessageBeep(word(-1 )};
showmessage('Wrong Password !'#13'Please Enter Again!'); aa:=aa+l; editl .Text.="; editl .SetFocus; if aa=3 then begin editl .Text:=";
showmessage ('sorry you are not the manager'#13'The program Will Be Terminated'); application.terminate;
end; end; end;
procedure TForm9.Button2Click(Sender: TObject); begin
MessageBeep(word(-1 ));
a.=rnessagedlgt'Do you want to exit from program?',mtconfirmation,[mbyes,mbno],O); if a=mryes then
begin
application. Terminate; end
end;
procedure TForm9.BitBtn1Click(Sender: TObject); begin
if editl.Text ='omar' then begin formlO.Showmodal; form9.Close; end else begin MessageBeep(word(-1 ));
showmessaget'Wrong Password !'#13'Please Enter Again!'); aa:=aa+l;
beg-in
edit I.Text:=";
showmessage ('sorry you-are not the manager'#13'The program Will Be Terminated'); app Ii cation. terminate;
end;
end;
end;
procedure TForm9.FormCreate(Sender: TObject); begin
EDITl .Text:="; end;
SOURCE CODE FOR EMPLOYEES FORM:
procedure TForm10.Button2Click(Sender: TObject}; var a,b,c,code:integer; s:string; gread.real; begin val(dbedit13.Text,a,code); val( dbeditl 4.Text,b,code ); val(dbedit15.Text,c,code); gread:=((a+b+c )/3); if (gread>=90) then s:='excellent';
if (gread>=85) and (gread<=89) then s:='good';
if (gread>=75) and (gread<=84) then s:='fair';
if (gread>=65) and (gread<=74) then s:='poor';
if (gread<=64) then s :='unsatisfactory'; dbeditl 6.Text:=s; end;
procedure TF orm 10 .Button3Click(Sender: TObj ect ); var
A,B,C,D:boolean; begin
if radio button I .checked then begin
A:=ADOtablel.Locate('EMPLOYEE_ID',editl.Text,[lopartialkey,locaseinsensitive]); canvas.font.Color:=clred;
if not A =true then
showmyssage('EMPLOYEE ID NOT FOUND'); edit 1.setfocus; end; if radiobutton2.checked then begin b:=ADOtablel.Locate('FIRST_NAME',editl.Text,[lopartialkey,locaseinsensitive]); canvas.font.Color.=clred;
if not b=true then
showmessage('NAME NOT FOUND'); edit I .setfocus;
eanvas.font.Colorr=clred: if not C=true then
showmessage('NAME NOT FOUND'); editl .setfocus;
end;
if radiobutton4.checked then begin
D:= ADOtable l .Locate('MOBILE _ PHONE' ,edit 1. Text,[lopartialkey,locaseinsensitive ]); canvas.font.Color:=clred;
if not D=true then
showmessage('PHONE NOT FOUND'); edit l .setfocus;
end; end; end.
SOURCE CODE FOR REPORTS SECURITY FORM:
procedure TF orm I I .Button 1 Click(Sender: TObject); begin
if editl .Text ='omar' then begin forml5.Showmodal; form 11.Close; end else begin ,MessageBeep(word(-1 ));
showtnessage('Wrong Password !'#13'Please Enter Again!'); aa:=aa+l; editl .Text:="; editl .SetFocus; if aa=3 then begin edit l.Text.=";
showmessage ('sorry you are not the manager'#13'The program Will Be Terminated'); application.terminate;
end; end; end;
procedure TF orm 11.Button2Click(Sender: TObj ect ); begin
MessageBeep(word(-1 ));
a:=messagedlg('Do you want to exit from program?',mtconfirmation,[mbyes,mbno],O); if a=mryes then
begin
application.Terminate; end
end;
procedure TForml l.FormCreate(Sender: TObject); begin
EDITl .Text:="; end;
SOURCE CODE FOR PAYMENTS BY CREDIT FORM:
procedure Tf'orm.l 7.Buttonl Click(Sender: TObject); VAR I,T,M,STORE:REAL; begin I:=STRTOFLOAT(DBEDIT2.Text); T:=STRTOFLOAT(DBEDIT4.Text); DBED1T3.Text:=FL0A TIOSTR(T/1); M:=STRTOFLOAT(DBEDIT3.Text); DBEDIT5.Text:=FLOATIOSTR(T-M) end;
procedure TForml 7.Button2Click(Sender: TObject); begin
close; end;
procedure TForml 7.Button3Click(Sender: TObject); var
A,B,C:boolean; begin
if radiobuttonl .checked then begin
A:= ADOtable l .Locate('P A YMENT _ ID' ,edit 1. Text, [lopartialkey .locaseinsensitive ]); eanvas.font.Color:=clred;
if not A =true then
showmessage('PA YMENT ID NOT FOUND'); editl .setfocus;
end;
if radiobutton2.checked then begin
b:= ADOtable l .Locate('SALE _ ID' ,edit 1. Text,[lopartialkey .locaseinsensitivej); canvas.font.Colon=clred;
if not b=true then
showmessage('SALE ID NOT FOUND'); edit l .setfocus;
SOURCE CODE FOR REPAYMENTS FORM:
procedure Tfonn24-.Buttcm1Click(Sender: TObject);
VAR . D,M:REAL; c:integer; begin D:=STRTOFLOAT(DBEDIT2.Text); M:=STR-'f0FLOAT(DBED1T5 .Text); ifd>=m then begin DBEDIT2.Text:=FLOATTOSTR(D-M) end else
c:=messagedlg('there is no debit in this account',mtwarning,[mbok],O); end;
procedure TFortn24.Button3Click(Sender: TObject); VAR
A,B:boolean; begin
if radiobutton I .checked then begin
A:=ADOtablel.Locate('PAYMENT_ID',editl.Text,[lopartialkey,locaseinsensitive]); canvas.font.Color:=clred;
if not A =true then
showmessage('PA YMENT ID NOT FOUND'); editl .setfocus;
end;
if radiobutton2.checked then begin
b:=ADOtable l .Locate('SALE _ ID' ,editl .Text,[lopartialkey,locaseinsensitive ]); canyas.font.Color:=clred;
if not b=true then
showmessage('SALE ID NOT FOUND'); editl .setfocus;
end; 7
end;
procedure TF orm24.Button2Click(Sender: TObject ); begin
CLOSE; end;