I
I
I
I_
I
I,
NEAR EAST UNIVERSITY
FACULTY OF ECONOMICS AND
ADMINISTRATIVE SCIENCE
DEPARTMENT OF COMPUTER
INFORMATION SYSTEMS
2002/2003 SUMMER TERM
CIS 400
(Graduation Project)
CE,MENT CO. PROCESS SYSTEM
Submitted To
Dr, Yalcm Akcah
Miss,Nadire Cavus
Submitted By
: Ezgi Ersoy (981007)
Lefkosa
2003
\\11!!1~1!1!,l~
11
Ii
I
1.
I
I
I
I
I
1··.
I
I
I
I
I
I
I
CONTENTS
PAGE
I.AKNOWLEDGMENT 1 II.ABSTRACT 2 III.lliTRODUCTION 3 IV.EXPLANATION OF SYSTEMS.- Data Flow Diagram 5
- System Block Diagram .. , 12
- Database Design 13
V.USER MANUAL , 15
VI.LIST OF SUBPROGRAMS
- Program Flow Chart 19
- Source Program 55
- Screen Otitput(Figures) 92
ACKNOWLEDGEMENT
I would like to express my special thanks to my advisor Miss. Nadire Cavus and
Computer Information System Chairman Dr. Y
alcm Akcah, they give me their experience
and decisions to learn more about my task that is related my future.
I would like to say thanks them who help me through the preparation of CEMENT
Co. Package program. They give me their decisions and their expreience about my project to
be succesful.
I would like to thank my family, my all friends and other teachers to make get a
vision.
I
I
I
I
I
I
I
I
I
ABSTRACT
Computer industry is always developing. Invention of the Calculus and up to now,
people are using computer's technology in everywhere like the space sector. Computer
technology is everywhere. People are using these technologies for the comfort that decrease
the spending of time when you are making a work in the anywhere.
Computer Information Systems also part of Computer Industry that is related
software. C.I.S creates System Solutions, Package Program solutions etc. In my project I
was choose package program solutions for CEMENT CO. related that daily transaction of
CEMENT Company. This project helps the user about data storage when who need that data
to use again.
When I preparing that project I was used Visual Basic program language and
Microsoft Access for the input data storage.
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
INTRODUCTION Cement Co. Processing System:This company prepares to concrete on to operate. External are unripe substances
( cement, stone vs.) to prepare mix concrete to be condition and customers needs to be sale.
That operation is to arrange to income and expenditure. Account's the name of the
accountancy to be separately account: The whole company these operations to be separately
differently to use four processes.
Customer Process:
This process customer is relating to every kind on this data.
This data are:
Customer Code:
Customer Name:
Customer Phone:
Customer Tax No:
Customer City:
Customer Address: Customer Reg. Date:
Customer Database: All customers are data conceal in this customer file database.
Customer Update, Delete and Find are sub process of customer process with uses in this
process.
Customer order invoice is a sub process of customer order invoice preparing in this sub
process. Customers are going to concrete input on sales data.
This
data are:
Customer Code:
Invoice No:
Stock Codes:
Customer Name:
Invoice Date:
Stock Names:
Phone Number:
Employee Name:
Quantities:
Customer Address:
Sub Total:
Unit Prices: Total:
Firm Process:
Company prop.erties are to buy other companies in this section. Otherwise we can say
supplier.
This Data are:
Firm Code:
Firm Name: Firm Phone: Firm Fax:
Firm Tax No: Firm City:
Firm Address:
Firm Reg. Date:
I
I
I
I
I
I
Stock Database: The Information on the stock empty or stock out goods. It includes the stock
entry and stock entry and stock out amounts of goods together with dates in this stock
database.
Cement Co. to prepare sub process, in this sub process, good are brought from the supplier
or to a stock and they are according to the request of the customers. Cement Co. (a building
material composed of solidified cement, sand, water and gravel) preparing.
Delete, Update and Find are sub processes. Goods brought from firms and come to company
stock. These goods are making operation entrance and exit in this by sub process.
Employee Process:
The information pertaining to the employees included, such as, names of employees,
codes, addresses and all the payments made to them.
Employee Database: All employees are data conceal in this employee file database.
Delete, Update and find are sub processes. Employees are relating data on the change
making when the employees are relating this sub process are become a part of activity.
Accounting Process:
The information regarding the accounts of income and expenditure, the account of
goods in stock. Also, customers and employee's payment and will payment amount on this
process. This is also a controlling of all this accounts and their comparisons.
---·---,-,---·-
CONTEXT DFD OF CEMENT CO. PROCESS SYSTEM
CUSTOMER Customer Invoice I ~---Customer Information ~ Cement Co. Process System FIRMS
New Stock Entry '---Stock Orde·r---'
,,.. Firms Information--~
- -
-
- - -
-
-
- - -
- - -
TOP LEVELDFD OF CEMENT CO. PROCESS SYSTEM
FIRMS CUS10MER Account File EMPLOYEE USER
- -
-
- -
-
- -
-
-
DETAILED DFD OF CUSTOMER PROCESS (1)
Customer Invoice CUSTOMER
Customer Order
1.5 Customer
Selling Customer Product Request ~
Stock File
,t..1111 Approved Customer Product request·---
New Customer Entry·---1.._ _
-
-
I-
-
-
- '-
-
I-
- - -
- - - -
-
-
DETAILED DFD OF FIRMS PROCESS (2)
00
Stock Order
I
FIRMSr
New Stock Entryl
0
·i
,.8
..s
New FiruJ.
Entry---...:
~
FinnsFile
-fiJJl\ Se\ect fo< oe\et...--- ~
.pe\eteo fitOl b1f0---
Stocks File
Finn Search
- -
- -
-
-
-
-
-
••••••
- -
- - -
••••
-
-
DETAILED DFD OF EMPLOYEE PROCESS(3)
I
EMPWYEE1...
Employee Salaryl
.§
§
8
•....•§>
§
§-. 0 =.User Wanted Employee Info Delete USER
-
-
DETAILED DFD OF ACCOUNT PROCESS(4}<,~~
~eY ~~-Je~
EMPWYEE
- -
-
-
- -
-
-
-
·- - - -
-
-
- - -
- ·- - I- -
I-
I-· ·- - - - - ·- - ·- - ·- - ·- -
SYSTEM BLOCK DIAGRAM OF CEMENT CO.
FIRMS CUSTOMERS EMPLOYEES ACCOUNT
FIRM RECORDS
r-
CUSTOMER RECORDSr-
EMPLOYEE RECORDSNew New New
Save Save Save
,...Update
Update Update
N
Delete Delete Delete
Find
Find Find
Stock Min. Level MainMenu MainMenu
MainMenu
STOCK RECORDS SELLING PROCESS
New Invoice
Save Stock Add
Update Save
Delete Print
Find Employee Select
MainMenu INVOICE RECEPTION Find Pay :MainMenu EXPENSE ENTRY Save MainMenu REPORTS
FIRM GENERAL REPORT STOCK REPORT
- CUSTOMER REPORT EMPLOYEE REPORT
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
DATABASE DESIGN
Firms.Thi
'Field Name Type Size
Firmname Text,
50
Firmcode Integer2
Firmphone Text20
Firmfax Text20
Firmtaxno Text20
Firmcity
Text20
Firmadres Text50
Firmregdate Date 8Stocks.Thi
Field Name Type Size
Firmname Text
50
Firmcode Integer2
Stockcode Integer2
Stockname Text20
stockminl Integer2
Stockbd Date 8 Stockunit Double 8 Stockbp Double 8 Stockpperc Double 8 Stocksellp Text50
Cos.Thi
Field Name Type Size
Cuscode Integer
2
Cusname Text30
Cusphone Text20
Custaxno Text 20 Cuscity Text20
Cusadres Text50
Cusrd
Date 8 13I
I
i
i
I
I
Emp.TblField Name Type Size
Empcode Integer 2 Empname Text 20 Empphone Text 20 Empsc Text 20 Empcity Text 20 Em padres Text 50 Emprd Date 8 Empsal Double 8 lnvoicel.Tbl
Field Name Type Size
In code Integer 2 Cuscode Integer 2 Stockcode Integer 2 Sname 20 Text Quan Integer 2 Up rice Double
8
Totp Double8
Invoice2. TblField Name Type Size
In code Integer 2
Cuscode Integer 2
Subtot Double 8
Inv date Date 8
Empname Text 20
Account. Tbl
Field Name Type Size
Accdate Date 8
Expense Double 8
Revenue Double 8
Description Text 50
Exp code Integer
2
I
I
I
I
I
I
I
I
I
I
I
I
USER MANUALCement Co. is a package program to store the company daily transaction. When
you want to use Cement Co. program that you need a computer, which need minimum
requirements are:
Pentium I 200Mhz
64MBRam
5 GB Hard Driver
3
112Floppy Driver
8MB VGA Card
How to Install Program?
311:i Floppy Virtual Cement Co. system ( C:) (A:) CloneDri ... 1.00(F:)
~~
.:....J
depo (D:) system (E:) Shared Documents
First you put the Program CD to CD-ROM driver. Then enter the CD-ROM to copy
CEMENT file.
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
Files Currently on the CD Open
II
Explore Search ... ---~- ~ Cl!teFTP uploadSharing and Security ...
lg
Add to archive ... jaAdd to "cement.rar"3§ Compress and email ...
§Compress to "cemen~.rar" and email Scan with Norton AntiVirus
Send To Cut Paste Create Shortcut Delete Rename Properties
Then you will see Cement file then click mouse right, which you copy that file to move C:\ directory.
'iilP systeAf,(C:)
~dit View Favorites
...
it:
l
» 1 AddressJ~.,..,., C:\ . . . , Fil~ Folder ~~-,
J ~ --- , inetpub~ File Folder Arr arige Icons By ~ Refresh
Paste '
New
~-
,,., Properties=~
Then you will click my computer to enter C:\ directory to paste Cement file. You will right click to mouse anywhere to paste.
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
cementFile Foider File Folder dcodebank
After paste of Cement file click enter to cement file where in the C:\ directory.
,_,., Mail Recipient
'Ll
My DocumentsIQ,
Web Publishing wrzard ~. Macromedia FreeHand 10-; ~:.0::i~:e::::wffl/J"'-•l.!" ~·!sn:!2:fflEl\ ~ TextBridge Classic 2.0
Ii]
Winword ~ 3112 Floppy (A:) ':) Cement Co, 1. 00 (F:) . ..=....a
Run as ... ,~ CuteFTP uploadr
Scan with Norton AntiVirusL ~ Add to archive ... , Data JjAdd to "Cement Co .. rer"
BCompress and email...
i§Compress to "Cement Co .. rar" and email E-mail with Yahoo!
~--"--
~~~~~~ Cut Copy Create Shortcut Delete Rename ~ ~r ... Ezgi por ... CementlJLJ Compressed (zipped) Folder
fit
Desktop (create shortwt) .You will see files in the Cement file. Find Cement Co.exe and right click to mouse for
create a shortcut to desktop that run the program.
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
After than close the C:\Cement directory and you come to desktop to run program. Which
you will click the Shortcut to Cement Co.exe for start.
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
USER FLOWCHARTS MAINMENU START 1-FIRMS 2- CUSTOMERS 3- EMPLOYEES 4-ACCOUNT 5-REPORTS 6-ABOUT 7-EXIT N N N 19l
I
I
I
I
I
I
I
I
I
I
FIRMS 1-FIRMS RECORDS 2-EXIT N 20 y~ ENDI
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
FIRM RECORDS 1-NEW 2- UPDATE 3-DELEJE 4-FIND5- STOCK MIN. LEVEL 6- STOCK ENTRY 7-EXIT
N
N
NEW FIRM ENTRY
ENTER INFO OF FIRM
IF SAVE ---y----, N IF EXIT DATA STORED y
I
I
N { MAINMENU II
I
I
I
I
I
I
I
I
22
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
UPDATE FIRMENTER FIRM CODE
N FIRM NOT
FOUND
23 INFO OFFIRM
UPDATE FIRM
DATA
STOREDv
MAINMENUI
I
I
FIRM DELETE
ENTER FIRM CODE
N FIRM NOT FOUND
24
INFO OF FIRM N y FIRM DELETED ·Y MAINMENUI
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
FIRM FINDENTER FIRM CODE
N FIRM NOT FOUND y---, INFO OF FIRM 25 MAINMENU
I
I
I
I
I
I
I
I
I
I
I
STOCK MINIMUM LEVEL
lNFOOFMIN. STOCK LEVEL
26
l
I
I
I
I
ENTER FIRM CODE
N FIRM NOT FOUND N ,,.__ y
y-i
(0
STOCK ENTRY 1-NEW 2- UPDATE 3-DELETE 4~ FIND 5-EXIT N ·~B
27NEW STOCK ENTRY
ENTER INFO OF STOCK
N
G
C
MAINMENU)y
___t
STOCK UPDATE ENTER STOCK CODE ---Y. N INFO OF STOCK N N
G
C
MAINJ\1ENU ) 29STOCK DELETE ENTER STOCK CODE ---Y. N 30 INFO OF STOCK N
G
yt
C
MAINMENU)STOCK FIND ENTER STOCK CODE N INFO OF STOCK STOCK NOT FOUND N ~Exit/
I
8
y
yI
t
y NC
MAINMENU ) NG
I
8
I
ycb~
I
1I
I
I
I
I
I
31I
I
CUSTOMERSI
I
~- CUSTOMER RECORDS -EXITI
I
I / CHOOSEI
~y.e
I
NI
I< ,,.~~-
>--Y
I
I I ( ENDI
I
I
I
I
I
I
I
I
I
I
32CUSTOMER RECORDS 1-NEW 2- UPDATE 3-DELETE 4-FIND 5-SELLING 6-EXIT I
6-B
II
II
N-- B
I
' ~ 2.1.2I
I
NI
/" B
I
~ NI
~>-B
I
II
NVB
I
I sI
1'.TI
I
I
I
I
33I
I
I
I
I
I
I
I
NEW
CUSTOMER ENTRY
ENTER INFO OF CUSTOMER ---y----, N
DATA
STORED
IF
EXIT
y N 34UPDATE CUSTOMER ENTER CUSTOMER CODE N CUSTOMER NOT FOUND 35 INFO OF CUSTOMER UPDATE CUSTOMER DATA STORED y MAINMENU
CUSTOMER DELETE ENTER CUSTOMER INFO OF CUSTOMER N CUSTOMER NOT FOUND y
L
I
I
I
NI
I
CUSTOMER DELETEDI
I
I
/
IF>----v--.
<
.l..l'>--Y
I
I
"/I
\i
( MAINMENUI
I
I
I
36I
CUSTOMER FIND
I
I
ENTER CUSTOMERI
N INFO OF CUSTOMER CUSTOMER NOT FOUNDI
"" Ext1· -:y----,
<
--
>-Y
I
---
I
I
{
( 2.1 )
~ "' MAINMENUI
I
I
I
I
I
I
37SELLING ENTER CUSTOMER CODE r---y----, N ----y·----, GUSTO MER NOT FOUND ENTER INFO OF STOCK y N PRINTED y 38 DATA STORED
I
I
I
I
I
I
I
I
I
I
I
EMPLOYEES 1- FIRMS RECORDS 2-EXIT CHOOSE y~ N y N END 39I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
EMPLOYEE RECORDS 1-NEW 2- UPDATE 3-DELETE 4-FIND 5-EXITB
I N~B
I N ~~V
I N~B
40I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
NEWEMPLOYEE ENTRY
ENTER INFO OF EMPWYEE NIF
EXIT N DATA STORED 41I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
UPDATE EMPLOYEE ENfER EMPLOYEE NEMPWYEE
NOT FOUND 42 INFOOFEMPWYEE
UPDATE EMPLOYEE N y DATA STOUD y MAINMENUI
I
I
I
I
I
I
I
I
EMPLOYEE DELETE ENTER EMPLOYEE CODE NEMPLOYEE
NOT FOUND
43INFO OF
EMPWYEE
DELETE
yEMPLOYEE
DELETED N y MAINMENUI
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
EMPLOYEE FIND
ENTER EMPLOYEE CODEFOUND
'>-~~~~y~~~~~ NEMPLOYEE
NOT FOUND
44
INFO OF
EMPWYEE
y MAINMENUI
ACCOUNT8
I
I
/ 1- EXPENSE ENTI{Y 2--INVOICE RECEPTIONI
""'-3-EXITI
I / CHOOSEI
I/
""-y{0
I
I"-
/ NI
y{0
I
I NI
I<
rq:yr,,_ .• u..>--Y
I
I I ( ENDI
I
I
I
I
I
I
I
I
45I
I
I
I
I
I
I
I
I
EXPENSE ENTRY
ENTER INFO OF EXPENSE
IF
SAVE
',----y----, N IF EXIT N 46DATA
STORED
y MAINMENUI
I
I
I
I
I
I
I
I
I
I
I
I
I
I
INVOICE RECEPTION ENTER INVOICE NO CUSTOMER CODE FOUND N INVOICE NOT FOUND y INVOICE INFO MAINMENU47
y DATA STORED y MAINMENUI
I
I ,
I
I
I
I
I
I
I
I
I
REPORTS'1- FIRM GENERAL REPOR' 2- STOCK REPORT 3- CUSTOMER REPORT 4- EMPLOYEE REPORT 5- INVOICE REPORT 6-EXIT CHOOSE N N 48
I
FIRMS GENERAL REPORTG
I
I
I/
INFO OF FIRMSI
I
I
I
I
I
PRINTEDI
I
I
/:~~y
I
I
TN ( MAJNMENUI
I
I
I
I
I
I
I
I
I
I
49
STOCK REPORT INFO OF STOCKS y
/
N \MAINMENUI
I
I
I
I
I
I
I
I
I
I
50 PRINTEDI
I
I
I
I
CUSTOMER REPORT INFO OF CUSTOMERS N 51 PRINTED y MAINMENUEMPLOYEE REPORT INFO OF EMPLOYEES PRINTED N MAJNMENU 52
I
I
I
I
I
I
INVOICE REPORT N53
PRINTEDv
MAINMENUABOUT
INFO OF PROGRAM
N
MAIN MENU
Forml.Frm
I
I
Dim i As Integer
Dim ilkharf, yazi As String Private Sub mnucr _ Clickt) forml.Enabled = False Forrrri.Show
End Sub
Private Sub mnucrp _ Click() DataReport3. Show
End Sub
Private Sub mnue _ Clickt) Unload Me
End Sub
Private Sub mnuemp _ Clickf) forml.Enabled
=
False Form6.ShowEnd Sub
Private Sub mnuer Click() DataReport4. Show
End Sub
Private Sub mnuexp _ Clickt) Form9.Show
End Sub
Private Sub mnufrl_Click() DataReport 1. Show
End Sub
Private Sub mnufrr _ ClickQ forml.Enabled
=
False Form2.ShowEnd Sub
Private Sub mnuid _ Clickt) frmcus. Show
End Sub
Private Sub mnuir _ Click() DataReportS. Show End Sub
Private Sub mnupr _ Clickt) Form3.Show
End Sub
Private Sub mnurev _ Click() Form8.Show
End Sub
Private Sub mnusp _ Clickt) DataReport2. Show
End Sub
Private Sub mnuv _ ClickQ Forml 1.Show
SOURCE PROGRAM
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
End SubPrivate Sub Timerl_Timer() ilkharf = Left(Label 1. Caption, 1)
yazi = Right(Labell.Caption, Len(Labell.Caption) - 1) Label 1. Caption = yazi
+
ilkharfDim sString As String
sString = "This Program Created By Ezgi Ersoy ... " IfTimerl.Tag = 0 Then
Me. Caption = sString Timerl.Tag = 1
ElseifTimerl.Tag < Len(sString) Then
Me. Caption = Right( sString, Len( sString) - Timer 1. Tag) Timerl. Tag = Timerl. Tag
+
lElself Timerl .Tag= Len(sSttjng) Then Me. Caption = sString
Timerl.Tag = 0 End If
End Sub
Form2.Frm
Option Explicit
Private database As ADODB.Connection Private ezgi As ADODB.Recordset Private ersoy As String
Dim p As Panel
Private Sub Commandl_Click() Command7.Visible = False clear
coun
Command2.Enabled = True Command3 .Enabled = False Command4.Enabled = False Text2.SetFocus
End Sub
Private Sub Command2 _ Click() Dim sql, ask, askl
ask= MsgBox("Do You Want To Save That?", vblnformation
+
vbYesNo, "Save") If ask = vb Yes ThenIf Text2.text <> "" And MaskEdBoxl.text <> "" And MaskEdBox2.text <> 1111
And MaskEdBox3.text <>""And Text3.text <>""And Text4.text <>""Then
sql = "insert into firms(firmname, firmcode, firmphone, firmfax, firmtaxno, firmcity, firmadres, firmregdate) values("
sql = sql & "111 & Text2.text & 111,"
sql = sql & "" & Textl.text & "," sql = sql & ""1 & MaskEdBoxl.text & "1,"
sql = sql & ""1 & MaskEdBox2.text & 111,"
sql = sql & ""1 & MaskEdBox3.text & "1,"
sql = sql & 111"
& Text3 & 111,"
sql
=
sql & "111 & Text4 & 111,"sql
=
sql & ""1 & DTPickerl.Value & 111)"I
I
I
I
I
I
database.Execute ( sql) Dim i As Integer ProgressBarl .Min = 0 ProgressBarl.Max = 1000For i = ProgressBarl .Min To ProgressBarl .Max ProgressBarl .Visible= True
ProgressBarl .Value= i Next
ProgressBarl. Visible = False
askl = MsgBox("Firm Information Save Successful! ",, "Saved") Command2.Enabled = False
Command7.Visible = True Command3 .Enabled = True Command4.Enabled = True Command6.Enabled = True Else
askl = MsgBox("Please Fill The Other Texts!") Command". Visible = False
Command3.Enabled = False Command4.Enabled = False Command6.Enabled = True Text2.SetFocus End If End If End Sub
Private Sub Command3 _ ClickQ Dim ask As String
If Text I.text<> 1111
And Text2.text <> 1111
And MaskEdBoxl.text <> 1111 Then
ask = MsgBox("Do You Want To Update Firm Information?", vbCritical
+
vbYesNo, "Update")If ask = vb Yes Then conn
ersoy = "update firms set firmname="' & Text2.text & "', firmphone="' & MaskEdBoxl .text & "', firrnfax="' & MaskEdBox2.text & '", firmtaxno="' & MaskEdBox3.text & "', firmcity="' & Text3.text & '", firmadres="' & Text4.text & "' firmregdate="' & DTPickerl.Value & "' where firrncode=" & Textl.text & " "
database.Execute ( erso,y)
MsgBox ("Firm Information Updated!") End If
Else
MsgBox ("Please Find Any Firm!") End If Command7.Visible = False Command3.Enabled = False Command4.Enabled = False clear End Sub
Private Sub Command-l _ ClickO Dim ask
If Text I .text<> 1111
Then
I
I
I
I
I
I
ask= MsgBox("Do You Want To Delete This Firm Detail?", vbExclamation
+
vbYesNo, "Delete")If ask = vb Yes Then conn
ersoy ="delete* from firms where firmcode=" & Textl.text & "" database.Execute ( ersoy)
ersoy ="delete* from stocks where firmcode=" & Textl.text & 1111 database.Execute ( er soy)
MsgBox ("Firm Information Deleted!") End If
Else
MsgBox ("Please Find Any Firm!") End If Command7.Visible = False Command3.Enabled = False Command4.Enabled = False clear coun End Sub
Private Sub Command5 ~ Click() database. Close
Unload Me forml.Show
forml.Enabled = True End Sub
Private Sub Command6 _ Click() Dim find As Integer
conn
find= Val(InputBox("Please Insert The Wanted Firm Code!")) ersoy = "select * from firms where firm code=" & find & ""
Set ezgi = database.Execute(ersoy) If ezgi.EOF Then
MsgBox ("The Wanted Firm is Not Available!") Else
Dim i As Integer ProgressBarl .Min= 0 ProgressBarl.Max = 1000
For i = ProgressBarl .Min To ProgressBarl .Max ProgressBar 1. Visible = True
ProgressBarl.Value =
i
Next ProgressBarl.Visible = False Textl.text = ezgi![firmcode] Text2.text = ezgi![firmname] MaskEdBoxl.text = ezgi![firmphone] MaskEdBox2.text = ezgi![firmfax] MaskEdBox3. text = ezgi ! [ firmtaxno] Text3.text = ezgi![firmcity]Text4.text = ezgi'[firmadres]
DTPicker 1. Value = ezgi ! [ firmregdate]
I
I
I
I
I
I
I
I
I
I
I
I
I
Text2.SetFocus
Command2.Enabled = False
Command3
.Enabled = True
Command4.Enabled = True
Command".
Visible = True
End If
ezgi.Close
End Sub
Private Sub Command?_
Click()
Form4.Textl.text = Textl.text
Form4.Text2.text = Text2.text
Form4.Show
Unload Forrn2
End Sub
Private Sub Form_Load()
ProgressBarl .Align= vbAlignBottom
ProgressBarl.Visible = False
coun
With StatusBar I .Panels
Set p =.Add(,,, sbrTime)
Set p =.Add(,,, sbrDate)
End With
DTPickerl.Value = Date
End Sub
Private Sub clear()
Textl.text =
1111Text2.text = ""
Text3.text =
1111Text4.text =
1111MaskEdBoxl .Mask=
1111MaskEdBoxl.text =
1111MaskEdBoxl .Mask =
110(999)999-99-99
11MaskEdBox2.Mask =
1111MaskEdBox2.text =
1111MaskEdBox2.Mask =
110(999)999-99-99
11MaskEdBox3 .Mask = ""
MaskEdBox3.
text = ""
MaskEdBox3
.Mask = "999-999-999-999-999
11DTPicker 1. Value = Date
End Sub
Private Sub coun()
Dim Count, Count 1
conn
Set ezgi = New ADODB.Recordset
Count = "select
*
from Firms"
Set ezgi = database.Execute(Count)
If ezgi.EOF Then
Command6.Enabled = False
Textl.text = 1
Else
Countl = "select max(firmcode) as cis from firms" Set ezgi = database.Execute(Countl)
Text 1. text = ezgi ! [ cis]
+
1 End Ifezgi.Close End Sub
Public Sub conn()
Set database= New ADODB.Connection database.CursorLocation = adUseServer
ersoy = "provider=Microsoft.jet.oledb.3.51; Data Source=" & App.Path & "\ezgi.mdb" database. Open ersoy
End Sub
Private Sub Form_Unload(Cancel As Integer) Unload Me
form I .Enabled = True End Sub
Form3.Frm
Option Explicit
Private Declare Function DrawText Lib "user32" Alias "Draw'I'ext/s" (ByVal hdc As Long, ByVal lpStr As String, ByVal n.Count As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Private Declare Function GetTickCount Lib "kemel32" () As Long Const DT _ CENTER As Long = &Hl
Const DT _ LEFT As Long = &HO Const DT _ RIGHT As Long = &H2 Private Type RECT
Left As Long Top As Long Right As Long Bottom As Long End Type
Dim kare As RECT
Const yazi As String = "This Project Created By EZGI ERSOY. .. " & vbCrLf & _ vbCrLf & vbCrLf &
"CIS - 400" & vbCrLf & vbCrLf & vbCrLf &
I
-
"Cement Selling Package Program" & _ vbCrLf & vbCrLf &
">>>> NEAR EAST UNIVERSITY<<<<" Private Sub Form_ Load()
kare.Left = 0
kare.Top = pano.ScaleHeight kare.Right = pano. Scale Width kare.Bottom = pano.ScaleHeight End Sub
Private Sub Timerl_Timer()
-
"Graduation Project" & _ vbCrLf & vbCrLf &
I
I
I
I
I
I
I
I
I
I
I
kare.Top = kare.Top - 1 kare.Bottom = kare.Bottom If kare.Top = -170 Then kare.Top=
pano.ScaleHeight End If pano.ClsDrawTex:t pano.hdc, yazi, -1, kare, DT_CENTER pano.Refresh
End Sub
Private Sub Form_ KeyPress(Key Ascii As Integer) Unload Me
End Sub
Private Sub Form_ Unload(Cancel As Integer) Unload Me
forml .Enabled= True forml.Show
End Sub
Private Sub Frame l _ Click() Unload Me
End Sub
Private Sub Form_ Activate() forml .Enabled= False End Sub
Form4.Frm
Option Explicit
Private database As ADODB.Connection Private ezgi As ADODB.Recordset Private ersoy As String
Dim p As Panel Dim ah As Boolean
Dim a, b, d, e, g, h, f As Double Private Sub Command l _ Click() clear
coun
Command2.Enabled = True Command3 .Enabled
=
False Command4.Enabled = False Tex:t4.SetFocusEnd Sub
Private Sub Command2 _ Click() care
If ah = True Then Dim sql, ask, askl
ask= MsgBox("Do You Want To Save That?", vblnformation
+
vbYesNo, "Save") If ask = vb Yes ThenIf Text4.tex:t <> 1111 And Tex:t5.tex:t <> 1111 And Text6.tex:t <> 1111
And Tex:t8.tex:t <> 1111
And TextlO.text <> 1111
And Textl I.text<> 1111
Then
sql = "insert into stocks(firmname, firmcode, stockcode, stockname, stockminl, stockbd, stockunit, stockbp, stockpperc, stocksellp) values("
sql = sql & 11111
& Text2.text & 111,11
sql = sql & 1111
& Textl.text & "," sql = sql & 1111
& Text3.text & "," sql = sql & 11111
& Text4.text & 111,11
sql = sql & 1111
& Textl 1 & "," sql = sql & 11111
& Labell 1.Caption & 111,11
sql = sql & 1111 & a & "'"
sql = sql & 1111 & b & "'"
sql = sql & "" & h & "," sql = sql & 11111 & Text9 & 111)11
database.Execute (sql) Dim i As Integer ProgressBarl .Min= 0 ProgressBarl .Max= 1000
For i
=
ProgressBarl.Min To ProgressBarl.Max ProgressBarl.Visible = TrueProgressBarl.Value =
i
Next
ProgressBarl.Visible = False
askl = MsgBox("stock Information Save Successful! ",, "Saved") Command2,Enabled = False
Command3 .Enabled = True Command-l.Enabled = True Else
askl = MsgBox("Please Fill The Other Texts!") Command3 .Enabled = False
Command4.Enabled = False Text4.SetFocus End If End If End If End Sub
Private Sub Command3 _ Click() Frame 1. Visible
= True
Command3 .Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text8.Enabled = False TextlO.Enabled = False Textl 1.Enabled = False End Sub
Private Sub Command4 _ Click() Dim ask
If T ext3. text
<>
1111Then
ask= MsgBox("Do You Want To Delete This Stock Detail?", vbExclamation
+
vbYesNo, "Delete")If ask = vb Yes Then
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
connersoy ="delete* from stocks where stockcode=" & Text3.text & 1111
database.Execute ( ersoy)
MsgBox (" Stock Information Deleted!") End If
Else
MsgBox ("Please Find Any Stock!") End If Command3.Enabled = False Command4.Enabled = False clear coun End Sub
Private Sub Command5 _ Click() database. Close
Unload Me Form2.Show End Sub
Private Sub Command6 _ Click() Dim find As Integer
conn
find= Val(InputBox("Please Insert The Wanted Stock Code!")) ersoy ="select* from stocks where stockcode=" & find & ""
Set ezgi = database.Execute(ersoy) If ezgi.EOF Then
MsgBox ("The Wanted Stock is Not Available!") Else.
Dim i As Integer ProgressBar l .Min = 0 ProgressBarl.Max = 1000
For i = ProgressBarl .Min To ProgressBarl .Max ProgressBar 1. Visible = True
ProgressBarl.Value = i Next
ProgressBar 1. Visible = False Textl.text = ezgil[firmcode] Text2.text = ezgi![firmname] Text3.text = ezgi![stockcode] Text4.text = ezgi![stockname] Text5.text = ezgi![stockunit] Text6.text = ezgi![stockbp] Text8. text = ezgi ! [ stockpperc] Text9. text = ezgi ! [ stocksellp] Labell 1.Caption = ezgi![stockbd] Textl I.text= ezgi![stockminl] Command2.Enabled = False Command3 .Enabled
=
True Command4.Enabled = True End Ifezgi.Close
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
End SubPrivate Sub Command?_ Clickt) database. Close
Unload Me Unload Form2 forml.Show
forml .Enabled= True End Sub
Private Sub Command8 _ Clickt) Dim ask As String
If Text12.text <> 1111 And Text13.text <> 1111 And Text14.text <> 1111 And Text15.text <> 1111 And Textl6.text <> 1111 Then
ask = MsgBox("Do You Want To Update Stock Information?", vbCritical
+
vbYesNo, "Update")If ask = vb Yes Then conn
ersoy = "update stocks set stockunit=" & Text5.text & ", stockbp=" & Text6.text & ", stockpperc=" & Text8.text & ", stocksellp=" & Text9.text & 111,
stockminl=" & Textl 1.text & 11
where
stockcode="
& Text3.text & 11 11database.Execute ( ersoy) Dim i As Integer
ProgressBarl .Min= 0 ProgressBarl.Max = 1000
For i = ProgressBarl.Min To ProgressBarl.Max ProgressBar 1. Visible = True
ProgressBarl.Value = i Next
ProgressBarl .Visible= False
MsgBox ("Stock Information Updated! 11)
End If Else
MsgBox ("Please Enter The New Stock Information!") Command3.Enabled = False End If Textl2.text = 1111 Text13.text = 1111 Textl4.text = 1111 Textl5.text = 1111 Textl6.text = 1111
Command3 .Enabled = True Command4.Enabled = False Command6.Enabled = True Frame I.Visible= False Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text8.Enabled = True TextlO.Enabled = True Textl I.Enabled= True End Sub
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
Private Sub Command9
_
Click()
Frame I.Visible= False
Textl2.text = ""
Text13.text = ""
Textl4.text = ""
Textl5.text = ""
Textl6.text =
1111clear
End Sub
Private Sub Form Loadi)
ProgressBarl .Align = vbAlignBottom
ProgressBarl.Visible = False
coun
With StatusBarl .Panels
Set p =.Add(,,, sbrTime)
Set p =.Add(,,, sbrfrate)
End With
Label
11.Caption = Date
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
Form2.Show
End Sub
Private Sub Textl O _
Change()
On Error Resume Next
a= Text5.text
b = Text6.text
h = Text8.text
d = Val(a)
*
Val(b)
e = ((d
*
Val(h)) / 100)
+
d
f= e I a
g =
((f*
Val(TextlO.text)) / 100)
+
fText9.text = g
End Sub
Private Sub coun()
Dim Count, Count 1
conn
Set ezgi = New ADODB.Recordset
Count= "select
*
from stocks"
Set ezgi = database.Execute(Count)
If ezgi.EOF Then
Command6.Enabled = False
Text3.text = 1
Else
Countl = "select max(stockcode) as cis from stocks"
Set ezgi = database.Execute(Countl)
Text3.text = ezgi![cis]
+
1
End If
ezgi.Close
End Sub
I
Public Sub conn()
Set database= New ADODB.Connection database.CursorLocation = adUseClient
ersoy = "provider=Microsoft.jet.oledb.3.51; Data Source=" & App.Path & "\ezgi.mdb" database. Open ersoy
End Sub
Private Sub
clean)
Text4.text = "" Text5.text = "" Text6.text = "" Text8.text
= ""
Text9.text=
1111 TextlO.text = "" Textl 1.text= ""
End SubPrivate Sub TextlO_KeyPress(KeyAscii As Integer) If Key Ascii = 13 Then
KeyAscii
=
0 SendKeys "{Tab}"ElselflnStr(("1234567890" & vbBack & ""), Chr(KeyAscii)) = 0 Then KeyAscii =
0
End If End Sub
Private Sub Text12_LostFocus() a= Val(Text12.text)
b =a+ Val(Text5.text) Text5.text = b
End Sub
Private Sub Text13 _LostFocus() a= Valf'I'ext l Ltext)
Text6.text
=
a End SubPrivate Sub Text14_LostFocus() a= Val(Text14.text)
Text8.text = a End Sub
Private Sub Textl 5 _ LostFocus() a= Val(Text15.text)
TextlO.text = a End Sub
Private Sub Text 16 _ KeyPress(Key Ascii As Integer) If Key Ascii = 13 Then
a= Val(Text14.text) Text8.text
=
a End IfEnd Sub
Private Sub Text16_LostFocus()
IfVal(Text5.text) <= Val(Textl6.text) Then
MsgBox ("Please Enter Amount Smaller Than Unit!") Textl6.SetFocus
I
I
I
I
I
I
I
I
I
I
I
I
66I
I
I
I
I
Else
a= Val(Textl6.text)
Textl I.text= a
End If
End Sub
Private Sub Text5
_KeyPress(KeyAscii
As Integer)
If Key
Ascii = 13 Then
KeyAscii = 0
SendKeys "{Tab}"
ElseiflnStr((" 1234567890"
&vbBack
& '"'),Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii
As Integer)
If Key
Ascii = 13 Then
KeyAscii = 0
SendKeys "{Tab}"
ElseiflnStr(("l234567890"
&vbBack
& 1111),Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End Sub
Private Sub Text?
_KeyPress(KeyAscii
As Integer)
If Key
Ascii = 13 Then
KeyAscii = 0
SendKeys "{Tab}"
Elself InStr((" 1234567890"
&vbBack
& ""),Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End Sub
Private Sub Text8
_
KeyPress(KeyAscii As Integer)
If Key
Ascii = 13 Then
KeyAscii =
OSendKeys "{Tab}"
ElselflnStr(("l234567890"
&vbBack
& 1111),Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End Sub
Private Sub care()
lfLen(Text4.text) = 0 Then
MsgBox ("Please Fill The Texts!")
Text4.SetFocus
Else
lfVal(Text5.text) <= Val(Textl I.text) Then
ah= False
MsgBox ("Please Enter Amount Smaller Than Unit!")
Textl 1.SetFocus
Else
ah= True
End If
I
I
I
End If
End Sub
Form5.FrmOption Explicit
Dim p As Panel
Private database As ADODB.
Connection
Private ezgi As ADODB.Recordset
Private ersoy As String
Private Sub Command
I_
Click()
clear
coun
Command2.Enabled = True
Command3
.Enabled = False
Command4.Enabled = False
Command7.Visible
= False
Text2. SetFocus
End Sub
Private Sub Command2
_
Click()
Dim sql, ask, askl
ask= MsgBox("Do You Want To Save That?", vblnformation
+
vbYesNo, "Save")
If ask = vb
Yes Then
If Text2.text <> '"' And MaskEdBoxl.text <>
1111And Text3.text <>
1111And
MaskEdBox3.text <>""And Text3.text <>'"'And Text4.text <>""Then
sql = "insert into cus(
cusname, cuscode, cusphone, custaxno, cuscity, cusadres, cusrd)
values("
sql = sql
& ""' &Text2.text
& 11', 11sql = sql
& "" &Textl.text
& 11,11sql = sql
& ""' &MaskEdBoxl.text
& 11',"sql = sq1
& "'" &MaskEdBox3.text
& "',"sql = sql
& ""' &Text3
& "',"sql = sql
& "'" &Text4
& "', 11sql = sql
& ""' &DTPickerl.Value
& "')"database.Execute (sql)
Dim i As Integer
ProgressBarl .Min = 0
ProgressBarl.Max = 1000
For i = ProgressBarl .Min To ProgressBarl .Max
ProgressBarl .Visible= True
ProgressBarl.Value = i
Next
ProgressBarl.Visible = False
askl = MsgBox("Customer Information Save Successful! ",, "Saved")
Command2.Enabled = False
Command3
.Enabled = True
Command4.Enabled = True
Command7.Visible
= True
Command6.Enabled = True
Else
I
I
I
I
I
I
askl = MsgBox("Please Fill The Other Texts!", vbCritical, "Customer") Command6.Enabled = True
Command3 .Enabled = False Command4.Enabled = False Text2. SetFocus
End If End If End Sub
Private Sub Command3 _ Click() Dim ask As String
If Text I.text<>"" And Text2.text <>'"'And MaskEdBoxl.text <>""Then
ask= MsgBox("Do You Want To Update Customer Information?", vbCritical
+
vbYesNo, "Update")If ask = vb Yes Then conn
ersoy = "update cus set cusname=" & Text2.text & "', cusphone="' & MaskEdBoxl.text & "', custaxno='" & MaskEdl3ox3.text & "',
cuscity="
& Text3.text & "',cusadres="
& Text4.text & "',cusrd="
& DTPickerl.Value & "' where cuscode=" & Textl.text & " " database.Execute ( ersoy)MsgBox ("Customer Information Updated!") End If
Else
MsgBox ("Please Find Any Customer!") End If
Command3 .Enabled = False Command4.Enabled = False clear
End Sub
Private Sub Command4_ Click() Dim ask
If Text 1. text <> "" Then
ask = MsgBox("Do You Want To Delete This Customer Detail?", vbExclamation
+
vb Y esNo, "Delete")If ask = vb Yes Then conn
er soy = "delete
*
from cus where cuscode=" & Text 1. text & "" database.Execute ( ersoy)MsgBox ("Customer Information Deleted!") End If
Else
MsgBox ("Please Find Any Customer!") End If
Command3 .Enabled = False Command4.Enabled = False clear
coun End Sub
Private Sub Commando , Click() Unload Me
forml.Show
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
forml .Enabled= True
End Sub
Private Sub Command6
_
Click()
Dim find As Integer
conn
find= Val(InputBox("Please Insert The Wanted Customer Code!"))
ersoy ="select* from cus where cuscode="
&find
& 1111Set ezgi = database.Execute(ersoy)
If ezgi.EOF Then
MsgBox ("The Wanted Customer is Not Available!")
Else
Dim i As Integer
ProgressBarl .Min= 0
ProgressBarl.Max = 1000
For i = ProgressBarl.Min To ProgressBarl.Max
ProgressBar 1. Visible = True
ProgressBarl.Value = i
Next
ProgressBarl.Visible = False
Text I.text= ezgi![cuscode]
Text2.text = ezgi![cusname]
MaskEdBox 1. text = ezgi
! [ cusphone]
MaskEdBox3.
text = ezgi ! [ custaxno]
Text3.text = ezgi![cuscity]
Text4.text = ezgi![cusadres]
DTPickerl.Value
=ezgi![cusrd]
Text2. SetF
ocus
Command7.Visible
=
True
Command2.Enabled
=False
Command3
.Enabled
=True
Command4.Enabled = True
End If
ezgi.Close
End Sub
Private Sub Command?_
Click()
Form7.Text4.text
=Textl.text
Form7.Text5.text = Text2.text
Form7.Text7.text = MaskEdBoxl.text
Form7.Text6.text
=Text4.text
Form7.Show
End Sub
Private Sub Form_Load()
ProgressBarl.Align = vbAlignBottom
ProgressBarl .Visible= False
coun
With StatusBarl .Panels
Set p =.Add(,,, sbrTime)
Set p =.Add(,,, sbrDate)
End With
DTPicker 1. Value
=
Date
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
End SubPrivate Sub clean) Textl.text = 1111 Text2.text = "" Text3.text = "" Text4.text = 1111 Mask:EdBoxl.Mask = 1111 Mask:EdBoxl.text = 1111 Mask:EdBoxl .Mask= "0(999)999-99-99" Mask:EdBox3 .Mask = 1111 Mask:EdBox3.text = "" Mask:EdBox3 .Mask = "999-999-999-999-999" DTPickerl.Value = Date End Sub
Private Sub coun() Dim Count, Count 1 conn
Set ezgi = New ADODB.Recordset Count= "select
*
from cus" Set ezgi = database.Execute(Count)If ezgi.EOF Then
Command6.Enabled = False Textl.text = 1
Else
Countl = "select max(cuscode) as cis from cus" Set ezgi = database.Execute(Countl)
Textl.text = ezgi![cis]
+
1 End Ifezgi.Close End Sub
Public Sub conni)
Set database= New ADODB.Connection database.CursorLocation = adUseClient
ersoy = "provider=Microsoft.jet.oledb.3.51; Data Source="
&
App.Path & "\ezgi.mdb" database. Open ersoyEnd Sub
Private Sub Form_Unload(Cancel As Integer) Unload Me
forml.Show
form I .Enabled = True End Sub
Form6.Frm
Option Explicit Dim p As Panel
Private database As ADODR Connection Private ezgi As ADODB.Recordset Private ersoy As String
Private Sub Command l _ Click()
I
I
I
I
I
clear coun Command2.Enabled = True Command3 .Enabled = False Command4.Enabled = False Text2.SetFocusEnd Sub
Private Sub Command2 _ Click() Dim sql, ask, askl
ask= MsgBox("Do You Want To Save That?", vblnformation
+
vbYesNo, "Save") If ask = vb Yes ThenIf Text2.text <> "" And MaskEdBoxl.text <> "" And Text3.text <> "" And MaskEdBox3.text <>'"'And Text3.text <>""And Text4.text <>""Then
sql = "insert into emp( empname, empcode, empphone, empsc, empcity, empadres,empsal, emprd) values("
sql = sql & "'" & Text2.text & "'," sql = sql & "" & Textl.text & ","
sql = sql & ""' & MaskEdBoxl.text & "'," sql = sql & ""' & MaskEdBox3.text & "'," sql = sql & "'" & Text3 & "',"
sql = sql & ""' & Text4 & "'," sql = sql & "" & TextS.text & ","
sql = sql & ""' & DTPickerl.Value & "')" database.Execute (sql)
Dim i As Integer ProgressBarl .Min= 0 ProgressBarl.Max = 1000
For i = ProgressBarl.Min To ProgressBarl.Max ProgressBar 1. Visible = True
ProgressBarl.Value = i Next
ProgressBarl.Visible = False
askl = MsgBox("Employee Information Save Successful! ",, "Saved") Command2.Enabied = False
Command3 .Enabled = True Command4.Enabled = True Command6.Enabled = True Else
askl = MsgBox("Please Fill The Other Texts!") Command3.Enabled = False Command4.Enabled = False Command6.Enabled = True Text2.SetFocus End If End If End Sub
Private Sub Command3 _ Click() Dim ask As String
If Textl.text <>""And Text2.text <>""And MaskEdBoxl.text <>""Then
I
ask= MsgBox("Do You Want To Update Employee Information?", vbCritical
+
vbYesNo, "Update")If ask = vb Yes Then conn
ersoy = "update emp set empname='" & Text2.text & "', empphone="' & Mask:EdBoxl.text & "', empsc="' & Mask:EdBox3.text & "', empcity="' & Text3.text & '", empadres=" & Text4.text & "',empsal=" & Text5.text & ", emprd="' & D'I'Picker l.Value & "' where empcode=" & Textl.text & ""
database.Execute (ersoy)
MsgBox ("Employee Information Updated!") End If
Else
MsgBox ("Please Find Any Employee!") End If
Command3 .Enabled = False Command4.Enabled = False clear
End Sub
Private Sub Command4 _ Click() Dim ask
If Textl.text <> 1111
Then
ask = MsgBox("Do You Want To Delete This Employee Detail?", vbExclamation
+
vbYesNo, "Delete")If ask = vb Yes Then conn
ersoy ="delete* from emp where empcode=" & Textl.text & 1111 database.Execute ( ersoy)
MsgBox ("Employee Information Deleted!") End If
Else
MsgBox ("Please Find Any Employee!") End If Command3.Enabled = False Command4.Enabled = False clear coun End Sub
Private Sub Command5 _ Click() database. Close
Unload Me forml.Show
forml .Enabled= True End Sub
Private Sub Command6 _ Click() Dim find As Integer
conn
find= Val(InputBox("Please Insert The Wanted Employee Code!")) ersoy ="select* from emp where empcode=" & find & 111'
Set ezgi = database.Execute(ersoy) If ezgi.EOF Then
MsgBox ("The Wanted Employee is Not Available!") Else
Dim i As Integer ProgressBarl .Min= 0 ProgressBarl.Max = 1000
For
i
= ProgressBarl .Min To ProgressBarl .Max
ProgressBar 1. Visible = True
ProgressBarl.Value = i
Next
ProgressBar 1. Visible
=
False
Textl.text = ezgi![empcode]
Text2.text = ezgi![empname]
MaskEdBox 1. text = ezgi
! [ empphone]
MaskEdBox3.text
=ezgi![empsc]
Text3 . text = ezgi
! [ empcity]
Text4.text = ezgi![empadres]
Text5.text
=ezgi![empsal]
DTPickerl.Value = ezgi![emprd]
Text2. SetFocus
Command2.Enabled = False
Command3
.Enabled = True
Command4.Enabled = True
End If
ezgi.Close
End Sub
I
Private Sub Form_Load()
ProgressBarl.Align = vbAlignBottom
ProgressBarl. Visible
=False
coun
With StatusBar I .Panels
Set p =.Add(,,, sbrTime)
Set p =.Add(,,, sbrDate)
End With
DTPickerl.Value = Date
End Sub
Private Sub clear()
Textl.text
= ""
T ext2.
text
=
1111Text3.text = ""
Text4.text = ""
Text5.text = ""
MaskEdBox I .Mask = ""
MaskEdBox 1. text =
1111MaskEdBoxl.Mask = "0(999)999-99-99"
MaskEdBox3 .Mask = "
11MaskEdBox3.text = ""
MaskEdBox3 .Mask = "999-999-999-999-999"
DTPickerl.Value = Date
End Sub
74Private Sub coun() Dim Count, Count 1 conn
Set ezgi = New ADODB.Recordset Count= "select* from emp" Set ezgi = database.Execute(Count)
If ezgi.EOF Then
Command6.Enabled = False Textl.text = 1
Else
Countl = "select max(empcode) as cis from emp" Set ezgi = database.Execute(Countl)
Textl.text = ezgi![cis]
+
1
·
End If
ezgi.Close
End Sub
Public Sub conn()
Set database= New ADODB.Connection
database.CursorLocation = adUseClient
ersoy = "provider=Microsoft.jet.oledb.3.51; Data Source="
&App.Path
&"\ezgi.mdb"
database.
Open ersoy
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
form I.Show
form I .Enabled = True
End Sub
Private Sub Text5
_KeyPress(KeyAscii
As Integer)
If Key
Ascii = 13 Then
KeyAscii = 0
SendKeys "{Tab}"
ElselflnStr(("l234567890"
&vbBack
& ""),Chr(KeyAscii)) = 0 Then
KeyAscii =
OEnd If
End Sub
Form7.Frm
Option Explicit
Private database As ADODB.
Connection
Private ezgi, ezgil As ADODB.Recordset
Private ersoy As String
Private sql, sql
1, sql2, sql3 As String
Private Sub Command
l _
Click()
database.
Close
Unload Me
Unload Forms
forml.Show
forml.Enabled = True
End Sub
75I
I
I
I
I
Private Sub Command 10 _ Click() Form12.Show
End Sub
Private Sub Command2 _ Click() database. Close Unload Me Form5.Command7.Visible = False Form5.Show Form5.Enabled = True End Sub
Private Sub Command3 _ Click() Dim cevap, sec, i
Dim index As Integer sec = Listl (index).Listlndex If sec
<
0 Thencevap = MsgBox("Select the removed item", vbCritical, "Remove Item") Else
cevap = MsgBox("Are you sure to remove this item from the list ?", vbYesNo + vbQuestion, "Remove item")
If cevap = vb Yes Then For i = 0 To 4
Listl (i).Removeltem Listl (i).Listlndex Next Dimj, a, b For
j
= 0 To List1(4).ListCount a= Val(List1(4).ListG)) b=b+a Next Text2.text = b End If End If End SubPrivate Sub coun() Dim Count, Count 1 conn
Set ezgi = New ADODB.Recordset Count = "select incode from invoice2" Set ezgi = database.Execute/Count)
If ezgi.EOF Then Label9.Caption = 1 Else
Countl = "select max(incode) as cis from invoice2" Set ezgi = database.Execute(Countl)
Label9.Caption = ezgi![cis] + 1 End If
ezgi.Close End Sub
Private Sub Command4 _ Click()
Dim k, i, ask, toplam, stk, stk2, sq, sq 1, sq2, decrip IfDBCombol.text