• Sonuç bulunamadı

FACULTY OF ENGINEERING DEPARTMENT OF COMPUTER ENGINEERING

N/A
N/A
Protected

Academic year: 2021

Share "FACULTY OF ENGINEERING DEPARTMENT OF COMPUTER ENGINEERING"

Copied!
72
0
0

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

Tam metin

(1)

FACULTY OF ENGINEERING

DEPARTMENT OF COMPUTER ENGINEERING

GOVERNMENT LAW OF 36/2005 DISCOUNT

PROJECT FOR ELECTRICITY BILLS

GRADUATION PROJECT

COM-400

Student : Mustafa HARUTOGLU

(2)

ACKNOWLEDGMENT ABSTRACT

1.

INTORDUCTION

TABLE OF CONTENT

2.

GOVERNMENT LAW OF 36\2005 PROGRAM CONTENT

3

2.1.

DATABASE CONTENT

2.1.1. 2005 TABLE 2.1.2. aktifiptal TABLE 2.1.3. aktifkayrt TABLE 2.1.4. borclu TABLE 2.1.5. data TABLE 2.1.6. pasifiptal TABLE 2.1.7. pasifkayit TABLE 3 4 5

6

7 8 9 10 2.2.

DEVELOPMENT OF DISCOUNT SYSTEM OF VISIUAL BASIC

11

2.2.1. Visual basic 6.0 main form 2.2.2. Login form

2.2.3. Main menu

2.2.4. 2004 year accounts form 2.2.5. Passive consummers form 2.2.6. Informations of contracts 2.2.7. Create text files form 2.2.8. Delete operations form 2.2.9. Daily informations 2.2.10. 2005 year accounts

2.2.11. Print form of acctive customers

2.2.12. Print form for cahier (acctive custommer)

11 12 13 15 16 17 18 19 20 21 22 23

(3)

ACKNOWLEDGMENTS

Before beginning to introduce my project, i want to say something about me and

university. I am 35 years old and i work in Electricity Authority as a Analist Programmer. I

graduated from EMU in 2000 from Computer Science and Information Technology

Department.

This university is my second university that i take certificate and i am happy to

graduate from this university. I want to say special thanks to the university staff and

department staff very much. Because they help me when i have problems. They are very

polite and helpful persons. I also want to say thanks for my managers and my friends in the

work because they give me the change to follow the lessons.

(4)

ABSTRACT

In this century in the world, thecnology is growing very fast, and we must study very

hard to catch this. Computers are eneter everywhere in the life and make works very easy.

While i am working in authority we have a computer systems which is online with 7

district. This system is old, because it is Unix Operating System and COBOL programing

language which is clumsy. It is difficult to write new programs and difficult to take reports

when wanted. Me and my friend decided to rechange the system and network with the new

technolgy. And we decided to set Windows Servers, Sql Server and .NET programming

language with the 2 Mb rent Leased Lines to be online our district. This project that i prepare

for the graduation project is only one part of our programs.

(5)

1.INTRODUCTION

This project is prepared by me in 5th of september 2005. The aim of writing this

program is, the Government Law 36/2005 which is discounting the penalties for electricity

bills and make change to installments up to 36 months. This program calculate many

possibilities to the consumers accounts and obtained discount amount, revenue amounts and

instalments automatically. By this program we make a contract with the consumers. This

program is used 7 different district office and make contract. By this program we make

more than 8000 contracts. End of the day each office convert the database to the text format

and send to the center office with the hyper terminals and then we load the data to the main

server for customers accounts.

in this program there are three main program which is directly interested with

customers. These are:

1. 2004 accounts : These accaounts are interested with up to 31-12-2004 date. The

program calculate the unpaid bills, total paid and capital penalties till to end of 2004 ,

and calculate the discounts and installments and diveded in to months. The

installments are obtained the government law. These are never change by the user. If

the installment is obtained 6 month user can not make 12 month, but if the

installment is 12 month user can decrease it 6 month. The installment rates are like

that:

100 YTL- 500 YTL

6 month

500 YTL - 1000 YTL

12 month

1000 YTL - 2000 YTL

18 month

2000 YTL - 5000 YTL

24 month

up to 5000 YTL

36 month

2. 2005 accounts : This module is diceded our managers. It is not government law.

Because the customers didn't paid their bills and wait the law, and we can't delivered

the money, and they diceded that to give a change to the customers to pay their bills

(6)

Less than 200 YTL : .1 month

200 - 400 YTL .2 month

400 - 600 YTL 3 month

600 - 1500 YTL .4 month

1500- 3000 YTL 6 month

3. The accounts which are never paid and we can not delivered them and the accounts which the customers were changed their addresses and didn't paid their accounts. The installment rates are same as the 2004 accounts.

The other modules are introduced with the forms next.

4. This program is prepared with Visual Basic 6.0 and MsAccess 2000 database.

First of all, All forms connect to the MS Access. All forms have Data controls for connecting to the Database. The Database Design is defined before. I used SQL queries in the codes that connect to the data. Always i didn't connect database by data controls at the design time of the form. Generally I used queries within the code. The usage of SQL is more practical, more usable and flexible.You can search everything according to your wish.

For example, makes searching according to the consumer number (Tuketici No).It searches and finds consumer within the 120,000 consumers and brings the name, surname, address, dept for ending of 2004 including capital interest, the total capital interest from 1998 until 2004 and total collecting money until the end of 2004 for consumer that we searches in the text box. I used text boxes, labels option boxes, frames, data controls. Also I connected to the system date and it comes authomatically when the program starts. Of course the consumer that has dept by end of 2004 can apply this form calculations if not they should apply to the 2005 active instalment process with no discount.

In this form, consummer is responsible all debt untill the applying date and should pay 20% of the unpaid capital interest and 80% of that interest will get discount. User should

(7)

2.GOVERNMENT LAW OF 36\2005 PROGRAM CONTENT 2.1. DATABASE CONTENT

r.J Miuo!'.ofl Ac<:e~s I dh1 : l),)f,1hdS(' (Aucss /000 file ftuni.tl)I ' - (c.:.; rRJ

B!J E~ ~dit !'..ieW jrsert Iools ~indow !jelp

D~kltii (!t[}.::" i ~n ,,. !a· l,:i,· ft cw; im"·~,ili· (7).

l% Macros 4 Moduies --~~-- (i) Favorites 1, 11 I•

·'-:start._-- O, _1 ·":1c--·r.,',.,,:,·,~ i:., .::~ .Jr:~ ;-i,.:,,:,.: "<~, .. ~-•

Figure 1.1 MsAccess Database Tables

In this window there are 7 tables that we used to call or write data on it.

These tables are :

1. 2005 : this table includes the 2005 year accounts.

2. aktifiptal : this table stores the data which the contracts are deleted.

3. aktifkayit : this is the table that we stored data to the contracts.

4. borclu : this is the table that, the data which is interested with unpaid accounts. It

stores 31,428 records.

5. data: this table is the main table which includes the using accounts and stores

110,428 records.

(8)

2.1.1. 2005 TABLE

'.J Microsoft Access (]00'.J: l.sblc] - )i:" ~~J

Type a QUeStkln for hob • _ ~ X

~_gm;'"' ---

--

-·· .... - - ·-···-

--- -

l

--=--~--- -- - -_

+

+

+

+

t- - ~ .

, -=-:-4-4::::=-c:=-_ - - -- - - ~ :: : - -'- _:

-=:--=---- _- - _- -

J

---

Gene,~ 1,-., I Field Size 1<1 '""'"

,,..,.._

(option Defd Voiue \laid&IOf'l Rl.Ae 11~.ionText Req.Med No Allow Zero Lerqt:h Yes Index.eel No Uric.ode Compression ves 11'>'£ Mode No Control 11'¥£ Sentence Mode None

A field rwne con be'-" to 64 ctwocters long, h::ludioo soeces. Press Fl frx het> on Reid names,

OesqlvieW. F6•5"""'tchp.yies. Fl•Help.

Figure 1.2. (2005 Table)

This table stores 2005 years data . This table is use to call data. In this table there are

three fields which are includes the customer number , customer name and surname and

customer address. It is used to installments the 2005 year bills.

(9)

TypeequtSlionfothl!llp "' _ ~ X _pesq~

1

_-_---~ --~ j

Field Properties Gene, .1 ' '"°""" l Field Sile 14 Fonnot Input~ (opt"" Del..Jt , ••.•• V~lonRule \laidation Text Reql#ed Alow Zero Lenoth Indexed UnlcodeC~essiori ,...,Mode 1/'l'E Sentence Mode

r--

1

A field Mtne can be I.() to 64 characters IMQ, ncludnQ spaces. Press Fl for~ on~ nomes.

Yes No Yes(NolA.Olicates) Yes No Control None :.; stari' Q , _1 ,,:: • , •• -::,1 c,.;:,:.~.,:,(·•;, Ji;. 11t1 ·<@, •... ""'

Desqlview. F6•5',vil:chpanes, Fl •Hei>,

Figure 1.3. (Aktif iptal TABLE) :

This table is used to write which records are deleted. When any record is deleted we

never delete permanently, we write the same record to another table to control any mistakes

for the users.

In this table we stores these fields :

tukno :the customers number and it is primary key.

sonbakiye : this field is contain the daily account.

songz : the penalties that shown at that time.

sontahsilat : the amount that the customer paid.

fatno : bill number (it is used to load the main server.UNIQUE)

kimlik : customers id number.

tel : customer telephone number.

tarih : operation date comes automatically.

y20 : this is the money that we must bring the out of %80 discount of penalties.

y80 : the money that we discount from the penalties.

ylO: we take it cash at that time and it is the %10 of total amount after discount.

toptah : the total amount that we will bring it with installments or cash.

(10)

2.1.3. aktifkayit TABLE

ll!lJ Eje Eot Y~ tnsert 1oo1, )'(<>dew tjeip

., • c • • [I] 11 ;~ 5" ~ :'~ cei ~ • CD • - --~-

-=--- •

--

--_- -·i FleldPr~rties --,----,,-''-'-

-- ---.

. .

--

-

--

-

FieklSiZe l'I Format '""""°"' Caption Default Value Valid&iOn Rule ll~k)nText Re<pr'ed Ves:

AIJw Zero LenQth No

Indexed Yes (No Dldc:4'tes)

Llnk:ode COl'l"()r'es:SOO Yes

111£ Mode No Ceint:rol

1/'l'E Sentence Mode None

A i1e\d n¥T1e can be~ to &t characters Iorio, ridudino spaces. Press Fl for he() on field ,woes.

~~;f7rt O • _1 ,,:· '.ttf· ~ ·'- ill ct.: -J (It! ~· < @ I :: -"- DesqlvieW. F6-~chpM"les. Fl-He~.

Figure 1.4. (aktifkayrt TABLE):

This table is used to write data when customer comes and make contracts. This table is same with the aktifiptal table. They are same because when any contract is deleted the same record is copy to the aktifiptal table. The aim is controlled the users.

In this table we stores these fields :

tukno :the customers number and it is primary key. sonbakiye : this field is contain the daily account. songz : the penalties that shown at that time. sontahsilat : the amount that the customer paid.

fatno : bill number (it is used to load the main server.UNIQUE) kimlik : customers id number.

(11)

kod : the code of installment. Y is named make installments P is cash.

2.1.4. borclu TABLE

Ll Microsofl Access [ borclu : T abte I ~:)

d!J E.lle ~dit ~Jew Insert Iools '.!{indow tjelp TypeaquestlOnforhciJ • .• ~ x

n!!!l • lil ti .,;, i3. :J- ~ ~ 8 ., 1 lo/ ;: •• §>- ~ ::'.' 10 ,t)J: 11).

-~ J ,oo1wo I Field Size Form~ Input Mask C~ion o.fdV..., V~tlonRule ValidotiOnText Req.jrtd Ak,w Zero Le()Qth Indexed unicode Comp,esslon '"'Mode

,-

l

I

A f"ie!d nome t¥1 be l_.:> to 6'4 characters lono, lndudino spaces. Pross Fl for het> on freld nomes.

No Yes No No

No Control !ME Sentence Mode None Design view. F6 • Switch pe-es. Fl• Help.

Figure 1.5. (borclu TABLE):

This table stores the data that related with passive costomers account. The passive customers mean that they are not using, closed accounts but unpaid.

In this table we stores these fields:

musno :

the customer number.

borno :

is the depth number for customer.

isim :

customer number.

sayacno :

meter number.

(12)

2.1.5. data TABLE

~ Eie sdt l~W insert !ools l))ndow !jelp

I~ v i ~ f' n • ., ~ 11 ;~ $" ltfi' ::~ if] -:t) • 11).

-J

1

-j

- - 1

--·-

-

--~

-

-- --

- --

-- - ~ - -·--- --- G"'°'elJLooi<L,)J FieldSiie 255 Fom•< Inc:,ut.Mosk Caption De/out Vu VoldotlonRl.ie ValtdationText Req..if'ed No

Allow Zero LertQth Yes

indexed No

urkode C~ession No

Ifi'E Mode No Control

Ill£ seeeeee Mode None

-·.

--

- - * -

-

___::::::-- -

FieldPr~rties

A field name c&n be l,C) to M cl'wacters long, nck.Ol'l9 spaces. Press Fl fOf' het, on Flekl names.

DeSIQrl view. F6 • Switch pe-es. Fl • Help.

Figure 1.6. (data TABLE):

This is the main table that we stores all the customers informations. We use this table

to call data to the program. And inclueds 110283 records.

The fields that we used are :

tukno : customer number

!fil!!!....:

customer name and surname.

adres : customer addres.

tarife : the tarifs of consumers.

(13)

2.1.6. pasifiptal TABLE

r...J Microsoft Aness [ pesifiptal : TdbleJ =-· ,-e· f~-J

Type~QIJeStjonfwivlb " - ~ X Oesc(iption ---··--- /'

---

___ Field Properties

0..-.r~

l Lookl.l) I Field Size 11 Formait fl"\Pl,t:MMk Capt""' Def"-'tVh V~tlof'IRIM Validation Text Required No Akrw Zero Lenoth Yes indexed Yes (No Ol.()licotes) Unicode Compression Yes !ME Mode No Control 111£ Sentence Mode None

A field !'Wlllfle can be 1,4> to 6-t characters klnQ, nck.dnQ spaces. Press Fl for het> on field n&rneS,

Oes!Qn ..•. iew. F6 • Switch oeoes. fl • Help.

Figure 1. 7. (pasifiptal TABLE) :

This table is used to write data which deleted from the "pasifkayit" table . We never

delete records permanently the aim is control the mistakes for the users.

In this table we stores these fields :

borno : depth number

tukno : customer number.

fatno : bill number.

telno : customer phone number.

kimno : customer id number.

bakOS : depth for 2005 year

gzOS : total pnalties with related 2005

topgz : total capital penalties.

y20b : the amount which we will take after discount.

y80b : the discount amount.

topgen : total amount that we will take.

(14)

2.1.7. pasifkayrt TABLE

r.:J Microsoft Acc:css [ pasifkayrt : T ebte]

Typeec,.estklJlfOfhelp .• _ f'} X Description

---

--

-

---- ---

-

--·---

·---

---··---

-~1,-..1

Field Sile 14 Formeit Input Mask c~oo

Def out Value V-!lldationRIJe Validation Text R~ed Alow Zero Length Indexed Unicode Comp<esslon

IP'E"""'

Afiek:I namec¥lbe 1.,¥>to 6't chatacterslonQ, nduanospaces. Press Fl for ~onfie«jnames. No

Yes Yes (No Duplicates) Vos NoContr'ol Jf'!E Sentence Mode None

Figure 1.8. (pasifkayrt TABLE) :

"'"",: start· Q , _1 • i •••. ;!",: r -J ~.. 0111 '<@, •. ~

DesiQn view. F6 • SWitch panes. Fl• Help.

This table is used to write data for passive customers. And same as the "pasifiptal"

table. The fields are same .

borno : depth number

tukno : customer number.

fatno : bill number.

telno : customer phone number.

kimno : customer id number.

bakOS : depth for 2005 year

gzOS : total pnalties with related 2005

topgz : total capital penalties.

(15)

2.2. DEVELOPMENT OF DISCOUNT SYSTEM OF VISUAL BASIC

2.2.1. Visual Basic 6.0 main FORM.

E_ile '-cit: 'tiew 0"o)eCt Fi;i<mat Qel:o,J BIXl Qyery ~am !ools Add-Ins W.indow ljelp

1~-h-=-"'!IT~lilll lil)ftiM,;,~

~-T.

II. ~~<8'§~6Ul

mlll(Ej-·· ····-·---·· . .

rit";

I Arool 0 _J P' r- x]

,,

.tU.J ~ Forms }-0. Form I (forml .frrr f-tl. FormlO {Prlnt:Borc -eJ.Formll~C I t-0. Fonn12 (Form12.I f.. 0. Form13 (Form13.I

Lei forml<I {Form14.I

Lo. FormtS{FotmlS.I - t1. fOl'm2 {Form2.fm

~ Form3 (Form3Jm

1 - t,. Form4 {fO(mS.firr

I 1 0. Form5 (Form6.fur 1 i-t:1. Form6 (form7.fnr

~-ei. Form7 (Fonn8.frrr

I- tl, FOl'm8 (Prrt.Form. -ClForm9(PrWMo,b ta:!Mod<.4e<

t!,g

Ii') 1(51' Iii~ [i 111 • !Ill lilll ~ S,} f:ill ~ ...'...J r: ID J:i1I ~ ll!lll Ej IIDl !Bl

Form 1.1. (Main page for Visual Basic 6):

This form is the main page of the visual basic 6 that we choose the form to create our

forms and developed our codes.

(16)

2.2.2. login FORM

...., Projett1 Mif1osoft Vis11<1I H.t!.ic [design]

E.ile t.dt '.iiew e,-oject F!2rmat ~ B.un Qyery ()\aQram tools 8dd·lns ~ndow t!elp

r~-:'b.

'lllr.;i; 111r ~e.~~- ~

I;

.:tili:fi''8 w~6ui

mlllBJ ~ ' "' Iii Afaiii 0 _J J;1 r.

PtOJ«l • Pro Jed 1 EJ

Fo,ms

L

O. Form! (Forml.frm) . 0. FOl'mlO (PriltBordu,frm) 1-1:l. Fooml I (P,r<Bo<duMokbuz.frm) ~tl Form!Z (Form12.frm) l 0. FOl'ml3 (Fotm13.frm.) J-0, Forml4 (Forml4.frm) t tL Form IS (FormlS.frm) t::l. Form2 (Fo,Jn2,hm) J t::l. Fonn3 (FormJ.hm) t---·tl Fo,rrt4 (FormS.frm) -0 Foom5 (For..-6.frm) l!l,. Form6 (FOfm7.frm) tL Form7 (Form8.frm} f 0, FormB (Prntfo,·m.frm} 0. Form9(PrW:Mbkbuz.frm) ca Modules .!.ILi .!.I "' @81 D~ 1151'

'1~

[ii 111 M !1111 111!1 ss ~ m1 ];I .'..J

~a

•• 1€c. ti'~ r: . .'..J ..!.!I;,,:, •• to. ::· 0 r: tH 1$.I J~ Ill LI ~ Form-1-2

When you run the program, you must enter your password. if you don't enter the true password, program is closing. When you enter true password, main menu comes to the screen.

(17)

2.2.3. Main Menu FORM

...., Projccl1 Microsoft Visu<1IB11Sic [design) (form] (lorm)] - 6J~_j

0. Eje tdit '!'.iew ~oject FQrmat ~buQ !iLl"l Qyery ~~m Iools Add-Ins ~ ttelP

,~-. b :-11r~

ijliutb)1,1>1J.:,

;.:,-1 • II

.T" ~ <8

w ~

61.ltl I b o, 105 tJ17280x 12960

K.K.T.C

ELEKTRIK

KURUMU

BiLGi iNCELEME

Form-1-3

Form-2 shows the main menu of the Electricity Authority of TRNC(Discount project). This menu contains the sign of Authority and command buttons.

The caption of command buttons of the main menu describes the main subjects.These buttons links to the differenet calculations for discount project for the authority.

The main subject of the commands buttons are listed as below;

Commandl

:2004 AktifHesap

Islemleri.t'Ihe

processes of active accounts for 2004)

Command2 :

2005 Aktif Hesap i~lemleri(The processes of active accounts for 2005)

Command3 :

Kesik Borclu

lslemlcri/Passive

processes)

Command4:

Text dosyasi olusturmatf.onverting to text files)

Commands:

Bilgi inceleme(Informations about consumers)

Command6:

Iptal islemleritcancel process)

(18)

Electricity Authority has two type of consumers generally. First one is active that usses electricity now and the other consumers type is passive users that used electricity in the past and leave the home but left the bills unpaid. And new consummer enters the building, the unpaid bills are store to another database. These consummers are called as passive. The discount process that electricity authority enforces to the end of the 2004. If consummer doesn't has any unpaid bill for 2004, he/she has to apply to second button for 2005 bills.

(19)

2.2.4. 2004 year accounts FORM.

~ E.'6 E.dit 'fJew er"oiect Fiirmat QebuQ B.Lrl Q\tery Di;aoram Tools 8.dd-lns w_indol,a,< tlelp

r~

--b •

'11 j~liil

T

~-!iG!-lii4. I :; ,.;. r ; -II - • ~ ~ '8W~-6t

Jll

fo

-0, 105 - .J:i 17280 Xl2960

···~···-···,···

AKTiF TUKETiCi HESAPLARI TAKSiTLENDiRME iSLEMLERi

Tuketici No

''[

· 1 •••

,s.,....,

:: ~s...,~-i,e(KopitolGZOallilJ:

· . '. '. : : Be1vuru ANndaki Beki,e :

Adto&:

T-KopilolGZ : 20045...,f-Tah1ilat

Son fatura Nuaarat1:

ea,vuru Anlndaki Gz -;-~··: ~~~ · '. 8..-,uru Anlndaki Top T ah,ilot : iiaalik NU1Mtaat: I . · · Tel No:

200-4 Y,li Hesaplanna Ait Bilgiler 2005 Y1l1 Hesaplauna AK Bilgiler Sefenckli T aksit Oranl,a,1

31/12/04 SonuTuketim Bakilteai

2004 e •• ;,-.Gelen Gz r 12Ay

Odenecek Mikl•t:

I

ll

I ..

I

1

label46 2004 ode._.n Tuk e ••

Label47 Gep,it

O-,...

GZ 2005 fatusalar1 bekiyesi r GAv

T ah1il Edilecol< Gz. 2:20

2005 Top. Alacak Mill.Ian r is As

BOO,.,_.,.

Gz. 2:80 A,t.k Taluit Niki.-,: 2004 Alacak + 2005 Atacak

2004 Heaaplaundan Top Alacak Nik.tan %10 pefin r 24Ay :t10pefin Kalan laksil

KolanToklil

.. 11 ,.,.,ii• T-T-1i1Mik1 •• , fr2005H~,c

~ loklil ,.,.., Aylok T .,.,ii Mikloro

- - ..

-

: : : .. ffiG]o.1a2

. 'vi

form 1-4

This form is related with the 2004 year account. In this form when the customer

comes with his bill. We look to the customer number, search and find the updated accounts

form the main program (UNIX) and then, in this form we type the customer number to the

related textbox and the related informations about the customer, comes automatically to the

form then we type the new data which are the new depth, new penalties after 31-12-2004,

total paid amount, last bill number, customer id number and phone number of the customer

and then program makes the calculations automatically. The discount amount and the

installment amount and other amounts are prepared at that time. If the installment number is

obtained 12 month customer decrease it to the 6 month or pay cash but never increased up to

18 or more. If customer accept the contract then we print it and sign and customer pay the

%10 amount and go.

(20)

2.2.5. passive consummers FORM .

.-. Projccl1 Microsotl Visudl Hasic (design) (form4 (form)) ~--:'r:1 :25.J

·b o,-,os .L'J112aoxi2960

BOR<;LU TUKETiCiLERiN TAKSiTLENDiRME i~LEMLERi

Afiti 0.-J ~ r. 1: iaioo: [§I [§B .11.tJ ~ c) GI :,

I Ba111uru antndaki Baki,e:

CJ~ :1 Ba4vuru anendaki Gz: 115)' Iii~

I

T..,,_K..,;,alG:r: ;. •• 1 Genell..,,_Gzc ~ 11111

l!I ~ 11 %20 T llhsi edilecel< Gz:

~ l1i1 ·I %80 Ba6,1lanaca1< Gz: JsJ .:.J :1 T ..,,_ Net Alacal<: .ul .a I '" )€,_ :t10Pofiniidonocot.: ::' ~ 1:1

ToplaM Takait Miklau:

/'c: . .:.J

.ul i:i: A,.. T abit M,t•1:

'" [,.

Ii

r•,tt ,.,..,:

::•

"

:,

r:

m

l1i1 ~ Ill E:l (" 6 (" 12 ("· 18 (" 24

T oplam T aka.I: ailc.lan: A,t.k Taktit Milr.tau:

*

I

..

:

• .• lliII]o •• ,1 .,. 1<1 r=:--- - --- .. -- --·-·· .. i P ~ sta~rt O . _. .,. ·, !• ,•~ Iii' , ...,, ,_, - ,, , :l , .. · , , ~< , ••• 1 • ~ Form 1-5

This form is for the passive consummers. Which they leave the homes and didn't pay the bills. They can also apply this law and make installments or they can pay cash after discount. This form is like the above form, we type the depth number and informations of customers comes automatically to the form. These are customer number, name\sumame. We type the data like bill number, the new depth and the new penalties and program makes calculations and obtained the amount of %20 that the customer must paid cash or installment, %80 discount amount and % 10 amount which is cash paid if he accept to sign contract. If customer accept the amounts we print the contracts and sign it.

(21)

2.2.6. Informations of contracts FORM.

,... Projcct1 Microsoft Visual Basic f design) l form5 (form)] -

0, ·105

G*s;

"1 A lab[ 0...J i;; (> ~~ JJ!J ;

ao

li'l "'5l '- Iii~ tiJ •#I ~ 1!1111 Ill~

!Ii 1111 I.:: I•

]~ ..:J ~ a: •• J;;,_ :r t!l1 ~ . ..:J

~ cc

'"E

::•

~ ~. 1H m J1I Ill E:l ·.::::::DataViewWindowl:: •. • • • • •

KAYIT YAPILMI$ TUKETICI BILGILERI

KAYIT EOiLMi:;i AKTiF TLlKETici BiLGiLERi

1

KA YIT EDiLMi:;i PASiF TUKETiCi BiLGiLERi

Form 1-6

This form just for user knowlage for controlling or searching the contract

informations. Two DB Grids are used.

(22)

2.2.7. Creating text files of contracts FORM.

""ProJect1 Microsoft V1sudlB<1S1c [design] (formJ (form)

-~, . -·---·~--

- !XI IOl!M

0, -105

TEXT DOSYASI OLU$TURM A i$LEMLERi

(/) 0 ~~ 1151' Iii~ !iii •• 1 "1!1111 Ill ss ~ t1il ~ ..:.J r: . ..:.J r: m 11!1 ]~ Iii El ... ·:::.~ ··. 1<1 r- - -- ····--- ----···· 1• ,f: start O · _. , , lio ~ f-' 1 1 • l . · , , < s .• ~ 1 ··~--~--·-~ ~~·- < ~-~T <'

Form 1-7

A lot of contracts are done by branch offices (Nicosia ,Famagusta, Kyrenia,

Guzelyurt, Lefke, iskele). All these contracts are collected at the end of the each day. And

with this form they export automatically to the text files from the database by entering the

date. Electricity Authority main system works with UNIX OS and COBOL programming.

We collect all text files to the center office by Hyper terminals and open the instalment

information for each consummer that maked contract. This is done everyday. I used

OUTPUT reserved words and commands for this process in the code.

(23)

2.2.8. Delete operation FORM

""ProJe< 11 M1crosof1 V1sudl Haste {design) (torm6 (I orm)

~ E.ie tdit '!iew fro}ect Fqf'mat ~buo 8.1.J'l Qye,y Di;aQram Iool5 &;ld-ln5 ~ ttelP

Iii·

-i;->111 c;i; Ii)

Ti"

lit;,

e. ,i"f

.-,

,-.;T~ --;,-. ~di'~

w ~

6Utl

IIIIIIEl xj

. ; : : Silmek istediijiniz Tiiketici Numerearm Giriniz AktJ Koy, Sime

I •

-"-"" Protect I (Ptojectl.vbt Forms 0. Forml(FormJ.frrr -a FormlO(PfntBofc

L

O. Formll (PrWBorc a Forml2 (Form12,I 0. FOfml3(Form13.I 1 tl, Fo,·ml4(Fo,m.1'4.I -t:l, FormlS(FormlS.I f-1:l Foml2(fo,m2.fm I i-tl. Form3 (Form3.fr,r

1-t::i. Form4 (FormS.frn

r- t'i,. FCf'mS (Form6Jrrr .-0, Form6{Form7.Frr, 0. FOl'm7 (Form8.frn 0, FonrlS(PrlntForm ClForm9(- Clil-.es .!J!.I ~ .:J c)g CJ~

~'

Eil~

r..

••I

"!Ill m ~ 9~ rm ]~ ..:.i

AKTiF KAYITLI T0KETiciLERi KAYIT iPTALi

: • : i.!ili]oo1a2

.ilill

i.!ili] 0 ota 1

.ilill

PASiF KAVITLI T0KETiCiLERi KAVIT iPTALi

r.:. ~ r.:. tD till~ 111111 LI ~

Form 1- 8

This form helps user for cancel any processes. If there is something wrong with the

contract, they can cancel it by writing consummer number. Before deleting that contract

program asks to the user, if he/she is sure. If there is no contract belongs to the consumer

number entered it gives wamning message. While I am writing delete code before deleting

permanently take a copy the record and paste it to another table to control the delete of

contracts.

(24)

2.2.9. Daily informations.

...., Prcjcct l M1crosofl V1sualUas1c [design] [Form17 (form) - !5

l:l. tie [dit llew e,oject FQ<rMt i;ebuo [<X1 Q\lefY ""°"""' !ools /!dd·lns ','!mow !:!elo

111:!J · 'b. • 'II

li.i

liil I i ~ 1u•

I

;;-c=.1 ,-11 -; • ~ Q' ~

w ~

ea

Jti"'.i:i _,,

-=:I . - -·- ---~ ----~~~--~ ---~~~-~----

gUn sonu toptamlar r

.1:'117280x 12960 , 1~'iiiJ Forms j...l:). Fo'" t,-tl,Forrr · C:,.. Fonr

r

l:l. '"" eJ, Fom j....l:). Fom i-0, Fotrr 1--0. For,r -0. fotrr t" f'.:l. Fof'l'r I j,-~ Forrr f---ti. '"'" 0, Forlf C:,.. Fom ti."'" C (iJ ModJleS

GUNLUK HE SAP i$LEMLERiNiN TOPLAMLARI

Aklif hetapla, * ,J .!J 1.1 ~{ $8 [ii ~ .•.•.. Iii~ !ii •• 1 ~ Ill ll!l ~ ~ 1111 ]~ ..'..J ••.. Ji1,_ ::* ~ I:":. III l111 ]ii II El ·. IQ ,- .. -- -- - -- - - --- ·--··- .. .. ..• V ,, .. 1;start _ .· ,.,. Git ..._1 'l ;). •• • ,, 1 ·<,~ .• ·· Form 1-9

As shown above, User should see the total that made contracts within the day. How

much money (10%,cash) enetered to the auothority within the day.

(25)

2.2.10. 2005 year accounts. FO~

"" Pro Jee 11 M1cro!.oft V1sudl Basic I dc~1gnl If orm1 3 (I orm)

C:,. tie ~dt - e,01e<t f'll<mat Qebuo Run Q,;e,v D;ao,am look add-Ins l'{irdow Jjelp

1~--~j'liTwiilill"i ~-;;.r;..,

C-:T .- II •ISt:2i'<8W~6UJtb 0,0 .i:J1na,ix12%0 T

~ 2005 YIU HESAPLARININ TAKSiTLENDiRiLMESi

I ~

111 · • • f _ ~- A laiii

I

c~,----

,_ ··---,._

L.J __J :: Tut.eliciN...,aao: ]i

i.

-

U®Ml@fflflf

xr

(,g CJ l!'l 1151' Iii~

r;

•• ,

"1111 I! ss 9~ l1il ~ _j .J "'""' ~-t:l. Form! (Forml.frrr t-tl. FolmlO(PrlntBorc

~ti. Form! l (Prlnt:Borc

-0. Form12 (Forml2.f . 0. Fo,m!J (Form!J.f ! L..-tl. Form14(Forml4.f I 0. FormlS(Form!S.I ;--Cl Form? {Forrn2,frrr

r-0.

Form3 (Form3,frrr t-t:3. form4 (FormS.frrr

i-0, fofm5 (Form6.frrr

~~ Form6 (Form7.frrr 0. Form7 (FormB.frrr ~ 0. Form8 (PrintForm. 1.. ·O. Fol'm9(Pr~ ""'*"°' Mo, ··::Lebel6 : .. Fatura Nu.aia11: FOOlveTok"l (' 1A)'W< (' 2A;W< (' 3A)'W< FaizMilr.t•• TOl)lam0donecok

. : : Tolefon no : : : T..._tit Se,m

; • TOl)lam Baki,e : (' 4A)'W< • : A,W,. Tekoil Miktar,

r: _j (' SA)'W< I' 6 Aylls ··. 1q ··-·· ~ B I<""" -; J start Q ' -1 • Qi , ,.._ ' '1 '' Ji i ' ' < I ,.: ' '

Form 1-10

If the consumer has a dept that only includes unpaid 2005 bills. For this type consummer

calculations and options are different for instalment processes. There is no discount, only

installment chance exists here. Also there is exstra interest, cash interest and it changes

according to the number of instalments.

There is another table for these consumers in the database. Also here, user should

enter consumer number because it is a primary key of the table. After pressing enter button,

name, surname and adress come automatically from database by using queries in the code.

User has to enter present dept, present interest, bill number, identity no and phone number

e

and press enter, the total dept comes. There is a difference between previous form and

this.Consumer can select advance payment of dept.Form-3 has rule that 10% should be given

advance payment not more or not less.

(26)

2.2.11. Print form for active custommers contracts .

...,, Projec:11 MicrosoftVisudlBasicfdcsign} [torm8(1orm)J - -~-lgJ

0. E1e tdtt 'ilew froject Flll'mat Qebuo !3.u, Q1.tet'y ~am look add-Ins ~ tielP

11~·-b~i;i'~T:i.

~-AT;;~-11-~r~~

cei

w~1:r~

111111B] ~

1~.

Alaiii C ..J l;7 I> ~~ jJ!J ;

08

D~ 115) '- Iii~ (i #II "i!IIII 1111!1 ~ ~ tiil ];J ..'..l .<JJ l:r •• Jee_

::2 "

r: . ..:.i ..!.ad

a

...-11:,_ ::t~ r: m tiil J;J Ill e ti 105, 105 i!1 t0635 X 12075

K1b-Tek Alacaklanm Taksitle Odeme Basvurusu ve Taahhutname

r F• '0 ""'"' (36/2005 sayoh yasa madde 8.)

X Tarh: ProjecU (ProJtttt.vbj seems -0. Form! (FOfmt.for r-t:1 Form!O (.Prnt.Borc ;-t:1, Form! l (PrW.Borc !'-t!. form12 (Form12J - l':i, Form13(Fotml3.f 1,., 0, fCNml't (Forml4,/ 0. FormlS(FormlS.f t1. Form2 (Form2.frrr 0. Form3 (Form3Jm 0, ForlT\'4 (FormSJr,r 0. FormS (F0tm6.fm

i-0. Form6 (Forrn7.frrr

. t:\. For·m7 (FormS.frrr

0. Form8 (P1intfofm,

ti. Fo,m9 (P•intMol<t, lii:IMo<>Jes

K'mlil.No: Tel No:

a • Ba;\l\.l'u t~lnndekl tOketin bofcv miklai1.,

b , 31112/2004 tar'ihindeki kaplal geclkrne Z8lfltl"f lriklar1. .•..

c. ea;\IU'u tt'lri'lrtdelcl gdme Z&rTIITII mlktan . d • Ba~ tev-i'llnde 31112/2004 Odcrwneyen gdme IOlfVf'il miktan.

e . Ba;V\.#'u !~I'll ~t»ri ile 31f12./2004'de Odenmeyen t[;(etin borcu ..•..

r - Aflediecek gecll<me zamnu mildCN"1 '%80 ... Teihsl e<ileeek geeH:me zt11mtn1 midet'I %20 ....

h. Odenmesl gereken t()J)l$rn bot'q: (2004+2005).

1 - Odenmesl gerekeo %10 pe;inat

J. T&ksitle 6dervnesl gerekM mlktm'.

k. ToplMl t86(sit saycs1 ... {, Aylktaksl mikt&rt

YukarlCM g()stefimekte olan vc Ooenmesi gereken %10 pe;iNd1 6demlt b1An.ryor1.ITI. Bot~ rni.1611"11 0), Odemeyi !tlltlhh(t cder, gOs'lerilmekte OWi %80 gecicme J:&IMWlll'I (f) slinmesl 11;:ifl ITU'acMI oder'm,

Belirtien ttlll(sl milrtam gOrO'lde Odemedigim t8kctirde, takslde ba~l Olan tOm borcurru veyt11 bM:'.iyesinl gecikme tM'IITllnl"l tOroo

le bel'tllber derh$1 Odemelde yOk(,rr«l olduOt,mu ve Klb-Tek"ln bu ~19 eileyhime her ttrt1 'fMel l~leml yapmtllkta eereest oldu).nu kab!J

...,,.,,

Vezne Bklwim Formu Dold.tnU Ook~Al fmza: lmu ~Im:

Form 1-11

~ start

Q ' -.1 t.iJ ••..• t·•,' '! /' :}t)- '< s ,..- KJb-TekYetkili!l

This form is comes automatically if the customer accept the contract. This form is print out and show the amounts and also the rules of law. This is the contracts between the customer and authority.

(27)

2.2.12. print form for cahier (active custommer)

.l:'J I 0350 X 7590

'°'""

Q Form I (Forml .frrr

-0. FormlO(PrW:Borc

ti. FO<mll (P<.,Bo,c

~0, Form12(FOHl'l12./ r a Form13 (Forml3J 1 ~ FCW"m14 (Form14.f , -Cl Form!S (FormIS.f 0. Forrn2: (Form2.frrr r 0. FormJ (Fo,m3.frrr 0. Form4 (FormS.frrr t:1. Forms (form6.frrr 1-f'.:1. Form6 (Form7.frrr t:\. Form7 (Form8.frrr 1- 0. Form8 (Print:Form. ,.tl,Fo,m9{P, •• Mol<I, C;JMo<iJie, "' I orm9 ,- r;:'[8"] Alabi C ...J

VEZNE BiLDiRiM FORMU

(TJg CJ 00 "9' Iii~ Iii

il!l ~ ?~ rm Jsl ..:J

Odeme TOrO: LabelJ

TOketiclNo: Label1 Adi sovadr Label2

Fatura No: Label4

Tar1h: Label5 Vezneye Odenecek Label7 OOkiimAI /:': . ..:J

::' t,

r: m till ];I 11111 el ~

form 1- 12

This form is given to the customer and send to the main cashier to pay the money.

And also this form shows the operations code like cash "P" or installment "T" and cashier

understand what type of operations he will do.

(28)

2.2.13. Print form for passive custommers contracts.

!:). Elo (dt \'>OW E,ojeet Fo<mat QebuQ B'-" Qo;e,y =om !ools !l<Xi·Ins - tjeip

llril·'b·'llfi;;i;liil1i 'GJIU\,.., "'T ,--;;--.,-~di"'8W~6l.lt{b 1os,1os

A fa6i CJ _J i;, r, ~~ .!l.tJ ; $GI ~ "51 '- Iii~

•..

, • 1111 111!1 ~ ~} 1111 Jsl ..:J .I.II l:r r.-[,_

nt ~

I:: . ..:J .i..!l Er ••.. ffl'_ :p

1'

I::. m iD 10740 X 12135 " I orm10 i~ 'ff~] ><) Fo,mB1 .:

Ktb-Tek Alacaklanrn Taksitle Oderne Basvurusu ve Taahhlitname r Fl to"'"~ (36/2005 say,h yese mad de 8.)

Fo""' r 0. Form! (Form I .frrr t-~ Fo,m!O (Prnt:Bon: -0. Form! l (f'frtt:Borc f-~ fuml2 (Fo,n,12.I t- 0. Form13 (Forml3.f . 0. F01ml't (Form!4.I ·0. F01m15(Form15,I -0. Form2 (Form2.frrr 0. Form3 (Form3.frrr Cl, Fonn4 (FormS .frrr tl. ftlfm5 (Form6.frrr 0. Form6(f0tm7.firr 0. Form7 (FormB.frrr 0. Form8 {Prnt:Form.

;_O, Form9 {PrntMbkbi

r. Nounal

T«ih:

TuketiciNo: l(imlikNo:

TelNo:

a • B4;wru lat'ihndetl tru.:etim borcu miktl!lll'L ..

b • 31112!2004 letihi'\dekll(dtllgeell(rne I6!rill'll miid&rn ..•...

c . Batvuru l1Mhlndekf gec¥c:me zeimm1 midao.

d . Ba;vuru t~ihinde 31 ft 2!2004 6denmeyen geei:me IatTlml miklan, e • ~u i&rlli ltbaft ile 31f1212004'dc Odenmeyen tuketlfl borcu. f. Affei:Qecek gec"-,r.e IMVTII mi.1evi %80 ....•

g • TahsM e<Hecek gecikme l9l1Ylll 1Tikt1111 %20.

h. Odenmesi gereken lopiam bor" (2004+2005) 1. ~ ger~en %10 pe;~ .. j. T&ksile 6::lenmeal gereken mikteir .. k. Top6&,n taksil sayis,, .... t-Ayliklat:dmiktan .•...•...

Yukarlda gOsterilmel..1e olan ve Ode:nme-sl \)el'eken %1 O ~lnelt1 Oderl'q bt.JUl'MJyon.im. Bor,; milda,rn (D, OdemeyitNhhtl ecer.

gOsterllmekte olan %80 gecikrne Z&lMIOl"I (f) shne!l i'tin mu'ecNt ~im .

Belirtien tek'Sl rriklarn gOrU'!de 6oemedgm teikcirde, taksldc ~! oll:ln tum bot·cumu veve baldyesini oeclkme ZlWIUnnn ICimO Ve berllber cie'rh$1 Odemekle yOk('Mnl(l ~ ve Ki>- Tek'in bu ~le aleytime her Miu yasal iflemi yapmakt& serbesl oldugl...oJ keb.i ederim.

Vezne Bikwim F0tmu Doi<Un-<;

lmza: lmrei:

lsim:

--; : start O > - f • ii' "'\ ~ f\ f' ~ • '' ' , ( s ::: 'C

Form 1- 13

(29)

2.2.14. print form for cahier (pasive custommer)

Cl. Eile E.dit 'i_'iew froject F~mat Qebug 13.u, Qt.iery D!agram look &dd-Ins ~ tjelp

~>ii. 'III~ 1111 i 'iii!,

e."', .., "' , ~

II • , "oi' c8

w-~

61.tti,

c

o. o

IIIIIIEI ~

j ~ II

I fr

FUop-inte, (.' Normal

;i/J 9330 X 7515

•..• Pmjcct t Mkto,;ott Vi,;u,11 Rt1-sic [desfgu] [F 01n111 (l"u1111)J

,.. torm11

Aiabf

L, _J

BORC,LU VEZNE BiLDiRiM FORMU

,J

u u .!.l vezneye Odenecek label6

t') GI D li'l ~' Iii~ Ii ##I Jll !1111 Ill~ t~ till ~ ..'..J

Odeme TOrO: LallelJ

Label7 8or~tu No: Label1

Adi Soyad1; Label2

Fatura No: lalle\4

Ot:iki.imAI Tarlh: Labe15 r.: . ..'..J r:

m

11!1 ]~ Ill el _g forms r 0. Form! (Fo,ml.frrt r-0. FormlO (Prril:Borc · -tl, Formll (PrlntBorc ~~ Forrnl2{FOfml2.f l!l. Form13 (Forml3.f 0. Forml4 {Fom11 ••. f •• t:1, Form IS (Form15.f 0. FormZ (Form2.ftff 0, Form3 (Fo,·mJ,frrT 0. ForrM (FormS.ftn' 0, FormS (Fonn6.frrr

1-a Fonn6 (fo,m7.frrr

0. Form7 (Form8.ftrr 0. Fonr.S (Pti"ttFQfm. ~ 0. Fo,m9 (P,,,tMol<I, &a-...,

Form 1-14

~start

Q ' -' ~ ...• I ~ '< t :.

Same as Form 1-12 but related passive customers.

These F

orms(l 1-14) are printing contract. I used many print codes and whenever user

press record button in the form, printing start at the same time and contracts prints

automatically from the computer. 3 copy and 1 cash form for pay-office. User and Consumer

signs these forms after consumer pay their advance payment.

(30)

2.2.15. module form. Alabi 0...J r;, r. ~1§11 " .ill.I .!l (Jg ~ "51' Iii~ Em •• , M !1111 1111'1 ~ 8; rm ~ ..'..J ....i a' li/r ['.. ::' ~ t: . ..'..J ....i E: ,... ];le_

::•

~ r: M riil ~ Ill E:l I' Public dbs, dbsl M Database • Public strq, strgl, royst.rl .ls String 'Public temp. templ ~ Recordset.

Public strc;i, strgl, myscrl, str._z, st.rg3, scri.,4, st.rgS As St.ring Public eae , d.bsl, dbs2, Cll:>93, dbs4, db:s5 As nececeee

P\ll:llic t.emp, t.empl, cernp2, temp3, temp4, t.empS A.s Recordset Public ee.e M St.rinq

PIJJ::tlic X, Y, say >.:, Integer

><]

fOUM

0. Form! (Fo,mt .frtr

r-0. FormlO{PrintBorc

;-tl. Formtl (Prnt:Borc

i-0. Form12 (Form12.I

-1!1. Form13 (Form13.f

-t'l. F(l(ml'I (Form14.f

-·O. Form IS {Form!S.f

I- 0. Form2 (Form2.frrr 0. Form3(Form3.frrr 0. Form4 (FormS.fm - 0. Form5 (Fonn6.frrr i-0, Form6(Form7.fm 0. Form7 (FormB.frrr r-· tl,. Form8(PrWor·m. tl,Fo,m9(Pf-

_,..,

~ _,.., (Mo<IJel form 1-15 .. ~ stari O · -· ~ '< s ••. ~

(31)

CONCLUSION

This program is prepared for the law of (yasa 36\2005) government of discount policy. It includes all the customers. This program is used 5 brunch office and used from 5 th of september and will continue one year. By this program the authority incomes increases %60 . we make more than 8000 contracts. Many of the custommers applied this law and learned their debits. Custommers are very pleasure for the law because we give them a change to installments their debits and discount %80 for capital penalties.

(32)

REFERENCES

1. Microsoft Visual Basic 6.0 Programmer's Guide. 2. Law of (36\2005)

(33)

APPENDIX

Code for FORM 1.2

Private Sub Form_Load()

End Sub

Private Sub Textl_KeyPress(KeyAscii As Integer)

If Key

Ascii = " 13" Then

If Textl.Text = "pos459" Then

Form2.Visible = True

Form7.Visible = False

Else

MsgBox "Y

ANUS SiFRE GiRDiNiZ", vbExclamation, "ERROR"

Unload Me

End If

End If

End Sub

Code for FORM - 1.3

Private Sub Commandl_ Click()

Forml .Visible= True

Form2.Visible = False

End Sub

Private Sub Command2_Click()

Unload Me

End

End Sub

Private Sub Command3

_ Click()

Form5.Visible = True

Formz.Visible-

= False

End Sub

Private Sub Command4_

Click()

Form3.Visible = True

Form2.Visible = False

End Sub

Private Sub Command5 Click()

Form4.Visible = True

(34)

End Sub

Private Sub Command6 _ Click() Form6.Visible = True

Form2.Visible = False End Sub

Private Sub Command?_ Click() Form12.Visible = True

Form2.Visible = False End Sub

Private Sub Command8 _ Click() Form13.Visible = True

Form2.Visible = False End Sub

Private Sub Form_Load() Imagel.Visible = False Timerl.Enabled = False Timerl .Interval = 1000 Timerl .Enabled = True Timer2.Enabled = False Timer2.Interval = 1000 End Sub

Private Sub Timerl_Timer() Labell.ForeColor = &HFF& Label2.ForeColor = &HFF& Imagel .Visible= True Timer2.Enabled = True End Sub

Private Sub Timer2 _ Timer() Labell .ForeColor = &H80000002 Label2.ForeColor = &H80000002 Imagel.Visible = False

End Sub.

Code for FORM 1.4

Dim netk, tak, ss, mon, ay, tay, netal, takmik

Dim a, b, c, d, e, f, g, h, 1, i, j, k, 1, m, n, o, p, r, s,

t,

u, v, Y, z, fat, w, q, X

Dim cc, xt, mm, ccc

(35)

End Sub

Private Sub Command3_Click() On Error Go To cigdem

msg = "KA YIT Y APMAK iSTiYORMUSUNUZ" style= vb YesNo

title = "DiKKA T"

response= MsgBox(msg, vbYesNo, title) If response = vb Yes Then

Data2.Recordset.AddN ew Data2.Recordset.Fields(O) = Textl.Text Data2.Recordset.Fields(l) = Text2.Text Data2.Recordset.Fields(2) = Text3.Text Data2.Recordset.Fields(3) = Text4.Text Data2.Recordset.Fields( 4) = Text5.Text Data2.Recordset.Fields(5) = Text6.Text Data2.Recordset.Fields(6) = Text7.Text Data2.Recordset.Fields(7) = Label70.Caption Data2.Recordset.Fields(8) = Labe127.Caption Data2.Recordset.Fields(9) = Label28.Caption If Option1(6).Value = True Then

Data2.Recordset.Fields(l 0) = Label40.Caption Elself Option1(5).Value = True Then

Data2.Recordset.Fields(l 0) = Label3 7 .Caption Else

Data2.Recordset.Fields( 10) = Labe13 7. Caption End If

Data2.Recordset.Fields( 12) = Label67 .Caption If Optionl(O).Value = True Then

Data2.Recordset.Fields(13) = 0 Label72.Caption = 0

Elself Optionl(l).Value = True Then Data2.Recordset.Fields(l 3) = 6 Elself Option1(2).Value = True Then

Data2.Recordset.Fields(13) = 12 Elself Option1(3).Value = True Then

Data2.Recordset.Fields(l 3) = 18 Elself Option1(4).Value = True Then

Data2.Recordset.Fields(13) = 24 Elself Option1(5).Value = True Then

Data2.Recordset.Fields(13) = Label58.Caption Elself Optionl(6).Value = True Then

Data2.Recordset.Fields( 13) = Label5 8. Caption End If

Data2.Recordset.Fields(l 1) = Labe172.Caption

::-1. /

-, ~ ~Fi',,O~~_::_..,/·

(36)

Data2.Recordset.Fields(l 7) = "P"

Else

Data2.Recordset.Fields(l 7) = "Y"

End If

'""""'''''''''''''''''''''''"''''''

Data2

.Recordset.

Update

Forrn8.Show

Call temizle

For Index= 0 To 6

Optionl(Index).Enabled = False

Optionl(Index).Value = False

Next Index

Call yeni

Else

Call temizle

For Index= 0 To 6

Optionl(Index).Enabled = False

Optionl(Index).Value = False

Next Index

Call yeni

Textl .SetFocus

Command3.Enabled = False

End If

Exit Sub

cigdem:

MsgBox " Li.itfen

Programdan 91k1p tekrar giris

yapiruz",

vbExclamation, "UY

ARI"

End Sub

Private Sub Form_Load()

LabellO.Caption = Date

Label46.Caption = Date

Label47.Caption = Date

Text2.Enabled = False

Text3.Enabled = False

Text4.Enabled = False

Text5.Enabled = False

Text6.Enabled = False

Text7.Enabled = False

Command3.Enabled = False

Label70.Caption = Format(Date, "yyyymmdd")

For Index= 0 To 6

(37)

..

Text7.Enabled = False For Index= 0 To 6 Optionl(lndex).Enabled = False Next Index End Sub

Private Function MyLeftPad(myStr As String, iLen As Integer) As String Dim iCnt, iExLen, iCurLen As Integer

Dim exStr As String

iCurLen = Len(Trim(myStr)) iExLen = iLen - iCurLen If iExLen <= 0 Then

MyLeftPad = myStr Else

exStr = ""

For iCnt = 1 To iExLen Step 1 exStr = exStr

+

"O"

Next iCnt

MyLeftPad = exStr

+

myStr End If

End Function

Private Sub Label 18 _ Click()

MsgBox "2004 yilma ait odenmeyen tuketim bakiyesini bakiyesini gosterir ", vbExclamation, "BiLGi"

End Sub

Private Sub Label25 _ Click()

MsgBox "2004 yilma ait tuketim bakiyesini gosterir ", vbExclamation, "BiLGi" End Sub

Private Sub Label26 _ Click()

MsgBox "Basvuru tarihi itiban ile 31/12/04 gecmisine ait odenmeyen gecikme zammi miktanm belirtir. ", vbExclamation, "BiLGi"

End Sub

Private Sub kontrol() opt= Label58.Caption If opt = 6 Then

Optionl(O).Enabled = True Optionl (2).Enabled = False Option1(3).Enabled = False Option1(4).Enabled = False End If If opt= 12 Then Option1(3).Enabled = False Option1(4).Enabled = False

(38)

End Sub

Private Sub Optionl_Click(Index As Integer) Command3 .Enabled

=

True

On Error GoTo cigdem

If Label20.Caption <= 0 And Label22.Caption <= 0 Then Option I (O).Enabled = False

Select Case Index Case 1

Label71.Caption

=

FormatNumber((CDbl(Label49.Caption)

*

1.105) - CDbl(Label49.Caption))

Label72.Caption

=

FormatNumber(CDbl(Label71.Caption)

+

CDbl(Label62.Caption)

+

CDbl(Text3.Text))

Label67.Caption

=

FormatNumber(CDbl(Label72.Caption) I 6)

Case 2

Label71.Caption

=

FormatNumber((CDbl(Label49.Caption)

*

1.195) - CDbl(Label49.Caption))

Label72.Caption = FormatNumber(CDbl(Label71.Caption)

+

CDbl(Label62.Caption)

+

CDbl(Text3.Text))

Label67.Caption = FormatNumber(CDbl(Label72.Caption) I 12)

Case 3

Label71.Caption = FormatNumber((CDbl(Label49.Caption)

*

1.285) - CDbl(Label49.Caption))

Label72.Caption

=

FormatNumber(CDbl(Label71.Caption)

+

CDbl(Label62.Caption)

+

CDbl(Text3.Text))

Label67.Caption = FormatNumber(CDbl(Label72.Caption) I 18)

Case 4

Label71.Caption = FormatNumber((CDbl(Label49.Caption)

*

1.375) - CDbl(Label49.Caption))

Label72.Caption

=

FormatNumber(CDbl(Label71.Caption)

+

CDbl(Label62.Caption)

+

CDbl(Text3.Text))

Label67.Caption

=

FormatNumber(CDbl(Label72.Caption) I 24)

Case 5

Label71.Caption

=

FormatNumber(CDbl(Label63.Caption))

Label72.Caption

=

FormatNumber(CDbl(Label74.Caption)

+

CDbl(Text3.Text)) Label67.Caption

=

FormatNumber(CDbl(Label72.Caption) I Val(Label58.Caption))

Case 6

Label72.Caption

=

FormatNumber(CDbl(Label48.Caption)

+

CDbl(Text3.Text)) Label67.Caption

=

FormatNumber(CDbl(Label60.Caption))

(39)

Label71.Caption = FormatNumber((CDbl(Label49.Caption)

*

1.105) - CDbl(Label49.Caption)) Label72.Caption = FormatNumber(CDbl(Label71.Caption)

+

CDbl(Label62.Caption)) Label67.Caption = FormatNumber(CDbl(Label72.Caption) I 6) Case 2 Label71.Caption = FormatNumber((CDbl(Label49.Caption)

*

1.195) - CDbl(Label49.Caption)) Label72.Caption = FormatNumber(CDbl(Label71.Caption)

+

CDbl(Label62.Caption)) Label67.Caption = FormatNumber(CDbl(Label72.Caption) I 12) Case 3 Label71.Caption = FormatNumber((CDbl(Label49.Caption)

*

1.285) - CDbl(Label49.Caption)) Label72.Caption = FormatNumber(CDbl(Label71.Caption)

+

CDbl(Label62. Caption)) Label67.Caption = FormatNumber(CDbl(Label72.Caption) I 18) Case 4 Label71.Caption = FormatNumber((CDbl(Label49.Caption)

*

1.375) - CDbl(Label49.Caption)) Label72.Caption = FormatNumber(CDbl(Label71.Caption)

+

CDbl(Label62.Caption)) Label67.Caption = FormatNumber(CDbl(Label72.Caption) I 24) Case 5 Label71.Caption = FormatNumber(CDbl(Label63.Caption)) Label72.Caption = FormatNumber(CDbl(Label74.Caption)) Label67.Caption = FormatNumber(CDbl(Label66.Caption)) Case 6

Label72.Caption = FormatNumber(CDbl(Label48.Caption)

+

CDbl(Text3.Text)) Label67.Caption = FormatNumber(CDbl(Label60.Caption)) Label71.Caption = 0 End Select End If Exit Sub cigdem:

MsgBox" Lutfen Programdan cikip tekrar giriniz", vbExclamation, "UY ARI" End Sub

Private Sub Textl_KeyPress(KeyAscii As Integer) netk = 0 tak = 0 ss

=

0 mon=O ay=

0

tay =

0

netal = 0

(40)

e=O f= 0 g=O h=O 1 =

0

i

=

0 j=O k=O l=O m=O n=O o=O p=O r=O s=O t= 0 u=O v=O Y=O z=O fat= 0 w=O q=O X=O cc= 0 xt

=

0 mm=O CCC= 0

If Key Ascii = "13" Then

strg = "select

*

from data where tukno ="' & Textl .Text & ""' Set dbs = OpenDatabase("c:\yasa362005\esasl .mdb")

Set temp= dbs.OpenRecordset(strg, dbOpenDynaset) Iftemp.EOF = True Then

MsgBox "Aranan

Kayit

Bulunamadi", vbExclamation, "UYARI" Textl .Text= ""

Text 1. SetF ocus Else

a= temp("bakiye").Value 'anapara b = temp("gz").Value 'kapital gz

c = temp("odenen").Value '2004 tahsil edilen para Label3.Caption = temp("isim").Value

(41)

End If

End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer) If Key Ase ii = "13" Then

If Text2.Text =""Then

MsgBox "Yanhs Islem Yapiyorsunuz'', vbExclamation, "DiKKAT" Else

If Text2.Text = 0 Then

MsgBox "YASADAN FA YDALANAMAZ", vbExclamation, "UY ARI" Call temizle

Else

Text2.Text = FormatNumber(Text2) Text3.Enabled = True

T ext3. SetF ocus End If

End If End If End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer) If Key Ase ii = " 13" Then

If Text3.Text =""Then

MsgBox "Yanhs lslem Yapiyorsunuz", vbExclamation, "DiKKAT" Else Text3.Text = FormatNumber(Text3) Text4.Enabled = True Text4.SetFocus End If End If End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer) If Key Ase ii = "13" Then

If Text4.Text =""Then

MsgBox "Yanhs Islem Yapiyorsunuz", vbExclamation, "DiKKAT"

Else · Text4.Text = FormatNumber(Text4) Text5.Enabled = True Text5.SetFocus End If End If End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer) If Key Ase ii = "13" Then

fs = Len(Text5.Text) If fs

<>

9 Then

(42)

Text6.SetFocus End If

End If

End Sub

Private Sub hesap() On Error GoTo cigdem

d = CDbl(Text2.Text) 'simdiki bakiye g = CDbl(Text3.Text) 'simdiki gz h = CDbl(Text4.Text) '2005tahsilat1 If d = 0 Then Call temizle Else j = a - b '2004 anapara - kapital gz k = h - c '2005tahsilat - 2004 tahsilat lfk > j Then Label19.Caption = FormatNumberG) Label21.Caption = FormatNumber(k) X=k-j If CDbl(X) > b Then Label22.Caption = 0 Else l= b-X Label22.Caption = FormatNumber(l) End If Label20.Caption = 0 Label44.Caption = 0 m = CDbl(l

*

0.2) 'tahsil edilen %20 gz n = CDbl(l

*

0.8) 'af miktan %80 p = CDbl(d -1)

r = CDbl(netk

*

0.1)' %10 pesin almacak miktar Label27.Caption = FormatNumber(m)

Label28.Caption = FormatNumber(n) Label3

l.

Caption = F ormatN umber(p) Label49.Caption = FormatNumber(p - 0)

Label55.Caption = FormatNumber(CDbl(Label27.Caption)

+

CDbl(Label20.Caption)) If Label51.Caption = 1111

Then Label51.Caption = 0 End If

Label33.Caption = FormatNumber(CDbl(Label49.Caption)

+

CDbl(Label51.Caption)) Else

(43)

If g <= 0 Then tay

=

0

w

=

0 'simdiki gz

Label51.Caption

=

FormatNumber(g) Elself g

<

tay Then

g=O tay

=

g

Label51.Caption

=

FormatNumber(g) Else

w

=

g - tay 'simdiki gz - tah. gz

Labe151.Caption = FormatNumber(CDbl(w)) End If

v

=

b

+

tay ' toplam gz miktan z = (v

*

0.2) '%20 tahsil edilecek gz q

=

(v

*

0.8) 'af yapilacak %80 gz miktan End If 1

=

d - b ' net bakiye r

=

(netal

*

0.1) s = (netal - r) Label19.Caption

=

FormatNumber(i) Label21.Caption

=

FormatNumber(k) Label20.Caption = FormatNumber(ss) lftay

=

0 Then Label44.Caption

=

0 Else Label44.Caption

=

FormatNumber(tay) End If Label22.Caption

=

FormatNumber(v) Label27.Caption = FormatNumber(z) Label28.Caption = FormatNumber(q) Label31.Caption = Formatl-Jumberu) If 1 < ss Then Label49.Caption

=

0 Else Label49.Caption = FormatNumber(1 - ss) End If mm= (z

+

ss) Label55.Caption

=

FormatNumber(mm)

Label33.Caption

=

FormatNumber(CDbl(Label49.Caption)

+

CDbl(Label51.Caption)) End If

End If

Label36.Caption

=

FormatNumber(CDbl(Label55.Caption)

+

CDbl(Label33.Caption)) Label37.Caption

=

FormatNumber(CDbl(Label36.Caption)

*

0.1)

If CDbl(Label55.Caption) < 100 Then Label40.Caption

=

0

(44)

Label62.Caption

=

FormatNumber(CDbl(Label36.Caption) - CDbl(Label37.Caption)) Call taksit

If Label58.Caption = 0 Then Label60.Caption = 0 Else

Label60.Caption

=

FormatNumber(CDbl(Label48.Caption) I CDbl(Label58.Caption))

End If If Label58.Caption = 0 Then Call taksit2005 Call faiz2005son Else Call faiz2005son End If

Label74.Caption

=

FormatNumber((CDbl(Label63.Caption)

+

CDbl(Label62.Caption))) If Label58.Caption

=

0 Then

Label60.Caption

=

0 Label66.Caption

=

0 Else

Label66.Caption = FormatNumber(CDbl(Label74.Caption) I CDbl(Label58.Caption))

End If Exit Sub cigdem: MsgBox II

Lutfen Programdan cikip tekrar giris yapmiz", vbExclamation, 11UYARI11

End Sub

Private Sub temizle() Label3.Caption

=

1111 Label5.Caption = 1111 Label8.Caption = 1111 Labell l.Caption

=

1111 Label13.Caption = 1111 Textl.Text = 1111 Text2.Text = 1111 Text3.Text = 1111 Text4.Text

=

1111 Text5.Text

=

1111 Text6.Text

=

1111 Text7.Text = 1111 Label19.Caption = 1111 Label20.Caption

=

1111 Labe119.Caption

=

1111 Label21.Caption

=

1111

(45)

Label48.Caption = "" Label60.Caption = 1111

Label58.Caption = ""

Label49.Caption = ""

Label36.Caption = ""

Labe137.Caption

= ""

Label62.Caption =

1111

Label63.Caption =

1111

Label74.Caption =

1111

Label66.Caption =

1111

Label71.Caption =

1111

Label72.Caption =

1111

Label67.Caption =

1111

Textl .Enabled= True

Textl .SetFocus

Comrnand3.Enabled = False

End Sub

Private Sub taksit2005()

If CDbl(Label62.Caption) > 100 And CDbl(Label62.Caption) < 500 Then

Label58.Caption =

11611

End If

If CDbl(Label62.Caption) > 500 And CDbl(Label62.Caption) < 1000 Then

Label58.Caption =

11

12

11

End If

If CDbl(Label62.Caption) > 1000 And CDbl(Label62.Caption) < 2000 Then

Label58.Caption = "18"

End If

If CDbl(Label62.Caption) > 2000 And CDbl(Label62.Caption)

<

5000 Then

Label58.Caption =

112411

End If

If CDbl(Label62.Caption) > 5000 Then

Label58.Caption = "36"

End If

End Sub

Private Sub taksit()

If CDbl(Label48)

<

100 Then

MsgBox

11

36/2005 sayih yasadan faydalanamazsm1z!!!

11,

vbExclamation,

11

UYARI

11

Label58.Caption = 0

Label60.Caption = 0

End If

(46)

If CDbl(Label48.Caption)

>

1000 And CDbl(Label48.Caption) < 2000 Then Label5 8. Caption = 11 18 11

End If

If CDbl(Label48.Caption)

>

2000 And CDbl(Label48.Caption) < 5000 Then Label58.Caption = 112411 End If If CDbl(Label48.Caption)

>

5000 Then Label58.Caption

=

113611 End If End Sub

Private Sub faiz2005son() If Label55.Caption = 0 Then If Label58.Caption

=

11611 Then Label63.Caption

=

FormatNumber((CDbl(Label62.Caption)

*

1.105) - CDbl(Label62.Caption)) Elself Label58.Caption

=

1112" Then Label63.Caption = FormatNumber((CDbl(Label62.Caption)

*

1.195) - CDbl(Label62.Caption)) Elself Label58.Caption = 1118" Then Label63.Caption = FormatNumber((CDbl(Label62.Caption)

*

1.285) - CDbl(Label62.Caption))

Elself Label58.Caption

=

"24" Then

Label63.Caption = FormatNumber((CDbl(Label62.Caption)

*

1.375) - CDbl(Label62.Caption)) Elself Label58.Caption

=

113611 Then Label63.Caption = FormatNumber((CDbl(Label62.Caption)

*

1.555) - CDbl(Label62.Caption)) Else Label63.Caption = 0 End If

Elself CDbl(Label37.Caption) <= CDbl(Label49.Caption) Then Call faiz05

Elself CDbl(Label37.Caption) > CDbl(Label49.Caption) Then Call faiz05

Elself (CDbl(Label37.Caption)

<

CDbl(Label49.Caption)) And (CDbl(Label37.Caption)

>

CDbl(Label55.Caption)) Then

(47)

Else If Label5 8. Caption = " 12" Then

Label63.Caption = ForrnatNurnber(ddd

*

1.195)

Elself Label58.Caption = "18" Then

Label63.Caption = ForrnatNurnber(ddd

*

1.285)

Elself Label58.Caption = "24" Then

Label63.Caption = ForrnatNurnber(ddd

*

1.375)

Elself Label58.Caption = "36" Then

Label63.Caption = ForrnatNurnber(ddd

*

1.555)

Else

Label63.Caption = 0

End If

End Sub

Private Sub faiz05()

If Label58.Caption = "6" Then

Label63.Caption = ForrnatNurnber((CDbl(Label49.Caption)

*

1.105) -

CDbl(Label49.Caption))

Elself Label58.Caption = "12" Then

Label63.Caption = ForrnatNurnber((CDbl(Label49.Caption)

*

1.195) -

CDbl(Label49.Caption))

ElseifLabel58.Caption = "18" Then

Label63.Caption = ForrnatNurnber((CDbl(Label49.Caption)

*

1.285) -

CDbl(Label49.Caption))

Elself Label58.Caption = "24" Then

Label63.Caption = ForrnatNurnber((CDbl(Label49.Caption)

*

1.375) -

CDbl(Label49.Caption))

Elself Label58.Caption = "36" Then

Label63.Caption = ForrnatNurnber((CDbl(Label49.Caption)

*

1.555) -

CDbl(Label49.Caption))

Else

Label63.Caption = 0

End If

End Sub

Private Sub Text6_KeyPress(KeyAscii As Integer)

If Key

Ascii = " 13" Then

If Text6.Text =""Then

MsgBox "ilgili hane Doldurulrnak Zorundadir", vbExclarnation, "DiKKAT"

Else

(48)

If Key Ase ii = " 13" Then If Text7.Text =""Then

MsgBox "ilgili hane Doldurulmak Zorundadir", vbExclamation, "DiKKAT" Else Call hesap For Index= 0 To 6 Optionl(Index).Enabled = True Next Index End If End If Call kontrol End Sub

Code for FORM 1.5

Private Sub Commandl_Click()

Form2.Visible = True

Form4.Visible = False

Textl.Text =

1111

Text2.Text = ""

Text3.Text = ""

Text4.Text = ""

Text5.Text = ""

Text6.Text = ""

Label4.Caption = ""

Label5.Caption =

1111

Labell 1.Caption = ""

Label13.Caption =

1111

Label15.Caption = ""

Labell 7. Caption = ""

Label19.Caption = ""

Label21.Caption = ""

Label23.Caption = ""

Label25.

Caption = ""

Label27.Caption = ""

Label28.Caption = ""

Label29.Caption = ""

End Sub

(49)

Label5.Caption = '"'

Labell 1.Caption =

1111

Label13.Caption =

1111

Label15.Caption = ""

Labell 7.Caption = ""

Labell 9.Caption = ""

Label21.Caption = ""

Label23.Caption = ""

Label25.Caption = ""

Label27.Caption = ""

Label28.Caption = ""

Label29.Caption = ""

Textl .Enabled= True

Textl .SetFocus

Command2.Enabled = False

End Sub

Private Sub Command2

_

Click()

On Error GoTo cigdem

msg = "KA

YIT Y

APMAK iSTiYORMUSUNUZ

11

style= vb

YesNo

title = "DiKKA

T"

response= MsgBox(msg, vbYesNo, title)

If response = vb

Yes Then

Data2.Recordset.AddN

ew

Data2.Recordset.Fields(O)

= Textl.Text

Data2.Recordset.Fields(l) = Label4.Caption

Data2.Recordset.Fields(2) = Text4.Text

Data2.Recordset.Fields(3) = Text5.Text

Data2.Recordset.Fields(4) = Text6.Text

Data2.Recordset.Fields(5) = CDbl(Text2.Text)

Data2.Recordset.Fields(6) = CDbl(Text3.Text)

Data2.Recordset.Fields(7) = CDbl(Label 13 .Caption)

Data2.Recordset.Fields(8) = CDbl(Label 15 .Caption)

Data2.Recordset.Fields(9) = CDbl(Labell 7.Caption)

Data2.Recordset.Fields(10) = CDbl(Label19.Caption)

Data2.Recordset.Fields(l 1) = CDbl(Label21.Caption)

Data2.Recordset.Fields(12) = CDbl(Label28.Caption)

Data2.Recordset.Fields( 13) = CDbl(Label29.

Caption)

If Optionl(O).Value = True Then

Data2.Recordset.Fields(l 4) = 0

Elself Optionl(l).Value = True Then

Data2.Recordset.Fields(14) = 6

Elself Option1(2).Value = True Then

Referanslar

Benzer Belgeler

This chapter considers a system with two energy harvesting (EH) nodes transmitting to a common destination over a random access channel. The amount of harvested energy is as- sumed

Robot construction problem can be defined as a planning problem that asks for a final stable configuration of different types of prefabricated blocks stacked on each other that

As it was mentioned in Chapter 1, there was not yet a published study conducted at the time of this thesis was written on the performance of the Markov chain Monte Carlo methods

Maximum Weight Scheduling can achieve throughput optimality by exploiting oppor- tunistic gain in general network topology with fading channels.. Despite the

The first condition,&lt;p 11 0 , is related to the robot and is satisfied for a physical system since b &gt; 0. Second condition, on the other hand, is related to the virtual

Next, we model the problem as that of network utility maximization, and provide a dynamic joint flow control, scheduling and secrecy encoding scheme under perfect and imperfect

As a result of this, and for practical reasons it is easier to measure the amount of alcohol in our breath (e.g. in our lungs).The level of alcohol in the body is normally measured

After she graduated from Lefke Gazi Lisesi in 2007 she continued her higher education in Afyon Kocatepe University, Automotive Teaching.. In the same year, she went