• Sonuç bulunamadı

NEAR EAST UNIVERSITY FACULTY OF ECONOMICS AND ADMINISTRATIVE SCIENCE DEPARTMENT OF COMPUTER INFORMATION SYSTEMS

N/A
N/A
Protected

Academic year: 2021

Share "NEAR EAST UNIVERSITY FACULTY OF ECONOMICS AND ADMINISTRATIVE SCIENCE DEPARTMENT OF COMPUTER INFORMATION SYSTEMS"

Copied!
102
0
0

Yükleniyor.... (view fulltext now)

Tam metin

(1)

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~

(2)

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

(3)

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.

(4)

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.

(5)

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:

(6)

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.

(7)

---·---,-,---·-

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--~

(8)

- -

-

- - -

-

-

- - -

- - -

TOP LEVELDFD OF CEMENT CO. PROCESS SYSTEM

FIRMS CUS10MER Account File EMPLOYEE USER

- -

(9)

-

- -

-

- -

-

-

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.._ _

(10)

-

-

I-

-

-

- '-

-

I-

- - -

- - - -

-

-

DETAILED DFD OF FIRMS PROCESS (2)

00

Stock Order

I

FIRMS

r

New Stock Entry

l

0

·i

,.8

..s

New FiruJ.

Entry---...:

~

FinnsFile

-fiJJl\ Se\ect fo< oe\et...--- ~

.pe\eteo fitOl b1f0---

Stocks File

Finn Search

(11)

- -

- -

-

-

-

-

-

••••••

- -

- - -

••••

-

-

DETAILED DFD OF EMPLOYEE PROCESS(3)

I

EMPWYEE

1...

Employee Salary

l

§

8

•....•

§>

§

§-. 0 =.

User Wanted Employee Info Delete USER

(12)

-

-

DETAILED DFD OF ACCOUNT PROCESS(4}

<,~~

~eY ~~-Je~

EMPWYEE

(13)

- -

-

-

- -

-

-

-

·- - - -

-

-

- - -

(14)

- ·- - I- -

I-

I-· ·- - - - - ·- - ·- - ·- - ·- -

SYSTEM BLOCK DIAGRAM OF CEMENT CO.

FIRMS CUSTOMERS EMPLOYEES ACCOUNT

FIRM RECORDS

r-

CUSTOMER RECORDS

r-

EMPLOYEE RECORDS

New 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

(15)

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 Integer

2

Firmphone Text

20

Firmfax Text

20

Firmtaxno Text

20

Firmcity

Text

20

Firmadres Text

50

Firmregdate Date 8

Stocks.Thi

Field Name Type Size

Firmname Text

50

Firmcode Integer

2

Stockcode Integer

2

Stockname Text

20

stockminl Integer

2

Stockbd Date 8 Stockunit Double 8 Stockbp Double 8 Stockpperc Double 8 Stocksellp Text

50

Cos.Thi

Field Name Type Size

Cuscode Integer

2

Cusname Text

30

Cusphone Text

20

Custaxno Text 20 Cuscity Text

20

Cusadres Text

50

Cusrd

Date 8 13

(16)

I

I

i

i

I

I

Emp.Tbl

Field 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 Double

8

Invoice2. Tbl

Field 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

(17)

I

I

I

I

I

I

I

I

I

I

I

I

USER MANUAL

Cement 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

112

Floppy 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.

(18)

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 upload

Sharing and Security ...

lg

Add to archive ... jaAdd to "cement.rar"

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.

(19)

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

cement

File Foider File Folder dcodebank

After paste of Cement file click enter to cement file where in the C:\ directory.

,_,., Mail Recipient

'Ll

My Documents

IQ,

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 upload

r

Scan with Norton AntiVirus

L ~ 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 ... Cement

lJLJ 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.

(20)

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.

(21)

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 19

(22)

l

I

I

I

I

I

I

I

I

I

I

FIRMS 1-FIRMS RECORDS 2-EXIT N 20 y~ END

(23)

I

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-FIND

5- STOCK MIN. LEVEL 6- STOCK ENTRY 7-EXIT

N

N

(24)

NEW FIRM ENTRY

ENTER INFO OF FIRM

IF SAVE ---y----, N IF EXIT DATA STORED y

I

I

N { MAINMENU I

I

I

I

I

I

I

I

I

I

22

I

(25)

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

UPDATE FIRM

ENTER FIRM CODE

N FIRM NOT

FOUND

23 INFO OF

FIRM

UPDATE FIRM

DATA

STORED

v

MAINMENU

(26)

I

I

I

FIRM DELETE

ENTER FIRM CODE

N FIRM NOT FOUND

24

INFO OF FIRM N y FIRM DELETED ·Y MAINMENU

(27)

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

FIRM FIND

ENTER FIRM CODE

N FIRM NOT FOUND y---, INFO OF FIRM 25 MAINMENU

(28)

I

I

I

I

I

I

I

I

I

I

I

STOCK MINIMUM LEVEL

lNFOOFMIN. STOCK LEVEL

26

(29)

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

27

(30)

NEW STOCK ENTRY

ENTER INFO OF STOCK

N

G

C

MAINMENU)

y

___t

(31)

STOCK UPDATE ENTER STOCK CODE ---Y. N INFO OF STOCK N N

G

C

MAINJ\1ENU ) 29

(32)

STOCK DELETE ENTER STOCK CODE ---Y. N 30 INFO OF STOCK N

G

y

t

C

MAINMENU)

(33)

STOCK FIND ENTER STOCK CODE N INFO OF STOCK STOCK NOT FOUND N ~Exit/

I

8

y

y

I

t

y N

C

MAINMENU ) N

G

I

8

I

y

cb~

I

1

I

I

I

I

I

I

31

I

(34)

I

CUSTOMERS

I

I

~- CUSTOMER RECORDS -EXIT

I

I

I / CHOOSE

I

~y.e

I

N

I

I

< ,,.~~-

>--Y

I

I I ( END

I

I

I

I

I

I

I

I

I

I

I

32

(35)

CUSTOMER RECORDS 1-NEW 2- UPDATE 3-DELETE 4-FIND 5-SELLING 6-EXIT I

6-B

I

I

I

I

N

-- B

I

' ~ 2.1.2

I

I

N

I

/" B

I

~ N

I

~>-B

I

I

I

N

VB

I

I s

I

1'.T

I

I

I

I

I

33

I

(36)

I

I

I

I

I

I

I

NEW

CUSTOMER ENTRY

ENTER INFO OF CUSTOMER ---y----, N

DATA

STORED

IF

EXIT

y N 34

(37)

UPDATE CUSTOMER ENTER CUSTOMER CODE N CUSTOMER NOT FOUND 35 INFO OF CUSTOMER UPDATE CUSTOMER DATA STORED y MAINMENU

(38)

CUSTOMER DELETE ENTER CUSTOMER INFO OF CUSTOMER N CUSTOMER NOT FOUND y

L

I

I

I

N

I

I

CUSTOMER DELETED

I

I

I

/

IF

>----v--.

<

.l..l'

>--Y

I

I

"/

I

\

i

( MAINMENU

I

I

I

I

36

I

(39)

CUSTOMER FIND

I

I

ENTER CUSTOMER

I

N INFO OF CUSTOMER CUSTOMER NOT FOUND

I

"" Ext1· -:

y----,

<

--

>-Y

I

---

I

I

{

( 2.1 )

~ "' MAINMENU

I

I

I

I

I

I

I

37

(40)

SELLING ENTER CUSTOMER CODE r---y----, N ----y·----, GUSTO MER NOT FOUND ENTER INFO OF STOCK y N PRINTED y 38 DATA STORED

(41)

I

I

I

I

I

I

I

I

I

I

I

EMPLOYEES 1- FIRMS RECORDS 2-EXIT CHOOSE y~ N y N END 39

(42)

I

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-EXIT

B

I N

~B

I N ~~

V

I N

~B

40

(43)

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

NEWEMPLOYEE ENTRY

ENTER INFO OF EMPWYEE N

IF

EXIT N DATA STORED 41

(44)

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

UPDATE EMPLOYEE ENfER EMPLOYEE N

EMPWYEE

NOT FOUND 42 INFOOF

EMPWYEE

UPDATE EMPLOYEE N y DATA STOUD y MAINMENU

(45)

I

I

I

I

I

I

I

I

I

EMPLOYEE DELETE ENTER EMPLOYEE CODE N

EMPLOYEE

NOT FOUND

43

INFO OF

EMPWYEE

DELETE

y

EMPLOYEE

DELETED N y MAINMENU

(46)

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

EMPLOYEE FIND

ENTER EMPLOYEE CODE

FOUND

'>-~~~~y~~~~~ N

EMPLOYEE

NOT FOUND

44

INFO OF

EMPWYEE

y MAINMENU

(47)

I

ACCOUNT

8

I

I

/ 1- EXPENSE ENTI{Y 2--INVOICE RECEPTION

I

""'-3-EXIT

I

I / CHOOSE

I

I

/

""-

y{0

I

I

"-

/ N

I

y{0

I

I N

I

I

<

rq:yr,,_ .• u

..>--Y

I

I I ( END

I

I

I

I

I

I

I

I

I

45

(48)

I

I

I

I

I

I

I

I

I

EXPENSE ENTRY

ENTER INFO OF EXPENSE

IF

SAVE

',----y----, N IF EXIT N 46

DATA

STORED

y MAINMENU

(49)

I

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 MAINMENU

47

y DATA STORED y MAINMENU

(50)

I

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

(51)

I

FIRMS GENERAL REPORT

G

I

I

I/

INFO OF FIRMS

I

I

I

I

I

I

PRINTED

I

I

I

/:~~y

I

I

TN ( MAJNMENU

I

I

I

I

I

I

I

I

I

I

I

49

(52)

STOCK REPORT INFO OF STOCKS y

/

N \MAINMENU

I

I

I

I

I

I

I

I

I

I

I

50 PRINTED

(53)

I

I

I

I

I

CUSTOMER REPORT INFO OF CUSTOMERS N 51 PRINTED y MAINMENU

(54)

EMPLOYEE REPORT INFO OF EMPLOYEES PRINTED N MAJNMENU 52

(55)

I

I

I

I

I

I

INVOICE REPORT N

53

PRINTED

v

MAINMENU

(56)

ABOUT

INFO OF PROGRAM

N

MAIN MENU

(57)

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.Show

End 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.Show

End 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

(58)

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

End Sub

Private Sub Timerl_Timer() ilkharf = Left(Label 1. Caption, 1)

yazi = Right(Labell.Caption, Len(Labell.Caption) - 1) Label 1. Caption = yazi

+

ilkharf

Dim 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

+

l

Elself 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 Then

If 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)"

(59)

I

I

I

I

I

I

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("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

(60)

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]

(61)

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 =

1111

Text2.text = ""

Text3.text =

1111

Text4.text =

1111

MaskEdBoxl .Mask=

1111

MaskEdBoxl.text =

1111

MaskEdBoxl .Mask =

11

0(999)999-99-99

11

MaskEdBox2.Mask =

1111

MaskEdBox2.text =

1111

MaskEdBox2.Mask =

11

0(999)999-99-99

11

MaskEdBox3 .Mask = ""

MaskEdBox3.

text = ""

MaskEdBox3

.Mask = "999-999-999-999-999

11

DTPicker 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

(62)

Countl = "select max(firmcode) as cis from firms" Set ezgi = database.Execute(Countl)

Text 1. text = ezgi ! [ cis]

+

1 End If

ezgi.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 &

(63)

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.Cls

DrawTex: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.SetFocus

End 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 Then

If 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

(64)

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 = True

ProgressBarl.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

<>

1111

Then

ask= MsgBox("Do You Want To Delete This Stock Detail?", vbExclamation

+

vbYesNo, "Delete")

If ask = vb Yes Then

(65)

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

conn

ersoy ="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 If

ezgi.Close

(66)

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

End Sub

Private 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 11

database.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

(67)

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 =

1111

clear

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)

+

f

Text9.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

(68)

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 Sub

Private 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 Sub

Private 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 If

End 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

66

(69)

I

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 =

O

SendKeys "{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

(70)

I

I

I

End If

End Sub

Form5.Frm

Option 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 <>

1111

And Text3.text <>

1111

And

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', 11

sql = sql

& "" &

Textl.text

& 11,11

sql = sql

& ""' &

MaskEdBoxl.text

& 11',"

sql = sq1

& "'" &

MaskEdBox3.text

& "',"

sql = sql

& ""' &

Text3

& "',"

sql = sql

& "'" &

Text4

& "', 11

sql = 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

(71)

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

(72)

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

& 1111

Set 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

(73)

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

I

End Sub

Private 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 If

ezgi.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 ersoy

End 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()

(74)

I

I

I

I

I

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 Then

If 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

(75)

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

(76)

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

=

1111

Text3.text = ""

Text4.text = ""

Text5.text = ""

MaskEdBox I .Mask = ""

MaskEdBox 1. text =

1111

MaskEdBoxl.Mask = "0(999)999-99-99"

MaskEdBox3 .Mask = "

11

MaskEdBox3.text = ""

MaskEdBox3 .Mask = "999-999-999-999-999"

DTPickerl.Value = Date

End Sub

74

(77)

Private 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 =

O

End 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

75

(78)

I

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 Then

cevap = 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 Sub

Private 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

=

"Select Employee" Then

Referanslar

Benzer Belgeler

The main aim of this project is to help the Case User or Manager to work efficiently and make easier to product management by manager, customer management, reservation management,

In this Process, we entered customer information and then if we want, we can sell products to customer with use link of Sale button.. : is the Customer Selling Process

According to Figure 4, In &#34;Products&#34; page, you can find 6 different kinds of products under the names of pens, erasers, notebooks, folders, office products and

When we click the wimax we will return to the wimax page we can see the figure9. When we click the btk we will return to the btk page we can see the figure 11. telecom we will return

2.. customer receipt comes automatically then user print the receipt. Payment process: This process provide the easiness to make payment. For example if customer want to

The sales department which allow the user to deal with selling products to customer and customer orders and the customer payments.. the reports department which inform the

1) Main Menu: The Main Menu includes processes such as Item Acception, Item Submission and Reports. Most of the functions such as add, search, update, change item price and

What you will see in this chapter is a discussion about the aims of the site, the size of your page, what should appear on the page, and where each item should go on that page.