neareastuniversitydocs.neu.edu.tr/library/6255464575.pdf · neareastuniversity facultyofeconomicand...
TRANSCRIPT
NEAR EAST UNIVERSITY
FACULTY OF ECONOMIC ANDADMINISTRATIVE SCIENCES
DEPARTM-ENTOF COMPUTERINFORMATION SYSTEMS
GSM SHOPAUTOMATION SYSTEM
2006/2007 SUMMER TERMGraduation Project
cıs- 400
Şubmitted to : Dept Of cıs'
Submitted by : Adil KALYONCµ (991675)..Advisor : Mr.Mustafa MENEKAY
Lefkoşa - 2007 ·
i,.~ı~~!~m~NEU
f f(,,'r''
,~ <:~ '71>..,., ·'11> cP 1 ')-. -~·'•,
CONTENTS
I. Table of Contents
II. ACKNOWLEDGEMENTS
III. ABSTRACT
IV. INTRODUCTION
v. SYSTEM DESIGN
• DFDs
• Database Design
VI. USER MANUAL
• User Guidelines
i • User Flow Charts
VII. REFERENCES
APPENDIX I• Screen Outputs
APPENDIX II• Source Code
..
I
. 3
. 4
. 9
.............................••.•........ 1 7
. 23
......................................... 37
......................................... 56
•••••••••••••••••••••••••••.••••••••••••• 5 7
· • • • • • • • • · ••••••••••••••••••••....••••... 7O
1
ACKNOWLEDGEMENTS
I am very much thankful to my God
Thanks for all supported me teachers special thanks for Ass.proff.Dr. Yalcin
Ak.cali and Mr.Mustafa Menekay who gave me such opportunity to prove
myself I been and hand working. So it is my pleasure to dedicate this project to
my honorable teacher who provide me the guideline where I felt difficulty. I feel
no hesitation to say that they are really capable and kind enough to mold every
student toward study.
I am thankful to my parents. who provided my such a healthy study
environment.
I also would like to give a special thank for my friend Evren öztürk who
always motivated me when ever I got disappointed in any point while making
this program.
•..
2
ABSTRACT
This software is a specific program only suitable for the Mobile Shop Automation system thatis dealing with different kind of mobile brands such as Nokia, Ericson Samsung Panasonicetc. The shop owners is actually a retailer that purchases ready products from themanufacturer and resell it to the consumers.
Being a student of Computer Information System I decided to make positive use of computerby designing and programming a computer based system for a Mobile Shop dealer thatmanages its purchases from the manufacturer, keeps record of the manufacturer and thepurchases, keeps record of the stock present in the shop, manage the sale system accuratelyand similarly keeps record of the items sold and of the customers
In this project I used the visiual basic as programming technology because of the VB easyObject-Oriented coding characteristic. And I used Microsoft Access as database. BecauseMicrosoft access performance is very good.Thought this program I tried my level best to minimize the errors rate as low as possible.This system has been designed in a way that it would work speedier than the normal recordkeeping system
..
3
GSM AUTOMATION SYSTEM
PURPOSE OF THE PROJECT
This project is to design a computerized database application for a company that purchasesand sales stationery products. First of all I would like to explain business point of my topic.This is basically a stock program which at the same time checks the daily sales, purchases aswell as retailers.
This project aims at existing manual system handicap, easiness and flexibility that thiscomputer based application will bring to the users. Facilities allowing employees to avoidmistakes that would usually happen in the manual system. This project shall allow managersto have a bottle neck analysis of the activities in their business. Moreover it protects businessaccounting system depending on the data accuracy by the users.
CURRENTLY SYSTEM
There is no storage of records of item purchased, but invoices are kept that is the onlyrecord of the products purchasedThere is no record kept of the products that are currently in the stock, no stock cardsare used. Products are counted in the cupboard.All invoices received are kept in a separate files one for each manufacturer.Customers' invoices are kept in another file.Money is kept in locker with an invoice kept in separate file, each day money is sentto bank account by the salesman.
DISADVANTAGES OF CURRENTLY SYSTEM
Loss of documents is quite usual in the company as different employees make theorders and keep according to them.For a new employee it is very difficult to find out the documents in different manualfile.For a new employee it is very difficult to tell a customer an item's price as he mustlook into the manually generated price list.On demand of a customer for more than one item it is not always possible by theemployee to be sure if that quantity is available or not, for the case he must check andrecount the items in the stock repeat idly.No customer record is kept. "'Difficult for accountant to collect all invoices made, and then check them with the
"'stock quantity and then recalculate, more time consuming.It is very time consuming for managers to check even a single day activity by looking
" at all those different files in order to take any decision.
FOREWORD OF NEW SYSTEM
First of all I would like to describe nature of the business that I have choused to convert itssystem into a computer based database program.
Stationery shop is a business that purchases products sets either from wholesalers. They keepthe stock of the goods they purchase in order to resell them in the market. This business works
4
on cash or credit payment meaning that from manufacturers or whole sellers they purchase inlarge quantity on cash or credit.
There are totally six different main processes in this business cycle as following
1. Records2. Stock3. Sell and purchase4. report5. settings
The shop that I analyzed does not sell any goods on installments. My project is to make adatabase and software for such a shop that shall provide utilities for the above mentionedfacilities.
I have decided to use visiual studio 6.0 with access in order to program the databaseapplication for the purpose mentioned above. I have come up with the solution that I wouldlike to explain one by one below J
..•...
5
SOLUTION
1. Records Process:
This is the first main process in my system. This section is dedicated to the registration ofsuppliers, customers, and log in records. This part is sub divided in to three main classes.
• Customers
In this process we register information about different customers from where we sellgoods. This section is basically used in order to keep records of customers who shop fromthe stationery.
• Suppliers
In this process we register information about different suppliers from where we purchasegoods. This section is basically used in order to keep records of suppliers who sell goodsto the stationery.
2. Stock Process:
This process is simply to check the available goods in the shop and their specifications.We register new product with it
In this sub process we describe the information of any product and register it inside anycategory already registered in previous sub process. We have utility to change or search goodsdata in this sub process as well. We can learn here what is last purchase price of goods andprofit of our and min stock level of product.
3. Sale Process:
This process is divided into two sub processes as explained below.
o Sale ••
This process is similar to the one "Purchase stock item" but the only difference is that herewe are the sellers. Similarly we do not sell to any firm or company but sell to differentrandom customer that we do not need to register any customer in particular but for thecase we register a minor information about them such as name, contact number etc in ourdatabase while giving them invoice of the products they purchase.
Before we make sale, we need to store the record of the customer to whom we are selling.This section of my program is used for the purpose. In this section we have utilities foradding of a customer records.
6
o Edit Sale Invoice
Just like previous editing of the invoice this section also allows the user to edit the saleinvoice if any modifications required
4. Purchase Process
This process has three sub process, these are new purchase, edit purchase and alsopayments to suppliers for these purchases.
o Purchase
In this process we add the records of a new invoice from the supplier along withthe information of supplier, invoice and the products purchased. Accounts areautomatically saved into the database while entering the new records to thedatabase.
o Edit Purchase
After adding any invoice data to the database, and finding any mistakes caused byuser while entering the data or any kind of change in the invoice, we use thissection to edit our purchased invoice from the supplier
o Payment Process
In this process we pay to suppliers to purchased product as credit. We are canselect supplier name in that way we can see all invoice of that suppliers so we pay to themother way directly we can invoice number so again we pay to it, of course here we can seehow much our debts and we cant not pay more than debt.
5. Reports
This section is for managerial purpose, where different reports are created providing queryparameters. Some examples of reports that can be used for managerial purpose are
• • Customer list• Supplier list• Stock list
•.lt
• "Minimum stok level list• Sales report• Sales ace.report• Purchase report• Purchase acc. Report6.settings1 .change password part and 2.add city pard and3.add new brand brand part
7
BENIFITS OF NEW SYSTEM
All stock items are recorded to the system, thus employees do not need to rememberall properties of the product by their heartNew employee just has to look at the barcode number and all information he canretrieve from the database to tell customer.Less time is used in order to find out the availability of the product range in the stock.Company accounts receivable and accounts payable is easily calculated.Managers can have a better look at the overall activities, thus allowing them to decideanything correctly before hand, making them more profit.
SYSTEM BOUNDRIES
1) Most of the employees do not have computer knowledge.2) Transfer of all the data from the manual stock cards to the computer database system
need accuracy and can be time consuming.3) Wrong entry to the system may cause in generating wrong reports.4) Loss of computer, damage to hard disk etc, all data might be lost, so all reports are
kept manually as well.5) It is not easy to train employee and is time consuming as well.6) Most of old fashion experienced employees do not want to accept computer based
application as they have fear that new young employees may replace them7) Purchase of computers and making a network system in the company cost, and
maintenance is expensive.
SYSTEM REQUIREMENTS
A computer for each department such as stock, showroom, manager and accountantComputer minimum 1.5 GHzHard Disk capacity 100 MBOperating system: Windows XP or Windows NTOffice 2003
microsoft visual studio 6.0
I hope my this software will help such a business manager who deal:s in retailing stationeryproducts by allowing them to keep the track of the records of their stock items, purchases andsale, thus enabling them to take a proper cfecisionbefore hand.
..
8
..
DATA FLOWDIAGRAMS
9
CONTEXT DIAGRAM
contex data diagram for GSM shop automation system
Co .Q:;:; +-'Ctl Ctl
C
C E Eo
.Q ı... ı...:;:; Q)
+-' .E .ECtl
Ctl CE -~
E C C .QC o
·- ·- .Qı...
ı... ..!:ıt::::+-'
.E >
.E Q) Ctl+-' C
o "'O ECtl C Q)
C o oE ·- -~ Q)
+-' ı...ı...
en E .Eı... -~ o en.E > Ctl
Q) "'O CQ. C ..c
"'O C "'O
-~ Q. o
o ~
:::J Q) ı...
C
ı... :::J
E-~ en en
..c ~Ctl Q.
"'O "'O ..cQ.
"'O ..c "'O
Q)
Q.Q) o Q)
"fü/+-'
Q)- +-' ı... +-'
"'O:!:::=,
"O :::J "O
"OQ) Q.
Q) Q)
Q)
iI
i
reports(*)Q)()·5
Q) >() C·5 Q)>C 'CO·- ınQ) .•....co '6 I•ın Q)
Coiiı
CE oı...iiıo- ECı...ı...J2aı
E Co ı...ui aı::::ı Eu o"O ui2 ::::ıi5 uaı
REPORTS(*)1 )customer list2)supplier list3)brand list4)minimum stock list5)sales report6)supplier accounting report?)purchase report8)customer acc. accounting report 1
10
DFD TOP LEVEL FOR GSM AUTOMATION SYSTEM
I
--------------hrand infornıatio,n----------------------,,,, it brandinfornıationı---------
-----------model infornıatio,n-------------------~dit modelinformation,---------
-brand data-----•--edit branddat;,----•,+-branddatatoeditl---
randid tomodelreg.--BRANDFILE
rchase
o~E.9.!:ai"OoE
""'Ü.8(/)
"O2u
PURCHASEFILE MODELFILE SUPPLIERFILE
~-------ourchase dataforreport'---------,supplier acc.forreport
ited modelstockdata~ -odeI stockdata
o edıtsalea tosate ~.o saler data-
* '
•.
CUSTOMERFILE-------------______,
----minimum stocklist report:s-------~ .'in 1:'.oo..[I!SALEFILE -----ale dataforreport<s---------'
customerace.datafor repots
11
DETAIL DFD FOR PURCHASE PROCESS
co .•....•
ro ·>-o-o Q)
-o .8 C
C 2 oco co co ~
Q)L.. .•....•.o -o co E
Ü -o C
·o -o -o L.. oQ) C -o o ~> '+-
C~ co C C-o L.. co ·- §
Q)Q) .o L.. -o-o .o .E
aı en Q)C
Ü.!::
·o ..cco
Ü o L.. "'O
> L...•....• ..o C
.!:: ::l co .•....• ro
aı o. ro BRAND FILE -o .o(/) -o -o
Q)
ros: Q) L...•....•Ü 'o -~:io.. Q) o.
o.::len
SUPPLIER '+-
C C Co ·- o
() ~ CÜ ~coL.. Q) L..
-o §::l en .•....• oo. co en E .E
.•....• ..c 'oı C
'o Ü Q) -o ·-L.. L.. Q) ai
Q) ::lo. :-g .•....• "O
o 'o o.•....• :-g -o Q) E:-g C
o, o. coo. L..
o. ::l.o
::l enenI
model id to .•....•'oQ)
.8;, ı 2 co-o
CÜ-ooE
PURCHASE purchasedata to edit _
3
12
DETAILD DFD FOR PURCHASE SUBPROCESS
Q)Ü'ö>CQ)(/)ro..ce::ıa.~Q)C
supplier id edit purchasesupplier id purchaseSUPPLIER
:!=Q) ro -a ~I j
Q) I (/) .•...• roro ro o -a..c -a .•...•Ü Q) ro Q)ı... .•...• (/)::ı (/) ro roa. ro -a ..cs:
Q) Üo Ü ı....•...• ı... (/) ::ı:2 ::ı roQ) ~ ~I :!=-a-a Q) Q)o CE
I.•. I +
PURCHASE
MODEL modeUd to edit purchase
4
13
IiiiiiIiIIi
DEAIL DFD FOR SALE SUB PROCESS
customer id to sale CUSTOMER
MODEL FILE
..
..
SALE
6
14
edited sale invoice
customer id to edit
DETAILED DFD FOR SALE PROCESS
o
MODEL
.•....C,._
J2 Q)EC o+-'
Q)
,._(/)Q) :::ı
roE (.)
eno "'O
Q):'!=
+-' Q)
ro "'O
(/):::ı :'!=
en Q)
(.) "'O
,._Q)
,._o .E-"O :-Qa:; Q)"O "Oo oE E
customer id to salecustomer id edit sale
-
CUSTOMER
...•~,'EM~l
•• ı
n:sjı
.•..•I I ro
"On:s
Q)"O
+-' Q)ro o"O +-' n:sQ) ro ti)
+-'ro ro "O
en "O Q)
3:: Q) ~"O
Q) ro Q)C en
5SALE
15
i
II
I
~ynıl#loSiparişNoÜrünNoMiktarBirimfiyatİndirim
SiparişinTarihiSiparişNumar asıAlıoAdıAlıoAdresi
hoşehrıAlıcıEyaıetiveyaİliAlıcıPostaKoduAlıcıUlkesiNakTelefonNumaıAlımTarihifJa~JiyeYöntemiNcNavlunBedeliSatış'J/ergisiOranı
Database Design
Database Relationship Diagram
fat tarihiaratoplamkdvgeneltoplamsatırseytsifirmaadiadresilvdvnoedeme
pialr.ala:ıdıil adi
idfatnosirarıourunidurunadiadetbirimfiyatkdvtoplamtutar
sirketadsoyadsoyadfaturaadresiilceilpcstakcduulkeunvanıtelefonfaksvdareslvno
17
UrünAdıbirimminstokstokadedi
stoknostoka distokadedıminstokkdvsatfiyeifivatmarka
sranourunadiadetfi'latkdvtutar
STOCK TABLE
Alan Özellikleri
Genel
Alan Boyu1JJYeni DeğerlerBiçimResim YazısıSıralıAkıllı Etiketler
18
I
IIII
I
CUSTOMER TABLE
Metin.:ıclsı:ıycı,~SIJy'.:icJfaturaachsi ,,,, ,-,,,,,_-
Alan özellikleri
Genel
Resim YazısıSıralıAkıllı Etiketler
me
"
19
)
SUPPLİER TABLE
9:~§oyad .. .. ·..·. . .....soyad ------··-······faturaadresıilce -il
vno
Alan özellikleri
Genel
.O.lan BoyutıJYeni DeğerlerBiçimResim YazısıSıralıAkıllı Etiketler
..
20
SALES TABLE
urunidurunadi .. ·. · ..adetbirimfiyatkdvtcolamtutar
Genel
Alan BoyutuYeni DeğerlerBiçimResim YazısıSıralıAkıllı Etiketler
21
,,
INVOICE TABLE
Alan Özellikleri
Alan BoyutuYeni Değerler
l BiçimI Resim Yazfsı· Sıralı
Akıllı Etiketler
..
22
••
User Manual
User Guidelines
System requirements
Pentium II 350 MHz.64MBRam50 MB Hard disk spaceMicrosoft OfficeVisiual Studio 6.0
Installation
Insert the CD/Disk into its relative drive on your computer, and copy the file "gsm automation" the folder must be on "c" driver.and install visiual studio software your pc and installMicrosoft office.so double click stock file and run the software
I
Running the program
Simply click on the shortcut icon that you created in installation part explained in previoustopic.Program wil-1 prompt you to enter a valid passwordType as uppercase "adil" and "1" in the password filed and press ENTERA MAIN MENU will appear on the screen
Each of the steps how to proceed is explained in detail one by one below on the precedingpages.
••
23
iiii.
iIIi
i
PASSWORD
User Name
Password
? info OK Cancel
This is the first screen after you run the file asking you to enter a valid password to logon tothe system. Enter "adil 1" as uppercase and click OK
MAİN MENU
..This is the first screen that appears after launching the program, that has following options.
1. Records2. Stock3. Sale and Purchase4. Reports5. settings
We shall discuss each of this process in detail one by one below.
24
l
iI
I
iiI
i
1. Records
Once you choose "Records" by clicking on it, a sub menu will appear on the screen, givingyou options as;
a. Customerb. supplier
1.1 customer:
As in figure below shown;
In this section just like registering new supplier, we register data of new customer to thedatabase. Enter the user information in the relative fields and click -e: Like other registrationforms, this form also allows you to find, edit, or delete any record by clicking the appropriatebutton.. Use EXIT button to go back to the main menu.
25
II
1.2 supplier:
I
We register information of new supplier from where we are purchasing the new goods.To add a new supplier data or to clear the form click"+", to save the information entered onthe form click "-Y", to find any supplier information click SEARCH, if any supplier ID wasgiven the information will be retrieved from the database otherwise a small box will appearprompting to enter any supplier name and then the list of the resembling names will beretrieved from the database.. Once the data is retrieved you can either edit by changing theinformation and simply delete, you can write directly, it checks supplier name to prevent toapperar problem other suppliers names. Click EXIT button to go back to the main menu.
..
..
26
2.Stock
As in figure below shown;
This is a section where we can see all the stock items and their purchase value, profit amount,vat value and also min stock level. This section is made in case we need to change any stockprofij value manually. Purchase price can not be change ~anually, it be changes automaticallywhen a new purchase operation. Sale prices are defines daily from here as total purchase priceand profit, this value automatically insert price table daily.
27
3.Purchase:
As in figure below shown;
In this section we register the invoice received from the suppliers where the new purchaseinformation is given. This is very important part of our program. Enter the invoice numberfrom the invoice into the field "invoice number", select the supplier from the combo box, and..then start entering the model into the database by selecting the models from the drop downcombo box. Quantity in stock and its description comes on-the screen automatically once youselect'any model. Enter the cost and the quantity of the model and press ENTER. The itemsshown in the black lower part of the screen shows the detail of the invoice under the samenumber.
28
ISALE
This is second option on the main menu. Once you click on this button, a submenu containingtwo options will appear on the main menu.
c. Saled. Edit Sale
3.1 Sale
As in figure below shown;
In this section just like registering new supplier, we register data of new customer to thedatabase. Enter the user information in the relative fields and click SAVE. Like otherregistration forms, this form also allows you to find, edit, or delete any record by clicking theappropriate button. To clear the form click NEW. Use BACK button to go back to the mainmenu.
Just like new purchase, new sale form also works the same way, by entering new invoice,then customer ID. Then start entering the model ids in the form one by one that the customerwants to purchase. The stock quantity and the price of the model comes on the screenautomatically once the correct model id is provided. Enter the percentage of the discount andthe quantity to be sold and press ENTER. You will see in the lower section of the screen the
29
detail of the invoice specified. Click PRINT once you are done will all of the models sold,and the invoice will be printed along with all the discount information. Click BACK to goback to the main menu or NEW to clear the form.
4.Reports
This section is used by managers of the business where they can generate different kind ofreports in order to help them in predicting future sale and taking appropriate actions.
It contains 8 different options of generating reports.a Supplier Lisb Customer Listc Brand listd Minimum stock liste Purchase Reportf Sales reportg Supplier Account Reporth Customer Accounts Report
We can get supplier, brand and customers lists by choosing the appropriate button.To generate any purchase or sale report, a date options is displayed on the screen where wegive a range of two dates and then the report is generated as shown in the figure below;
4. 1 customer list
PAINT
30
I
III
4.2 supplier list
Isparta ! O [2341234 23 42Isparta ! O [262] 324 38 79fSparta I O (224] 342 34'-,2"'3:-----+------...;
3)model list
•
Ytı2D1R
31
I
iIII
Ii
i
I
iI
4.4 minimumStock list
..
32
IiIIi-IiiiI
Iii
4.5 sales report
/
..
33
I
IIIIII-I
4.6 customer ace.report
34
4.7 purchase peport
35
4.8 Supplier acc. Report
18.02.200718 02 2007 - I TELP/1. _1 s.02.2007 Toss18.02.200718.02.200718.02.2007 --
5, settings menuchange password part ...
••
New User Name New Password
Change User Name
36
FLOCHARTSMain Menu
I~ ... - "/ Ad.nMn Moou ",
/ t.Records '
(,. i~~~ks )\
4.Purch.ıst~e ..\ 5.;H~lp"- G.Repcrts
"' 7.E.xit,____ r /Your choice
••
\\,
37
Records menu
records menu 1.customer 2.supplier
yourchoise
y
..
38
1.1 customer menu
)Ct.ısıomer$.. SlıhM~,ıt.insert2£.dlt:3.Doleto
Ym1rchoice
N
39
..
Update Reoord
(\
40
II
I
,,//-,,,/ıs Theree~-,.< ldemity no '>----
<,,.,yVıth flıis no .../
X/" " It Can't Save )
---..-,.--~/
Dolete Record
41
y
1.2 Supplier menu
Suer;,liern.SıubMerıkı1.inse,t2.Edlt3 Deleıfo
\
) /
•
'~( L2.1 )
,.,,__..,.,,/
ıı,
•
//I
Updat.e Record
•
..
N
Delete Rooord
45
i
I
2. stock menu
(~
T/~ "/ \
(..
.. Stock Menu ) ..·...1.Stock.
\\,
··-~ //
Your choice.
..
46
II
3.sales and purchase menu3.1 sales menu
(M~
I ,
//
.I/
Your cholce /
..
48
lı
Iılıi
I
) /
Sa.re..Sutı.Menu1.irn;ert2. New Customer3.Del(!te
Yourchoico
ı,..
49
/ Enter Sale Data
(ı.1\.~.
..
50
ı,
4 purchase menu
Purcrı.ase Me.nu·1 . Pucrchase2Jr)Ht Purchase'.lPaymerıts
51
/'/
(/ Purd1~s.:ı ŞuWenu.):.··.··.
t.ınssrt· 2.Delete
//
/Your choie~
..
52
r=I
IL
f!
I_}
N
Delete Record
....
53
5 report menu
..
1 customer list2 supplier list
3 brand list4 min stock list
5 salesreport6 purchasereport
7 customer ace.report8 supplier ace.report
enter choise
ifch=2
>---------- supplier list-~
ifch=4
I~~J enter date ~
V~/ enter date / ~[purch~se listj
8
54
6.settings menu
settings menu1 change pasword
2 insert city3 insert brand
your choise
..<>'
55
Reference
1. Roberto Sezanloysun, "Learn Access", published by SYBEX, 2002.2. Microsoft Office Proffecional 2002 for windows XP help.3. Ahmad Taha "Basics about Visual Basic", published by ALKHATAT, 1999.4. Asst. Prof. Ilham Huseynov lesson notes.5. mr.Ümit İlhan lesson notes6. www.access-programmers.com7. www.google.com
ı,..
56
SCREN SHOOTS
MAİN MENU
..
57
l.RECORDS
..
58
..lt
••
59
2.Stock menu
60
3 .1 purchase menu
..
61
3 .2 sales menu
..
62
4. 1 customer list report menu
ill._~8ME IADRESS ICity ~~:MAiL TIELEFON
69 lEFiT I sdldslsdlsdl I Isparta [email protected] \ O (324) 324 34 2370 lA[VEL !ADRES lfsiarıbul I MAIL@FCOM 'O LI
11 PRINT
4.2 Supplier list reports
63
3 .minimum stock list reports
64
4.4 model list reports
Y/'.l.ZDIR
..
65
4.5 sales reports '
ı,..
66
4.6 purchase reports
..
67
4.6 Customer accouanting reports
68
l
4.7 supplier accouanting reports
18. 02. 2007 _18. 02 2007 ---18.02 2007 DBB 126 1180 ,TELPA ---·· lRTYTR ----·-----~ .... ------·---- ,--·-···---·~
DBB j D<DCSDA ..
18.02 2007TICo2Toô?18.02 2007 ---
$EN MARMARA \SADA18.02.2007
5.settings menu
5 .1 Password change records
New Password
Change User Name •
69
SOURCE CODES
MAIN MENU
MD IForml - 1
Private Sub alim_fatura_Click()Form15.ShowEnd Sub
Private Sub alinısatim _Click ()Forml 7. Shoı,,ıEnd Sub
Private Sub alis_faturasi_Click()
Form12.Show
End Sub
Prıvate Sub cari_Click()Formll. ShowEnd Sub
Private Sub database_ Click ()Form7.ShowEnd Sub
Private Sub carilist_Click()Form24. Shoı,,ıEnd Sub
Private Sul:ı iller_Clicl,()Form21. Shoı,,ıEnd Sub
Private Sub markagiris_Click()Form22.Shm,End sub
Private Sub MDIForm_Load ()MDIForml. Heıght = 10000MDIForml.Width = 12000End Sub
Private Sub minstocks Click ()Form9.ShowEnd Sub
Private sub musteri_kayit_ Click ()
Form2.Show
End Sub
Private sul:ı müstlist_ Click ()Form23.ShowEnd Sub
Private Sub satis_faturasi_ Click ()
Form16. Show
••
End 'Sub
Private Sub satisfaturarap_Click()
Form18.ShowEnd sub
Private Sub satisf aturarapor ları _Clicl, ( IFormlO.ShowEnd Sub
Private sub urun_ekle_Click()Form13.Show
70
Forrnll - 1
Dim kayitdurumuDim TCKirnlikNo As StringDim yeni As String'Dim objwebservices As MSXML2.ServerXMLHTTP
Dim SOAP
Prıvate Sub ComboBoxl_Change()Text9.Text = ComboBoxl.Text
End Sub
Private Sub Cornrnandl_Click ()Adodcl.Recordset.MoveFirst'Commandl.Enabled = False'Command5.Enabled'Conınıand6.Enabled'Cornrnand7.EnabledEnd sub
FalseTrueTrue
Private Sub CommandlO_Click()kayit = True
If Len(MaskEdBox2 .Text) < 17 Oı: Len(Trirn(Text4.Text)) < 3 Oı: Len(Tri.nı(Text8.Text)) < 3 Oı: Len(Trirn(Text
3.Text)) < 3 Or Len(Trim(Text9.Text)) < 3 ThenMsgBox "Eksik Bilgi Giri',i" & Len (1'1askEdBox2.Text), , "UYARI"
Textl.SetFocuskayit = FalseEnd If
Coıranand4.Enabled True
If kayit = True ThenAdodcl.Recordset.UpdateCommandl.Enabled = TrueCommand5.EnabledCommand6.EnabledCommand7.Enabled
TrueTrueTrue
Commandll.Enabled = FalseCommandl.Enabled True
Conınıand8.Enabled = TrueCorrmand9.Enabled= TrueConm,andlO,Enabled = FalseFrarre2.Enabled= FalseCornrnand2.Enabled = TrueEnd If
End Sub
Private Sub Conunandl1_Click ()•If yeni = "aktif" ThenAdodcl.Recordset.Fields(l)Adodc1.Recordset.Fields(2) = "O" ..Adodc1.Recordset.Fields(3)Adodc1.Recoı:dset.Fields(4)Adodc::,l,.Recordset.Fields(S)
"0"''O"non
'Adodcl.Recordset.CancelUpdate'Adodcl.Recoı:dset.Update'Adode 1. Refresh'Adodcl.Recoı:dset.MoveLast
1 DataGr idl. DataSource = rr"
71
Forrnll - 2
Adodcl.Refresh
For i = 1 To Adodcl.Recordset.RecordCountIf Adodcl.Recordset.Fields(ll =•••Then
Adodcl.Recordset.Delete
End IfAdodcl.Recordset.MoveNext
Next iAdodcl.Refresh'Adodcl.Recordset.Close'Adodcl.Recordset.Open'Adodcl.Recordset.MoveFirst
ElseAdodcl.Recordset.CancelUpdate
End If'Adodc 1. Refresh
yeni "p as ı.f "
kayitdururnu = OCornrnandl.EnabledCormoand5.EnabledCornrnand6.EnabledCornrnand7.EnabledCornrnandZ.Enabled
TrueTrueTrueTrueTrue
Cornrnandll.Enabled= FalseCormoand4.Enabled = TrueCornrnand8.Enabled= TrueCornrnand9.Enabled = TrueCornrnandlO.Enabled= FalseFrame2.Enabled = False
End Sub
Private Sub Cornrnand13 Click ()If Adodcl.Recordset.RecordCountMsgBox "Silinecek Kayıt Yok'"Exit SubEnd Ifcevap = MsgBox ( "Tüm Kayıtlar Silınecek Erninrnissiniz'v, vbYesl•loCancel, "UY.'.RI' ı ı ")
O Then
'MsgBox cevapIf cevap= 6 Then
For f = 1 To Adodcl.Recordset.RecordCountAdodcl.Recordset.DeleteAdodcl.Recordset.MoveNextNext fMsgBox "Tüm Kayıtlar Ba,şarılı Bir Şekilde Silındi", , "Info"Coımoandl.Enabled = False "'
••
Coımoand5.EnabledCorırroand6.EnabledCornrnand7.EnabledCornrnand8 . EnabledCormoand9.Enabled
FalseFalseFalseFalseFalse
End IfEnd Sub
Private Sub Corım,and2_Click ()
72
•
Formll - 3
MD IForml. kay it. Enabled = TrueMDIForml. stok. Enabled = TrueMD IForml. fatura. Enabled = TrueMD IForml. rapor. Enabled = True
Unload Me
End Sub
Private Sub Coırmıand3_ Click ( I
Dim Tablo As New TableDefSet dosya = Create Database ( "c : \adil.mdb", dbLangTurkishl
lüth Tablo.Uaıne = "c ar L".Fields.Append .CreateField("kayitno", dbText, 51.Fields.Append .CreateFıeld("adi", dbText, 151. Fields .Append . CreateF ield ( "soyadi", dbText, 201. Fields .Append . CreateField ("adresi", dbText, 50). Fields. Append . CreateF ield ( "telefonno", db Text, 12). Fields .Append . CreateF .i.eLd ( "vergino", dbText, 15). Fields. Append . CreateFıeld ( "vergidairesi", dbText, 151. Fields .Append . CreateF .i.eLd( "kizliksoyadı", dbText, 15)End Withdosya.TableDefs.Append TabloSet Tablo = Nothinglüth Tablo.Name= "stok". Fields .Append . CreateField ( "stokno", dbText, 51.Fıelds.Append .CreateField("stokadi", dbTextl. Fields. Append . Czeatıe F ield ( "stokadedi", db'l'e xt )End Withdosya.TableDefs.Append TabloSet dosya= NothingSet Tablo= Nothing
'Bul = Dir
End Sub
Private Sub Command4_Click(ICoırmıandl. Enabled = FalseCommand5.EnabledCoırmıand6.EnabledCommand7.Enabled
FalseFalseFalse
Command2.Enabled = FalseCommandl1. Enabled = TrueFranıe2. Enabled = TrueConunand4.Enabled = FalseComrııandlO.Enabled = TrueAdode 1. Rec:ordset. Addl!ewText4.SetFoc:usyeni. = "e ktı.i.f "Conuoand8.Enabled = FalseConuııand9.Enabled = FalseCoırmıandl1. Enabled = TrueGecd..ci = "0 (###) Ii## #Ii ##"MaskEdBox2.MaskMaskEdBox2.Te>:tMaskEdBox2.Mask Gecici
End Sub
Pı:ivate Sub Conuııand5_Click ( I
qi'
73
•
Formll - 4
If Mot Ado de 1. Recordset. BOF Then
Adodcl.Recordset.MovePrevious
Command6. Enabled = True
Command7.Enabled
Else
Coıınnand5. Enabled
True
False
Commandl.Enabled = False
End IfIf Adodcl. Recordset. BOF = True ThenAdodcl.Recordset.MoveFirst
End If
End Sub
Private Sub Command5_LostFocus()
'Labell.Caption
End Sub
Private Sub Command6_Click()If Adodcl.Recordset.EOF Then
1MsgBox p'son kayıttasınız''Command6.Enabled = FalseCommand7.EnabledElseCommand5.Enabled
False
True
Cornmandl.Enabled = TrueAdodcl.Recordset.MoveMext
End If'MsgBox Len(MaskEdBox2.Text)If Adodcl.Recordset.EOF = True ThenAdodcl.Recordset.MoveLast
End If
End Sub
Private Sub Cornrnand7_Click()Adodcl.Recordset.MoveLast'Cornrnandl. Enabled'Command5.Enabled'Command6.Enabled'Command7.Enabled
TrueTrueFalseFalse
End Sub
Private Sub Comrnand8_Click()cevap = MsgBox( "Ar e you sure delete record?", 4, "Warning!'')If cevap= 6 ThenAdodcl.Recordset.DeleteAdodcl.Recordset.UpdateMsgBox "Kayıt Silindi"Adodcl.Recordset.MoveFirst
End If
End Sub
Private Sub Comrnand9 Click ().. -'Adodcl.Recordset.Cornrnand2.Enabled= Falsekayitdururnu = 1Commandl.Enabled = FalseCommand5.EnabledCorrınıand6. EnabledCommand7.Enabled
FalseFalseFalse
..
74
'mdiforml.settingsFor i = 1 To Adodc2.Recordset.RecordCountCorrıboBoxl.AdditemAdodc2.Recordset.Fields(l)AdodcZ.Recordset.MoveNextNext i
Formll - 5
commandll. Enabled = TrueCommand4. Enabled = FalseCommand8.Enabled = FalseCornrnand9.Enabled = FalseCommandlO. Enabled = TrueFrameZ.Enabled = TrueEnd subPrivate Sub il I)
End Sub
Private Sub Forrn_Load()'kayıtdurumu = O'FrameZ.Enabled = False'Forrnll.Height = 9000'Forrnll.Width = 11000MD IFornıl. kayit. Enabled = FalseMD IForrnl. stok.Enabled = FalseMD IForrnl. fatura.Enabled = FalseMD IForrnl.rapor.Enabled = False
If Adodcl.Recordset.RecordCountCornrnand8 . Enabled = Falsecommand9.EnabledCon~and7.EnabledConımand6.EnabledCornrnand5.EnabledCommandl.Enabled
FalseFalseFalseFalseFalse
End If
Forrnll.Height = 8000Forrnll.Width = 11000Forrn11.Left = 5000Forrnll.Top = 2000
End Stıb
O Then
Private Stıb Forrn_Unload(Cancel As Integer)'Adodcl.Recordset.CancelUpdate'Adodcl.Refresh'kayitdururnu = O'Cornrnandl.Enabled'ConooandS.Enabled'Command6.Enabled'Conımand7.Enabled'~ommand2 . Enabled
TrueTrueTrueTrueTrue
'Conooandl1. Enabled = False'command4.Enabled = True'ConuoandB . Enabled = True'Comma,,pd9.Enabled = True'ComrnandlO.Enabled = False'Frame2.Enabled = False
End sub
..ı,
75
Formll - 6
Private Sub Textl_KeyPı::ess (KeyAscii As Integer:)KeyAscii = Ase (UCase (Chı:: (KeyAsciil 11End Sub
Pı::ivate Sub Text4_KeyPı::ess(KeyAscii As Integer:)
KeyAscii = Ase (UCase (Chr (KeyAscii) I I'If KeyAscii < 65 Or: KeyAscii > 90 Then KeyAscii = O
End Sub
Pr: ivate Sub Text5 _ Change ()If Command9.Enabled = Tı::ue And Command8.Enabled And Comnıand4.Enabled Then
If Text5. Text = "" Then Exit StıbAdodcl.Recoı::dset.MoveFiı::stAdodcl.Recoı::dset.Find ("fiı::rnaadi like'"&. Trim(Text5) &. "%"')If Adodcl.Recocdset.EOF = True Then Adodcl.Recordset.MoveFirst
End If
End Sub
Private Sub Text8_Change()KeyAscii = Asc(UCase(Chr(KeyAscii) ))'If KeyAscii < 65 Or KeyAsciı > 90 Then KeyAscii = O
End Sub
(\.
76
•
Forrn12 - 1
Dinı 51 As IntegerDinı deg As StringDinı aktifsatir As Byte
Private Sub alttoplarnlar( IIf 51 > O Then
Text 13. Text = OText14.Text = OText15.Text = OFort= 1 To 51kdvtoplarn = Int ( kdvtoplarn) + Int (MSFlexGridl. TextMatrix ( t, 4) IText13. Text = Int ( Text13 . Text I + M5FlexGridl. TextMatrix ( t, 2) * M5FlexGridl. TextMatrix ( t, 3) 'ara toplamText 14. Te,:tText15.TextText16. Text
(Text13.Text * (kdvtoplarn I t) I I 100Int(Text15.Text) + MSFlexGridl.TextMatrix(t, 5)Yaziyla (Te:<t15.Te:<t)
!!ext tEnd If
End Sub
Prıvate Sub Combo1_Click ( I'MsgBox Adodc1.Recordset.Fields(2)
Adodcl.Recordset.MoveFirstFor i = O To Adodcl.Recordset.RecordCount - 1'MsgBox Adodc1.Recordset.Fields(2)If Trim (Cornbol.Text) = Adodc l . Recordset.Fields (2) ThenIf Not IsNull(Adodcl.Recordset.Fields(O)) Then Text2.TextIf Not IsNull(Adodc1.Recordset.Fields(4)) Then Textl.TextIf Not IsNull(Adodc1.Recordset.Fields(3)) Then Text3.TextIf Not IsNull(Adodc1.Recordset.Fields(6) I Then Text4.Text
Adodcl.Recordset.Fıelds(O)Adodcl.Recordset.Fields(4)Adodcl.Recordset.Fields(3)Adodcl.Recordset.Fields(6)
If Not IsNull(Adodcl.Recordset.Fields(12)) Then Text5.Text = Adodc1.Recordset.Fields(12)If Not IsNull(Adodcl.Recordset.Fıelds(13)) Then Text6.Text = Adodc1.Recordset.Fields(13)
Exit SubEnd IfAdodcl.Recordset.MoveNextNext iEnd Sub
Rrivate Sub Combo2_Change()1MsgEox "aktif oldu"'MsgBox listeyiyenileIf lısteyiyenile = 1 Then
1MsgBox "işlemi yacapacak"listeyiyenile = Oco7ooo2.ClearAdodc3.Recordset.MoveFirstFor X = O To Adodc3.Recordset.RecordCount - 1
Combo2.AddItem Adodc3.Recordset. Fields ( 1)Adodc3.Recordset.MoveNext
Mext XEnd IfEnd Sub
"
Private Sub Cornbo2_Click ()
77
Forn\11 - 3
MD IForml. kay it. Enabled = TrueMD IForml. stok. Enabled = TrueMD IForml. fatura. Enabled = TrueMD IForml. rapor. Enabled = True
Unload Me
End sub
Private Sul) Command3 _ Click ()
Dim Tablo As New TableDefSet dosya = CreateDatabase ( "c : \adil.melli", clbLangTurkish)
With Tablo. Naırıe = "c ar ı,". Fields .Append . CreateField ( "kayitno", clbTe:<t, 5).Fields.Append .CreateFıeld("adi", dbText, 15). Fıelds. Append . CreateF ield ( "soyadi", clbTe:<t, 20). Fields. Append . CreateF .ı.e Ld("adresi", dbTe:<t, 50). Fields. Append . CreateF ield ( "telefonno", db'I'e xt , 12). Fields. Append . CreateF ield ( "vergino", dbText, 1.5). Fields. Append . CreateF ield ( "vergidairesi", dl:ıTe:<t, 1.5). Fields ..>.ppend . CreateFıeld ( "kizliksoyadi", clbTe:<t, 15)
End Withdosya.TableDefs.Append TabloSet Tablo = NothingWith Tablo
. Name = "e tıok"
. Fields .Append . CreateF ield ( "stokno", dbTe:<t, 5). Fields. Append . CreateF ield ( "stokadi", db'I'e xt ). Fields. Append . CreateField ( "stokadedi", dbTe:<t)
End \üthdosya.TableDefs.Append TabloSet dosya= NothingSet Tablo = Nothing
'Bul= Dir
End 5@
Private Sw Command'!_Click ()Cornrnandl.Enabled = FalseCommand5.EnabledCornrnand6.EnabledCommand7.Enabled
FalseFalseFalse
Coımnand2.Enabled = FalseCornrnandll.Enabled = TrueFrame2. Enabled = TrueCoımoand4.Enabled = FalseCommandlO. Enabled = TrueAdode: 1. Recordset. Addl!ewText4.SetFocusyeni = "aktifrrCoımnand8. Enabled = FalseCornrnand9.Enabled = FalseCoımnandll. Enabled = TrueGecici = "O (###) ### ## ##"
MaskEdBo>:2.MaskMaskEdBo:<2.Text..MaskEdBo:<2.Mask Ge cici
End S@
Private Sw Cornrnemd5_Clic:k ( I
,,
78
Form11 - 4
If Not .O.dodc1.Recordset.B0F Then
.O.dodcl.Recordset.MovePreviousCommand6.Enabled = TrueCommand7.Enabled
ElseConmıand5. EnabledCommandl.Enabled
End IfIf .O.dodc1.Recordset.B0F = True Then
.O.dodcl.Recordset.MoveFirst
End If
True
FalseFalse
End Sub
Prıvate sub Coımaand5_LostFocus ()
'Lab ell. Caption
End sub
Private sub Command6_Click()If .O.dodcl.Recordset.EOF Then
1MsgBox "son kayıttasınız"Command6.Enabled = FalseComrnand7.Enabled = FalseElseComrnand5.Enabled True
Commandl.Enabled = True.O.dodcl.Recordset.MoveNextEnd If'~~sgBox Len (MaskEdBoxZ. Text)If .O.dodcl.Recordset.EOF= True Then.O.dodcl.Recordset.MoveLastEnd If
End Sub
Private Sub Conuoand7_Click ()Adode 1. Recordset.MoveLast'Conmıandl.Enabled'Cornrnand5.Enabled'Command6.Enabled'Command7.Enabled
TrueTrueFalseFalse
End Stıb
Private Sub coımııand8_Click(Icevap= MsgBox(".O.re you sure delete record?", 4, "Warningl")
If cevap= 6 Then.O.dodcl.Recordset.Delete.O.dodcl.Recordset.UpdateMsgBox "Kayıt Silindi".O.dodcl.Recordset.MoveFirstEnd If
End sub
Private Sub Comrnand9_Cliclc()'.O.dodcl.Recordset.Cornma10d2 . Enabled = Falsekayitdurun,u = 1Coımııandl.Enabled False
Command5.EnabledCoımııand6.EnabledCornrnand7.Enabled
FalseFalseFalse
•
79
Formll - 5
Commandll.Enabled = TrueComnıand4. Enabled = FalseCommand8.Enabled = FalseCornmand9.Enabled = FalseComrnandlO.Enabled = TrueFrarne2. Enabled = TrueEnd SubPrivate Sub il()
End Sub
Private Sub Form_ Load I)'kayitdurumu = O'Frame2 . Enabled = False'Forrnll.Height = 9000'Formll.Width = 11000
MDIForrnl. kay it. Enabled = FalseMDIForml.stok.Enabled = FalseMDIForrnl. fatura. Enabled = FalseMDIForrnl.rapor.Enabled = False
'rndiforml.settingsFor i = 1 To Adodc2.Recordset.RecordCountCornboBoxl.Additern Adodc2.Recordset.Fields(l)Adodc2.Recordset.MoveNextNext iIf Adodcl.Recordset.RecordCountCommand8.Enabled = FalseComnıand9. EnabledCornrnand7.EnabledCommand6.EnabledConunand5. EnabledConmıandl. Enabled
FalseFalseFalseFalseFalse
End If
Formll.Height = 8000Formll.Width = 11000Forrnll.Left = 5000Formll.Top = 2000
End Sub
O Then
Private Sub Forrn_Unload(Cancel As Integer)'Adodcl.Recordset.CancelUpdate'Adodcl.Refresh'kayitdurumu = O'Cornrnandl. Enabled True'Command5. Enabled'CoımandQ__, Enabled'Coımand7. Enabled'Command2.Enabled
TrueTrueTrueTrue
'Coımandl 1. Enabled = False'Command4. Enabled = True'Cornrnand8.Enabled = True'Command9. Enabled = True'CornrnandlO.Enabled = False'Frame2.Enabled = False
End Sub
80
•
Forrn13 - 1
Dim kayitdurunıuDim TCKimlikNo As StringDim yeni As String'Dim objwebservıces As MSXML2.ServerXMLHTTP
Private Sub CornboBoxl_Click()'Adodcl.Recordset.Fıelds(7) = CornboBoxl.Value
Text6. Text = CornboBo:<1. Value
End Sub
Private sub Cornroandl_Clıck()Adodcl.Recordset.MoveFirstCornrnandl.Enabled = FalseCornrnand5.EnabledConırnand6. EnabledCornrnand7.Enabled
End Sub
FalseTrueTrue
Private Sub Coınrnandlü_Click()hata = ,,,,If Len(Trim(Text4.Text)\ < 1 ThenMsgBox "Eksik Bilgi o.ı.r ı.ş ı.". , "UYARiu
Textl.SetFocuskayit = False
Else
If Len ( Text5) O Then hata "Stok Miktarı Yanlış Kontrol Ediniz .. "
If Len(Textl) > O Then If Not IsNurneı:ic(Textl) Then hata= "KDVOranı Yanlış Kontrol Ediniz .. "If Len (Text5) > O Then If Not IsNı.U'neric (Text5) Then hata = "Stok Miktarı Yanlış Kontrol Ediniz .. "
If Len(Text3) < 11 Then'If Not IsNurneı:ic(Text3) Then hata= ";.liş Fiyatı Yanlış Kontrol Ediniz .. "
hata = "Aliş Fiyatı Yanlış Kontrol Ediniz .. "
End If
If Len ( Text8) > O Then If Not IsNurneı: Le I Text8) Or Mid I Text8. Te:<t, 1, 1)
Miktarı Yanlış Kontrol Ediniz .. "
If Len(Text9) < 9 Then'If Not IsNurneı: Le ( Text9) Then hata = 1hata = "Satış Fiyatı Yanlış Kontrol Ediniz .. "
End If
If Len(hata) > O ThenMsgBox "Hatalı Bilgi Gir i:şi (" s. hata &. "ı '', , "Uyarı!''
hata = OExit SubEnd If
End If
kayit = TrueIf Len(Trim(Text4.Te:<t)) < 1 ThenTextl.SetFocuskayit = False
..
End If
If kayit = True ThenAdodcl.Recoı:dset.UpdateAdodcl.Recordset.Requery
81
rr_rr Then hata
•
"Minimum Stok
Fornıl3 - 2
Adodcl. Recordset .:MoveLast
'Adodcl.Recordset.Open
conmıandl. EnabledComrııand5.EnabledComrııand6. Enabled
TrueTrueTrue
[email protected] = TrueComrııandll.Enabled = FalseComrııandl.EnabledComrııand4.Enabledcomrııand8.Enabled
TrueTrueTrue
Comrııand9.Enabled = TrueComrııandlO.Enabled = FalseFrameZ.Enabled = FalseComrııand2.Enabled = Tnıe'Adodcl.Recordset.MoveFirst
End If
End sub
Private Sub Con@andll_Click()If yeni= "aktif" Theni'.dodcl. Recordset. Fields ( 1)Adodcl.Recordset.Fields(Z)Adodcl.Recordset.Fields(3).>.dodcl.Recordset. Fields ( 4)Adodcl,Recordset.Fields(5)
"* ,,rron
''0''ıro•r"0"
'Adodcl.Recordset.CancelUpdate'Adodcl.Recordset.Update'Adodcl.Refresh'Adodcl.Recordset.MoveLast'DataGridl.DataSourceAdodcl. Refresh
For i = 1 To Adodcl.Recordset.RecordCountIf Adodcl.Recordset.Fields(l) ="*"ThenAdodcl.Recordset.DeleteEnd IfAdodcl.Recordset.MoveNext
Next iAdodcl.Refresh'Adodcl.Recordset.Close'Adodcl.Recordset.Open'Adodcl.Recordset.MoveFirst
ElseAdodcl.Recordset.CancelUpdate
End If'.>.dodcl.Refresh
yeni = "pasif"Comrııandl.EnabledCommand5. [email protected]ı:ıand7.Enabled
••TrueTrueTrueTrue
lt •Coııımand2.Enabled = TrueComrııandll.Enabled = FalseCornmand4.Enabled = Truecornmand8.Enabled = True
82
Form13 - 3
Cornmand9. Enabled = TrueCorrmandlO.Enabled = FalseFrarre2.Enabled = False
End Sub
Private Sub Cornmand2_Click()MD IForml. kay it. Enabled = TrueMD IForml. stok. Enabled = TrueMD IForml. fatura. Enabled = TrueMD IForml. rapor. Enabled = True
Unload Me
End Sub
Private Sub Cornmand3_Click()
Dim Tablo As He,, TableDefSet dosya = Create Database ( "c : \adil.rndb", dbLangTurkish)
With Tablo.?ıJanıe = "c a r i,". Fields.Append . CreateFLeLd ( "kayitno", dkı'I'ex t; , 5). Fields.Append . CreateField ("adi", dbTe:<t, 15).Fields.Append .CreateField("soyadi", db'I'ext , 201.Fields.Append .CreateField("adresi", dbTe:<t, 501. Fields.Append . CreateField ( "telefonno", db Text, 121. Fields.Append . CreateField ( "vergino", db I'e x t , 15). Fields ..".ppend . CreateField ( "vergidairesi", dbText, 15).Fields.Append .CreateField("kizliksoyadi", dbTe:<t, 15)
End eJithdosya.TableDefs.Append TabloSet Tablo = NothingWith Tablo.Na.rue= rrstokrr.Fields.Append .CreateField("stokno", dbText, 5).Fields.Append .CreateField("stokadi", dbTe:<t).Fields.Append .CreateField("stokadedi", dbText)
End Withdosya.TableDefs.Append TabloSet dosya= NothingSet Tablo= Nothing
'Bul= Dir
End Sub
Private Sub Command4_Click ()
Command2.Enabled = FalseFrarre2.Enabled = TrueCornmand4.Enabled= FalseCornmandlO.Enabled = TrueAdodcl.Recordset.Addl!ew
1Textl.Te:<t = n n1 Text4. Text = "rı
Text4.SetFocusy..eni = "aktifrrCornmand8.Enabled = FalseCornmand9.Enabled= FalseComrnandll.Enabled = True'Gecici = MaskEdBox2.Mask'MaskEdBox2 . Mask = ""
83
•
Private sub Cormııand8_ clıck ()cevap = MsgBox ( "Are you sure delete reco1§d?", 4, "Warning ı ")
If cevap= 6 ThenAdodc1.Recordset.DeleteAdodc1.Rec:ordset.Update
Forrn13 - 4
':MaskEdBox2 .Text'MaskEdBox2.Mask Gecici
End Sub
Private Sı.ıb Command5_Click()
If Mot Adode:1. Rec:ordset. BOF ThenAdodc1.Recoı:dset.MovePreviousCommand6.Enabled = TrueCorrımand7.Enabled = TrueElsecommand5.Enabled False
FalseCommand1.EnabledEnd IfIf Adodc:1.Rec:ordset.BOF = True ThenAdodc1.Rec:ordset.MoveFirst
End If
End sub
Private sub Command5_LostFoc:us()'Label1. Caption
End sub
Private Sı.ıb Cormııand6_Clic:k ()If ~.dodc1.Rec:ordset.EOF Then
1MsgBox ''son kayıttasınızrrCommand6.Enabled = FalseCommand7.Enabled = False
ElseCornrnand5.Enabled True
Command1.Enabled = TrueAdodc1.Rec:ordset.MoveMext
End If'MsgBox Len (MaskEdBox2. Text)If Adodc:1.Rec:ordset.EOF = True ThenAdodc1.Recordset.MoveLastEnd If
End sub
Private sub corıu@nd7_Click ()Adodc1. Recordset. :MoveLastConımand1.Enabledcormııand5. EnabledCoırımand6.EnabledComrnand7.Enabled
TrueTrueFalseFalse
End sub
MsgBox "Kayıt Silin.di", , "Info"Ad1ıdc1. Record,ıet. :MoveFirBt
End If
End Sub
Private Sı.ıb Corıunand9_Clic:k()'Adodc1.Recordset.
<ii
84
•
Forrn13 - 5
Conınıand2.Enabledkay ı.t dur umu = 1Cornrnandl.EnabledCornnıand5. EnabledConınıand6.EnabledCornrnand7.Enabled
False
FalseFalseFalseFalse
Conınıandll.Enabled = TrueConınıand4.Enabled = FalseComrnand8. Enabled = FalseConınıand9.Enabled = FalseComrnandlO.Enabled = TrueFrame2.Enabled = TrueEnd SubPrivate Sub il I I
End Sub
Prıvate Sub Form_Load()'MsgBox eklee
MDIForrnl.kayit.Enabled = FalseMD IForrnl. stok. Enabled = FalseMDIForml. fatura. Enabled = FalseMD IFoı:rnl. rapor. Enabled = False
'mdiforml.settings
'Frame 1. Enabled = False'Forrn2.StartUpPosition = 1Forrn13.Height = 10000Forrn13 . Width = 11000Foı:m13.Left = 4000Forrn13. Top = 250
kayitdunu~u = OFı:ame2.Enabled = False'Form13.Height = 9000'Form13.Wıdth = 11000
Adodc2. ConnectionStr ing = "Provider=Micı:osoft. Jet. OLE DB. 4. O; Data Source=c: \adil_pı:oje\data .mdo : Persist
Security Info=False1' & ,,,,Adodc2.ConınıandType = adCmdTableAdodc2.RecordSource = "marka"Set DataGridl.DataSource = Adodc2Coml:ıoBoxl.DataField = "marka"Set Coml:ıoBoxl.DataSource = Adodc2
'Coml:ıoBoxl.Refresh.ı,.dodc2. RefreshDo While !Jot Adodc2.Recordset.EOFComl:ıoBox 1. Add Item Adodc2 . Recordset ( 1)Adodc2. Recordset .Move!Jext
Loop
If eklee = 1 Then'eklee = OI MsgBox ıı .ı ş Lem"
Conınıand2.Enabled = FalseFrame2. Enabled = TrueCo~and4.Enabled = FalseCommandlO. Enabled = True.ı..dodcl. Recoı:dset .Add!Jew
I Textl. Text = rrrr1Text4.Text = rrrr
1 Text4. SetFocus 1 1 I I I I I I I j I JI I I I I I I I
85
End Sı.ıb
Form13 - 7
End stıb
Private Sub Text8_Change ()Key.,.scii = Ase (UCas,.e(Chr (KeyAscii)))
' If KeyAscii < 65 Or KeyA:c,cii > 90 Then Key.'.scii = O
End Stıb
Pr ıvate Sı.ıb Text9 _KeyPress ( KeyAse ii As Integer)If KeyAscii < 48 Or KeyAscii > 57 Then
If Key.<.scii <> 44 ThenKey.'.scii = O
End IfEnd If
..
86
Form16 - 1
Dinı Sl As IntegerDinı deg As StringDinı odeme As StringDinı aktifsatir As BytePrivate Sub alttoplamlar()
If Sl > O Then
Text 13. Text = OText14.Text = OText15.Text = O
For t = 1 To s ıkdvtoplam = Int(kdvtoplam) + Int(MSFlexGridl.TextMatrıx(t, 4) IText 13. Text = Int I Text 13 . Text I + MSFlexGr idl. Te:<tMatr.ı,x ( t, 21 • MSFlexGr ıdl. TextMatr ix ( t, 3 I 'ara topla
mText14.TextText15.TextTe:<t16.Text
(Text13.Text * (kdvtoplam It) I I 100 'kdv(Int(Text15.Text) + MSFlexGridl.TextMatrix(t, 5) IYazıyla(Text15.Text)
Next t'Text15.TextEnd If
Text15.Text - Int(Text5.Text)
End Sub
Private Sub Coırıbo 1_Click ( I'MsgBox Adode 1. Recordset.Fields ( 2)Adodcl.Recordset.MoveFirstFor i = O To Adodcl.Recordset.RecordCount - 1'MsgBox Adode 1. Recordset.Fields ( 2)If Trinı(Conıbol.Text) = Adodcl.Recordset.Fields(2) ThenIf Not IsNull(Adodcl.Recordset.Fields(DII Then Text2.TextIf Not IsNull (JI.do de 1. Recordset.Fields ( 411 Then Text 1. TextIf Not IsNull(Adodcl.Recordset.Fields(3)) Then Te>:t3.Text
Adodcl.Recordset.Fields(O)Ado del. Recordset.Fields ( 4)Adodcl.Recordset.Fields(3)
If !lot IsNull (Adodcl.Recordset.Fields ( 61) Then Text4. Text = Adodcl. Recordset.Fields ( 61'If Not IsNull(Adodcl.Recordset.Fields(12) I Then Text5.Text = Adodcl.Recordset.Fields(121
' If Not Is Null (Adode 1. Recordset.Fields ( 13 I I Then Text 6. Text = Ado de 1. Recordset.Fields I 13)
Exit SubEnd IfAdodcl.Recordset.MoveNextNext i
End Sub
Private sub Conıbo2_Click()'MsgBox Adodcl.Recordset.Fields(ZIAdodc3.Recordset.MoveFirstFor i = O To Adodc3.Recordset.RecordCount - 1'MsgBox Adodc3.Recordset.Fields(l)If Trinı(Conıbo2.Textl = Adodc3.Recordset.Fields(l) Then
Text9.Text = 1TextlO.Text = 1Text8.Text = 1If Not IsNull(Adodc:3.Recordset.Fields(61I Then Text8.Text = Adodc3.Recordset.Fields(51
IsNull(Adodc3.Recordset.Fields(411~Then TextlO.Text = Adodc3.Recordset.Fields(41IsNull(Adodc3.Recordset.Fields(2)) Then Text17.Text = Adodc3.Recordset.Fields(21 ' stockIsNull(Adodc3.Recordset.Fields(3)) Then Text18.Text = Adodc3.Recordset.Fields(31 'min stock
If NotIf NotIf Not'If Not'If Not'If_ Not
IsNull(Adodc3.Recordset.Fields(31 I Then Text3.TextAdodcl.Recordset.Fields(31
IsNull(Adodc3.Recordset.Fields(6)1 Then Text4.Text = Adodcl.Recordset.Fields(61IsNull (Adodd . Recordset.Fields ( 12) ) Then Text5. Text =.ı,Adods1. Recordset.F ie.J:ds ( 12 I
'If Not IsNull(Adodc3.Recordset.Fields(13I I Then Text6.Text = Adodcl.Recordset.Fields(13)
If Conıbo2 .ListIndex >= O Then Command7. Enabled = True
Frarnel.Visible = TrueExit SubEnd If
87
Form16 - 2
Adodc3.Recordset.MoveHext
Next i
End Sub
Private sub conmıandll_Click()MSF lexGridl. TextMatrix (2, 1)MSFlexGridl.TextMatrix(2, 2)MSFlexGridl.TextMatrix(2, 3)MSFlexGridl.TextMatrix(2, 4)MSF lexGridl. Textl"latrix (2, 5)
End sub
MSF lexGridl. TextMatrix (3, lll"lSF lex Gridl. TextMatr ix ( 3, 2 lMSFlexGrid1.TextMatrix(3, 3)MSFlexGridl.TextMatrix(3, 4)MSF lexGridl. TextMatrix (3, 5)
Private s,ıb conmıand12_Click ()MD IForml. kay it. Enabled = TrueMD IForml. stok. Enabled = TrueMD IForml. fatura. Enabled = TrueMD IForml. rapor. Enabled = True
Unload Me
End s,ıb
Private Sub Command13_Click()
B = Osayfano = 1ConmıonDialogl. Shot,ıPrinterCornmonDialogl .Action = 6 'bu yazıci penceresini açiyoPrinter. Font. Size = 14 'burda bir font belirliyorumPrinter.Current!= 200 'A4 kagidi 11909 X 16834 ebatinda twip cinsindenPrinter. CurrentX = 8500 'X; Y olarak bir yer belirliyorum
Pr inter. Pr int "Fat No: " ,, Text7. TextPrinter.CurrentY = 500Pı:inter,CurrentX = 8500Printer.Print "Fat.Tarihi: " & DTPickerl.ValuePr inter. Font. Size = 10 'yanina bırde tac ih attirn leziz
Printer.Current!= 1000Printer,CurrentX = 1000 'yeni bir x,y belirledim hemde font u düsürdüm
Pı:ınter.Print Conınol.Text 'firma adıPrinteı:.CurrentY = 1300Printer,CurrentX = 1000Printer.Print Textl.Text 'adresPcinteı:,CurrentY = 1600Printer.CurrentX = 3000Printer.Print Text4.Text 'ilPrinter.Current!= 1900Pr inter. CurrentX = 1200Printer.Print Text5.Text 'v.dairesiPrinter.CurrentY = 1900Printer,CurrentX = 3200Pı:ınter.Print Text6.Text 'v.no
'Printer,CurrentY = 1000'Printer.cuı:rentX = 8000'Printer. Prınt "ADRES"'bütün basllklar 1 yazdlrn simdi listbo:üarlmdaki
'verileri sırayla bunlarin altina siı:alaıoarn lazirn'istersenız listboxlari biı:as çalisin önce'FQF a = O To List2 . Lıstcount - 1 'sayacirn 1 nolu listbox daki veri say isi kadar sayacakH (1300 > (200 • S)) ~ 15000 '™'" 'huhn bu•d• hü H au•g,h yapc,m ,ayfea,n aoffuna geld,yuem yen> b
ir sayfa açicarn çünki.
B = OPrinter.CurrentYPcinter.Curı:entX
155005000
88
Forml6 - 3
Printer.Print ''Sayfa: '1; sayfano
sayfama = sayfano + 1 'bakiniz yeni sayfaya geçmneden sayfa nosunu alltta bi yerle::'= ya=::.:..:::.?= ~..:O=-_luyo ozamnzzzz
Printer.NewPage 'bu komut yeni pencere açiyoPrinter.Font.Size= 14 'yine baslik!ari yazdimPrinter.CurrentY = 200Printer.CurrentX = 300Printer. Print "Yeni Sayfan, TiıtıePrinter.Font.Size= 10Printer.CurrentY = 1000Printer.CurrentX = 1000Printer.Print "111111111111111"Printer.CurrentY = 1000Prınter.CurrentX = 3000Printer.Prınt "222222222222222"Printer.CurrentY = 1000Printer.CurrentX = 5000Printer.Print "333333333333333"Printer.CurrentY = 1000Printer.CurrentX = 6500Printer.Print "44444444444444"Printer.CurrentY = 1000Printer.CurrentX = 8000Printer.Print •55555555555555•
End If
'bakin mühim bunlar for next teki deı_kenı, kullanabilirdil" b yerine ama sayfa sonuna gelince onu sifirliyamazdim b bıraz incelerseniz üst taraftaki if döngüsünde sifirlaniyor yani sayfa sonuna gelince böylece iste oluyo böle ben yaptim oldu1
'Printer.CurrentY = 1290 + (200 * b)''Printer.CurrentX = 1000
Printer.Print ·~~~~~~~~~~~~~~~~~~~~~~~~~~~-
Printer.CurrentYPrinter.CurrentX
satir= 3500?or ro = 1 To MSFlexGridl.Rows - 1MSFlexGridl.Row = roMSFlexGridl.Col = O
1300 + (200 * B)1000
:rinter.CurrentY =satir+ (200 * B):rinter.CurrentX = 1000:rinter.Print MSFlexGridl.Text
MS?lexGridl.Col = 1::::.:..nter.CurrentY=satir+ (200 * B)::::.:..nter.CurrentX= 3000::::.:..nter.Print MSFlexGridl.Text
JE?lexGridl.Col = 2::::.:..nter.CurrentY=satir+ (200 * B):::::.ncer.CurrentX= 6000:;::::.nter.Print MSFlexGridl.Text
11!:?.:.exGridl.Col= 34'=:.n=er.CurrentY=satir+ (200 * B)~===er.CurrentX = 7000==::er.Print MSFlexGridl.Text
-exGridl. Col = 4-~::er.CurrentY =satir+ (200 * B)
.;.:.::e::. Currentx = 8 000=::e::.Print MSFlexGridl.Text
•
~Gridl. Col = 5::e:::.CurrentY =satir+ (200 * B)::e:::.Currentx = 10000
89
Form16 - 4
Printer.Print MSFlexGridl.Text
satir= satir+ 300
Next ro
Printer. Font. Size = 10 'burda bir font belirli yonun
Printer.CurrentY = 7000 + (200 * B) Printer.CurrentX = 9000
Printer.Print "Ara Toplam : " e. Text 13 . TextPrı~ter.CurrentY = 7300 + (200 * B) Printer.CurrentX = 9000
Printer.Print "KDV %18 :" & Text14.TextPrinter.CurrentY = 7600 + (200 * B) Printer.CurrentX = 9000
Prınter.Print "Genel Toplam:" & Textl5.TextPrinter.CurrentY = 7600 + (200 * B) Printer.CurrentX = 1500Printer.Print Text16.Text
'Printer.Print Right(List2.List(a), 5)
'Printer.CurrentY = 1300 + (200 * b)'Printer.CurrentX = 3000'Printer.Prınt List2.List(a)'Printer.CurrentY = 1300 + (200 * b)'Printer.CurrentX = 5000'Printer.Print List3.List(a)'Printer.CurrentY = 1300 + (200 * b)'Printer.CurrentX = 8500'Printer.Print List4.List(a)'Printer.CurrentY = 1300 + (200 * b)'Printer.CurrentX = 8000'Printer.Print List5.List(a)
B = B + 1 'bakıniz burda b yi arttiriyom bölecene 200 saylslna çarpan olan b degiskeni satir satir asaya ınrnemı sagliyo heınde otomatik olarak.'Next
1Printer.Print
'Printeı:.Print
'Printeı:.Print , , "TOPLAM ÜRETİM", Textl; "ADET"Prınter.Cuı:rentY = 15500Pı:inter.CurrentX = 5000Printer.Print ''Sayfa: rr; sayfanoPrinter.EndDoc
End Sub
Private Sub Comınandl4_Clid,()Foı:m2.ShowEnd Sub
Private Sub Cornmand2 Click ( I
sL = sL + 1Setli= List.Listitems.Add(, , Format(Sl, "00"))li. SubItems ( 1) = Coınbo2. Text'Li.Subitems(2) = Text8.Textli.Subitems(2) = Text8.TextLı.. Su!J·Items (3) = Text9.Textli.Subiteıns(4) = TextlO.Textli.Subitems(5) = Textll.Text'List. Index = 1'List. Item
..
90
Forrııl 6 - 5
For i = 1 To Sl
'List. List Items. Count = i
'MsgBox .lı., Sub Items ( 8)l!ext i'Li.Subitems(4) = Format(Val(txtTOTAL.Text), "O.OD")
'lblTotal = Format (Val I lblTotal) + Val ( txtTOTAL I , "O. 00" I'Adodc4.Recordset.MoveFirst'For i = 1 To Adodc4.Recordset.RecordCount
'Adodc4.Recordset.Find ("urunadi=" & Combo2.Text)'If Adodc4.Recordset.Fields(21 = Combo2.Text Then"var = 1'End If'Adodc4.Recordset.Movel!ext'Next i
If Var <> "trv a r r, ThenAdodc4. Recordset .Add!•lewAdodc4.Recordset.Fields(DIAdodc4.Recordset.Fields(l)Adodc4.Recordset.Fields(2)Adodc4.Recordset.Fields(3)Adodc4.Recordset.Fields(41Adodc4.Recordset.Fıelds(5)Adodc4.Recordset.UpdateEnd IfEnd Stıb
SlCombo2.TextText9.TextText8.TextTextlO.TextTextll.Text
Private Sub Command3_Click()'DataGridl.AllowAddllew'DataGridl.Row = 1'DataGridl.Col = 3~nd Sub
?r ivate Sub DataCombo 1_ Change ()"'3gBox "dd"For i = 1 To Adodc3.Recordset.RecordCount:f Adodc3.Recordset.Fields(l) = DataCombol.Text Then
~ext8.Text = Adodc3.Recordset.Fıelds(3):::<it Sub:'::::::i If
?::-.:..,.:::e Sub Coımıand6 Click ()~2xGridl. Rows = MSF lexGridl. Rows - 1~2xGridl. Clear"'r:; Sub
:":" =e; = "L" Then: = aL.::ifsatir
-•Ç = MsgBox ( "Aktif Satır Silinecek. Eminmisiniz? ", vbYesHo,: ~? <> 6 Then Exıt Stıb
=,=x Sl
.:. = sktifsatir To SlC.:.::"1S.bled = True= .:. - 1
=·=:z: "z.ş Lem"-T?::-.:.::1.TextMatrix(i, O) MSFlexGridl.TextMatrix(sss, O)
91
"Uyarır')
lı
Forml 7 - 2
Adodc2.Recordset.MoveFirst
If Combo 1. List Index > O And Adode 1. Recordset. Fields ( 6) = Combo 1. Text ThenIf Adodcl.Recordset.Fields(l) >-= DTPickerl.Value And Adodcl.Recordset.?ields(:) <= ':>T?icker2.Va
lue ThenFor g = 1 To Adodc2.Recocdset.RecocdCount - 1
If Adodc2.Recoı:dset.Fields(l) = Adodcl.Recoı:dset.Fields(O) The:ıMSFlexGı:idl.Rows = MSFlexGı:idl.Rows + 1ı:l = cl + 1'MSFlexGı:idl.TextMatı:ix(O,
MSFlexGcidl.TextMatı:ix(ı:l,MSF lexGı:idl.TextMatrix (ı:l,MSFlexGı:idl.TextMatrıx ( r L,MSFlexGı:idl.TextMatı:ix(cl,MSFlexGı:idl.TextMatrix(ı:l,MSFlexGı:idl.TextMatrix(ı:l,If Adodcl.Recocdset.Fields(ll) = "Nakit" Then
nakitgeneltoplarn= nakitgeneltoplam + Int(Adodc2.Recordset.Fields(8))nakitaı:atoplarn= nakitacatoplaıc + (Adodc2.Recoı:dset.Fields ( 6) * Adodc2. Recoı:clse
O) = Text8.TextO) = ı:l1 I = Adodc2.Recoı:dset.Fields(4)2) = Adodc2.Recoı:dset.Fields(6) 'birim fiyat3) = Adodc2.Recocdset.Fields(5) 'adet4) = Adodc2.Recordset.Fields(7) 'kdv5) = Adodc2.Recoı:dset.Fields(8) 'toplam fiyat
t. Fields (5))'Li. Sub Items ( 2) = Text8 . Text
End IfIf Adodcl.Recoı:dset.Fields(ll) = "K.Kartı" Then
kkgeneltoplarn= kkgeneltoplarn + Int(Adodc2.Recoı:dset.Fields(8))kke r at opLam = kkaı:atoplarn + (Adodc,2.Recoı:dset.Fields ( 6) * Adodc2 . Recoı:dset.F iel
de (5))'Li. Sub Items ( 2) = Texts . Text
End If
End IfAdodc2.Recordset.MoveNext
Next gEnd If
End IfText4.TextText5.TextText3.TextText6.TextText2.TextText7.Text
nakitgeneltoplarnnakitaı:atoplarnkkgeneltoplarnkkar at o p.Lemnakitgeneltoplarn + kkgenelltoplarnnakitaı:atoplarn + kkaı:atoplarn
Adodcl.Recordset.MoveNextNext i
End Stıl:ı
Private Sub Cornnıand3_Click ()gunn = Mid(DTPickerl.Value, 1, 2)ayy = Mid (DTPickeı:l.Value, 4, 2)yıll = Mid(DTPickeı:l.Value, 7, 4)gunnn = Mid(DTPicker2.Value, 1, 2)ayyy = Mid ( DTPickeı:2 . Value, 4, 2)yilll = Mid(DTPicker2.Value, 7, 4)SQL ="select* fı:om fatuı:abilgıleı:iwhere "'MsgBox Checkl.ValueIf Checkl.Value = 1 Then'MsgBo;: SQLSQL = 5QL & " f iı:maadi=
••
•& Combo 1.Text &. " ' and
End IfSQL = SQL & " fattaı:ihi between #" & ayy & "/" s. gunn e: "/" & yill & "II and #" & ayyy & "/" &. gurmn
& ''/'' & y~lll & ''# ,,
Adodcl.Connection5tcing = "Pı:ovider=Microsoft.Jet.OLEDB.4.0;Data Souı:ce=C:\adil_pı:oje\data.mdb;Peı:si
92
?::ı=l8 - 1
?,:ivate Sub Chee kl_ Clic;k ():::ı:oıbol. Enabled = Checkl. Value
:f Checkl.Value = True ThenCo:rıbo 1. Enabled = ture:::lseCo:rıbo 1.Enabled::::::ırl If
False
:C:,c.:.vate Sub Commandl _Click()..L:::ıdel.Recordset.MoveFirst~dc2.Recordset.MoveFirst==:: i = 1 To Adodcl.Recordset.RecordCount
Adodc2.Recordset.MoveFirst
Adodcl.Recordset.Fields(l) = DTPickerl.Value ThenFor g = 1 To Adodc2. Recordset. RecordCount - 1
If Adodc2.Recordset.Fields(l) = Adodcl.Recordset.Fields(O) ThenMSFlexGridl.Rows = MSFlexGridl.Rows + 1r L = r L + 1'MSFlexGridl.TextMatrix(O,
MSFlexGridl.TextMatrix(rl,MSFlexGridl.TextMatrix(rl,MSFlexGridl.TextMatrix(rl,MSF lex Gr idl. TextMatr ix Ir l,MSFlexGridl.TextMatrix(rl,MSF lexGridl. TextMatrix (rl,If Adodcl.Recordset.Fields(ll) = "Nakit" Then
nakitgeneltoplam = nakıtgeneltoplam + Int(Adodc2.Recordset.Fields(8))nakıtaratoplam = nakitaratoplam + (Adodc2.Recordset.Fields(6) * Adodc2.Recordset.Fi
O) = Text8 . TextO) = rl1) = Adodc2.Recordset.Fields(4)2) = Adodc2.Recordset.Fields(6) 'birim fiyat3) = Adodc2.Recordset.Fields(5) 'adet4) = Adodc2.Recordset.Fields(7) 'kdv5) = Adodc2.Recordset.Fields(8) 'toplam fiyat
'Li.Subitems(2) = Text8.TextEnd If
If Adodcl.Recordset.Fields(ll) = "K.Kartı" Then
kkgeneltoplam = kkgeneltoplam + Int(Adodc2.Recordset.Fields(8))
kkaratoplam = kkaratoplam + (Adodc2.Recordset.Fields(6) * Adodc2.Recordset.Fields(5
'Li.Subitems(2) = Text8.TextEnd If
End IfAdodc2.Recordset.MoveNext
Sext g~ :f
nakitgeneltoplamnakitaratoplamkkgeneltoplaıckkaratoplamnakitgeneltoplam + kkgenelltoplarnnakitaratoplam + kkaratoplam
- . :;:e=oı:dset .MoveNext
..
e =,:,: Command2_Click(): . =e=::::dset. MoveF irst- -=~==:,cdset.MoveFirst
- = : ::: Ado de 1. Recordset. RecordCount
93
?onnlS - 2
Adodc2.Recordset.MoveFicst
If Conıbol.ListIndex > O And Adodcl.Recordset.Fields ( 6) = Corııbol. Text ThenIf Adodcl.Recordset.Fields ( 1) >= DTPickerl.Value And Adodcl.Recordset.Fields ( 1) <= DTPiclcer2.Va
-~e Then
-=.?ields (5))
)J
For g = 1 To Adodc2.Recordset.RecordCount - 1If Adodc2.Recordset.Fields(l) = Adodcl.Recordset.Fields(O) Then
MSFlexGeidl.Ro,as = MSFlexGridl. Rot-ıs + 1rl = rl + 1'MSFlexGridl.TextMatrix(O,
MSFlexGridl. TextMatrix ( r 1,MSFlexGridl.TextMatrix(rl,MSFlexGridl.TextMatrix(cl,MSFlexGridl.TextMatrix(rl,MSFlexGridl.TextMatrix(rl,MSFlexGrıdl.TextMatrix(rl,If Adodcl.Recordset.Fields(ll) = "Nakit" The
nakitgeneltoplam = nakitgeneltoplam + Int(Adodc2.Recordset.Fields(S))nakitaratoplam = nakitaratoplam + (Adodc2.Recordset.Fields(6) * Adodc2.Recordse
O) = TextS . TextO) = rl1) = Adodc2.Recordset.Fi.e~(4)2 I = Adodc2.Record.set.?~elds(5) 1b.i..:-.:ı=ı 7.:..va::3) = Adodc2.Recordset.?~lds(5) •ac~~4) = Adodc2.Recordset.F~elds(7) 'kdv5) = Adodc2.Recordset.Fields(8) "t opLam fiya"
'Li.Subitems(2) = TextS.TextEnd IfIf Adodcl.Recordset.Fields ( 11) = "K. Kartı" Then
kkgeneltoplam = kkgeneltoplam + Int(Adodc2.Recordset.Fields(S))kkaratoplam = kkaratoplam + (Adodc2.Recordset.Fields(6) * Adodc2.Recordset.Fiel
'Li. Sub Items ( 2 I = Texts. TextEnd If
End IfAdodc2.Recordset.MoveNext
Next gEnd If
::!nd If::=:c4.Text:-~~5.Text!"=:;3 . TeX t:-~";:5.Text=-~:.'!'ext~~-,.':'ext
nakitgeneltoplamnakitaratoplamkkgeneltoplamkkaratoplamnakitgeneltoplaınnakitaratoplam +
+ kkgenelltoplamkkaratoplaın
----:. Recordset.MoveNext
--~-=:e Sub Corımıand3_Click();-==: = Mid(DTPickerl.Value, 1, 2)•,! = Mid(DTPickerl.Value, 4, 2):--.:..::. = Mid(DTPickerl.Value, 7, 4);---~ = Mid(DTPicker2.Value, 1, 2)t'T:7 = Mid(DTPicker2.Value, 4, 2)
= Mid(DTPicker2.Value, 7, 4)
&. Conıbo1. Text &. " ' and
& "fattarihi bet,aeen #" & ayy &. "/" & gunn & "/" &. yill & "#and#"&. ayyy &. "/" & gunnni. ;.:..lll e. "# rP
,:=:.ConnectionString "Provider=Microsoft.Jet. OLEDB.4. O; Data Source=C:\adil_proje\data.mclh;Persi
94
:-1 = "select * from faturabilgilerisatis t-ıher e "~~=ox Checkl.Value
:=: :::eckl. Value = 1 Then~-~=:ıx SOL
= -SQL & "firrnaacli=
!:>=18 - 3
__ Security Info=False" 6. "; Jet OLEDB: Database PasstJord=mtksoftpı:odb"Adode 1. CorrnoandType = adCrndTextAdodcl.Recoı:dSouı:ce= SQLSet DataGı:idl.DataSouı:ce= AdodclAdodcl.Refı:esh
If Adodcl.Recoı:dset.RecordCount > O Then Adodcl.Recordset.MoveFirstFor i = 1 To Adodcl.Recordset.RecordCount
If Adodcl.Recordset.Fields(ll) = "Nakit" Thennakitgeneltoplarn= Val(nakitgeneltoplam) + Val(Adodcl.Recordset.Fields(4))nakitaratoplam = nakitaı:atoplarn + (Val(Adodcl.Recordset.Fields(21))
'Li. Sub Items ( 2) = Te:-:tB.TextEnd If:t Adodcl.Recordset.Fields(ll) = "K.Kartı" Then
kkgeneltoplarn = kkgeneltoplarn + Int(Adodc2.Recordset.Fields(8))kkaratoplarn = kkaratoplarn + (Adodc2.Recordset.Fields(6) • Adodc2.Recordset.Fields(5))
'Li. Sub Items ( 2) = Te:<t8 . TextEnd IfText4.TextText5.TextText3.Text
nakitgeneltoplanınakitaratoplarnkkgeneltoplarn
Text6.Text = kkaratoplarnText2.Text = nakitgeneltoplarn + kkgenelltoplarnText7.Text = nakitaratoplarn + kkaratoplarnAdodcl.Recordset.MoveNextNext i
Sub
?:c.:.vate Sub Corrnoand4_Click ( I:roı:ml.kayit.Enabled = True
M:>:rorml.stok.Enabled = TrueM:ı:Forml.fatura.Enabled = Tı:ue
:Foı:rnl.ı:apoı:.Enabled= True
ad Me
.:::::rl Sub
?:c~vate Sub Foı:m_Load()~:roı:ml.kayit.Enabled = False
:Forml.stok.Enabled = False~:Foı:ml.fatura.Enabled = FalseM:' :Forml.rapor.Enabled = False
:n:tifoı:ml.settings
?:camel.Enabled= FalseForm2.StartUpPosition
Y==:8.Height = 11000f::=18.Width = 12000?==18.Left = 4000?::=18.Top = 250
r-- i = 1 To Adodc3.Recordset.RecordCountCombol .Additem Adodc3. Recordset.Fields (2)Adodc3.Recordset.MoveNext
:X"; i
~ Sub
95
-=-=~entX = 1600-~-==.:...::.t ''Harne"
2::-===-•:=::entY = satir + (200 * B)-..,...~=-==::entX= 3500
~==T=-=.:...::t "Adr e s "
·,·:::-~- .,:=::entY= satir + (200 * B)-2::.:.== - ==rentX = 6000
.:..:t.=~.==.:..ı:t "İL"
--== . .:=::entY = satir + (200 * B)-",-=. ==rentX = 7000
~=-·:=rentY = satir + (200 * B)~=-==::entX = 10000.:.::::=~. :"!:".:..nt "Te Le f o n "
DataGridl.ApproxCount - 1..:..:.Stesayisi
To listesayısi-~~-~w = roo
ol = Osatir+ (200 * B)1000
= 1satir+ (200 * B)1600
DataGridl.Text
~.Col= 2satir+ (200 * B)3500
l = 3
satir+ (200 * B)6000
DataGridl.Text
= 4satir+ (200 * B)
==rentX = 7000DataGridl.Text
l = 5satir+ (200 * B)10000
DataGridl.Text
= ~:.:;:..r + 300
=-!=:ıt.Size = 9 'burda bir font belirliyorum~...:n:.=.:ı:::::rentY = 7000 + (200 * B)
--==::entX = 9000
96
..•
Form23 - 3
'Printer.Print "Ara Toplam'Printer.Current!= 7300 +'Printer.CurrentX = 9000
: " &: Text13. Text(200 * B)
'Printer.Print "KDV %18 :" & Text14.Text'Printer.Current!= 7600 + (200 • B)'Printer.CurrentX = 9000
'Printer.Print "Genel Top Lern : " &: Text15. Text'Printer.Current!= 7600 + (200 • B)'Printer.CurrentX = 1500'Printer.Print Text16.Text
'Printer.Print Right(List2.List(a), 5)
'Printer.Current!= 1300 + (200 • b)'Printer.CurrentX = 3000'Printer.Print List2.List(a)'Printer.Current!= 1300 + (200 * b)'Printer.CurrentX = 5000'Printer.Print List3.List(a)'Printer.Current!= 1300 + (200 * b)'Printer.CurrentX = 8500'Printer.Prınt List4.List(a)'Printer.Current!= 1300 + (200 * b)'Printer.CurrentX = 8000'Printer.Print List5.List(a)
B = B + 1 ' bakiniz burda b yi arttiriyom bölecene 200 saylslna çarpan olan b degiskeni satır satir asaya inmemi sagliyo hemde otomatik olarak.'Next
'Printer.Print1Printer.Print
'Printer.PrintPrinter.Current!Printer.CurrentX
"TOPLAM ÜRETİM", Textl; " ADET"155005000
Printer.Print ''Sayfa: ''; sayfanoPrinter.EndDoc
=:c.:.vate Sub Coırırnand2_Click():3taGridl.Row = 1:3taGridl.Col = 1~gBox DataGridl.Text.!.=.o. Sub
••
97
~==-?=:.~==.::::.:....::.t. '1ıti.n s t ok"
e~==-==rentY =satir+ (200 * B)':r::..ı=es=.::::crentX = 6250:=::..:::=~.?:::.:....::.t "KDV %"
':=::..ı==.:ı=rentY =satır+ (200 * B)?r:::::==.:ı=rentX = 7250=~=-=.:..:=.:!:..:....nt "'Satış Fiyatı,,
':!:::==-·==rentY = satir + (200 * B)2:c==-==rentX = 8750-----a-.?r=t "Alış Fiyatı"
=~==-·==rentY = satir + (200 * B)·===·==rentX = 9750-"=..:.:...:.=== .?:=:ı::ıt "Marka"
DataGridl.ApproxCount - 1~tesayisi
====O To listesayisi:~~-:low= roo
osatir+ (200 * B)1000
DataGridl.Text
1 = 1satir+ (200 * B)1600
1 = 2satir+ (200 * B)4500
= 3satir+ (200 * B)5500
DataGridl.Text
= 4~-==rentY =satir+ (200 * B)~.::::crentX = 6500~-?-::=ı: DataGridl.Te:<t
= 5::::::crentY =satir+ (200 * B)
~.:::::-rentX = 7500
--===~ DataGridl.Text
>w:wı?:: -'C · ı . : : l = 6~.:,;;::-rentY =satir+ (200 * B)~-==rentX = 9000illı::.ıc=:-===t: DataGr idl. Text
= 7~-===entY = satir + (200 * B)~-~==entX = 10000===c DataGridl.Te>:t
..
98
•
- =.=.:: - 3
·~=~=satir+ 300~-= ::c-.
==:...::.:::=.rant.Size=9 'burda bir font belirliyorum===-=-===.CurrentY= 7000 + (200 * B)==:...::.::e=.Currentx= 9000
:=:...::.::er. Print "Ara Toplam : " & Text13.Text==:...::.:::r.CurrentY= 7300 + (200 * B)==:...::.::er.CurrentX= 9000==:...::.::e=.Pr int "KDV s 18 : " s: Text14.Texti!'=:...::.:::r.CurrentY= 7600 + (200 * B);;=:...::.::er.CurrentX = 9000;;-:::...::.::=.Print "Genel Toplam :" s. Text15.Texti!'=:...::.::er.CurrentY = 7600 + (200 * B)~====.CurrentX = 1500~====.Print Text16.Text
=====.Print Right(ListZ.List(a), 5)
i!'-::::...::.::::::.CurrentY = 13.00 + (200 * b)1-::::...::.:::r.CurrentX= 3000:'-:::...::.:::::.Print Lıst2.List(a):'-:::...::.::er .CurrentY = 1300 + (200 * b)1=:...::.::er.CurrentX= 5000~~.:..:.-=~~-Print List3.List(a)~==-=.::e:::.CurrentY= 1300 + (200 * b)1-::::...::.:::::.CurrentX= 8500T==-=.::=r.P:::int List4.List(a)1-::::...::.::e:::.CurrentY = 1300 + (200 * b).!':::...::.::=r.CurrentX = 80001-::::...::.::e:::.Print List5.List(a)
'bakinız burda b yi arttiriyom bölecene 200 saylslna çarpan olan b degiskeni satir satir asasagliyo hemde otomatik olarak.
, "TOPL.W ÜRETİM,,, Textl; " ADET"155005000
,,; sayfano
99