oea ioaio e oo ao (48146)












oa ooa

a e:

"oea ioaio e oo ao"


ic


c

1. aa oi

1.1 ocaoa aai

1.2 Oc xio ioai

1.3 Oc eo ioai

1.4 oaioa oc aai

1.5 Oc icx eoi a ie

2. ooa exioo a oooo oe

2.1 Oc a oa o c a eo oaiai xix a xix ax

2.2 ooa a oc oa eaiai aoi oa aai

2.3 Cxea exooioo oec ee, eaa, ee a ai eai

3. Ceia oi

3.1 Ici icai ooeoo oe

3.2 Ici ecaai oe

4. Eooi oi

4.1 oaxo ooc ooeoo oaoo o

co

ieaa


c


ao i ioai iia e a o. oo aoo-exioo oec ioai ca ce ie i ie. a ac ioai oo : caa oi cc, i eiac aax i aoeax i aa aao ic. a oo ai ae ao a ai aoa a o, o aaoc ie ice aoe a. Ae a ooa ioai aco caa cao, a oᒺ ioai iac, i oci e eeo.

oa ecoax oei ia ei ooci coe i acoca ioaix aoaoax ioaix cce. i cce aioaiii - i ocx ioaix cce o cax aoaoax ioaix cce, i oᒺ ei a ax. Cooi ae a -o ici o'e. o aee aoaai oo ceiaici ix ax. aa oco e oo iic aaox ic, oaiai, i i cao e eia ioai. oo i eia ioai oa ocoa ioaii cce, oooo caoo x oei a ax. o oo i oi ica eia, oo ioai, o e .

a, aa, a iax o ocoa a eo aooii icc aao ioai o oc, i o aa a o ii, i oco ai oc. A a, ai ax i oe e a eo iic x ax, o x ooa ei ii cac. e o ea ao oo - e eia i ioai. oea oa o, o i ie ii, ic iic oeai, e aaac ioai o ii a oc. a o oca aa aoaai ex oeci a ax iax: ee a eia a oo ioai ai ax, o oio ioai i ai o ex eix, ooa oeai, oaxo a oa a oooo oea.

oca ecoaoo oea a a ax oa oo aaox ic a oaiai. a x oooo oa oa oc o -o ioai, a ia aaao e, a ai oea oa oic ao ie ioai, i a aei.

ioio o oo, aa ea cooo oe oc aao a cooi i oa a co acoca aeee aoaai oo a iax o ocoa a eo aooii.


1. aa oi


1.1 ocaoa aai


Cac ca oe aoaoao oo ioai a iax o ocoa a eo aooii oa xaaea a, o ocio oac.

Cae oo o ieo co a oa o, eaic coo oei. Ocoo eo aoo cooo oe ooa aoaoao cce ocoa a eo aooii. o oec ooe ocie i cei, o oao oc e eei aa, i oe ie oca cae acoi aoaai oooo oe:

coe o o ee, ee a eia ioai;

o oio ioai oca ai;

a oeai ( x ii, i oco eoio oaxo) a eaa ai.

e aa a e, o aa ioaia ccea e ocoac a oo oei, ce a i ac oea eoxio oca a-cee exooi ooci oaoo oiai cce - oo eei.

oec oa ao aai a e ocioic: coa coc cxea ax, o oa c cic i i oᒺa, ai coc i aoc a ai, a i oie a ee oac, a e oi coc oae aeee, o oo oa oi ioai o i.


1.2 Oc xio ioai


oa ao aai oo oac i o ioai o ooi i ocoa a eo aooii a a oe. xia ioai oac i a, oe oe x a ci e , oo co ac o iic ai, o a x ioc. ao a eei ioai a ocoi o oo e ecc oea:

i, oi ooi o ao ioai: IO ia, eeo; aa a, O, oaxo axo - eoiooo oax;

Aooii, oi ooi o ao ioai: ecai oe aooi, aa aooi, i c;

oc, oi ooi o ao ioai: aa oc aa ia o ocoa a eo aooii, aic i oc;

aac, oi ooi o ao ioai: aa aac, ia x aac, x iic;

aoe: i aoei oc, aa oee oc, aa ca.

c ioai a e axoc ai ax ocoiic a oic e aea e i ocaa i .


1.3 Oc eo ioai


axo e, o ocoe ae ao aoaoao ioaio cce e eee a oaa ioai. Ocoo eo ioai ia oix ax a ai ex ei, aaei.

a a iax, i oco a eo aooii eec oi eo ioci ioai, aa, ioai o ii, a, o e ioac a o xio ioai. oo a ao oa, o e eoxio, o ai ai:

cco oc, i oeei a e eio a ioia x aic;

cco eae, i ocai aaai oc a x aic;

oaxo c a oai;

coe oeai: A o oee oi, ii, i oco eoio oaxo;

Oe, c xia ioai, a oca oca ao oao oi - e e o oaoaa xia ioai.


1.4 oaioa oc aai


i oo o ocaeo aai, eoxio o a oei o, oe x oe oio aee a oa e i:

o ie o ceea;

o ee/eaa ioai;

o ee ioai;

o oaa ioai;

o ea;

o i䒺a i ceea.

o ie o ceea ae ie o cee, a o axoc coea aa ax. Ceeo oe i oe, a i oe ocaa. i ac 璺a ceeo eoxio ec i ocaa a ao oc.

o ee/eaa ae ee xio ioai coei ai a ax, ao, o ea ioai e eea, o oa ieaa. ee a eaa ioai oe ica i oca e aa, o ice x i oca oe ec ao. oo oc o a ee ao eaa ax a i e oca, o ao oc o ax. ao oca oe i - oe.

o ee ioai ococ ee eeo ioai o ocaa i.

o oaa ioai eeaa oa oec cia oea ocae, ai, o o axo i ocaa o eeoo-ocao exi. a o oco oa ocaeo aai. i aoci oa aoo o aea ea oa oaoo o. aci oo e cooao iao, a ci oi oe o aa co. Ao o ac: coa oca aa ei aae i, oi oe oaoc i ao ocaa, ai eac o cee ao ax o ioai o aao a. axoei ioai oaa oo . ai ooea ioai axo o o ea.

o ea eeaa ee ioie a ci a ocaa oeci oo oa. a ocoi oo oaa o o coo i oa oo o ioa ocaa oa i xix a oea - i.

o i䒺a i ceea ae eea i ceeo a aee oo oa.

Ao oo oa ee aio oa 2.


1.5 Oc icx eoi a ie


aeee oio oo oaoo aeee, oio o e ici eo a coco oea aoaoax ioaix cce, oec x oi aai, a eea a eoi ooo x, a x aoo acoca. ce e ac o oai ooi ooao i occeo oa ai ixo co aai eo oea a coci eaiai ocaeo aai.

oeo eaiai oeci oea ioaio cce oea oco ii eo.

eo oea ioaix cce - e ii coco x coe, o ic ioi acoa oea.

ci eo oea ioaix cce aci a e aaeo ac o:

a oa exooioo, ooo oec oea: eo aai, ce, eooi, oaiai a oea;

a cee aoaai oex oi: oiae, oe aoaoae oea;

a oaiai oeci oea - ii oaiaii eo.

e oeo o eoi oea.

Cee eoi oa exooix oeci oea oo oco aai a ce, ocoo a eeoei cai, e IC a cce ai ica, ia coci ioax aa i c ai.

oeci oea ioaio cce a cix caix a eaax acococ eo eooi a oa aa:

eooi ax, oo oea x a oci ooe e aoi i (xii xii ai, a ao ai, o eiac ai ax);

eooi oeci (oci oec oio aeeo ociooc i, a oc eei cei o ax, oo eooi eeaa i ici, oo, oiai, eeai ii).

acoca eoi oaiai a oea oae oca eooio-aeax oee, a ao ocax aoi.

oa oex oe oe aea o ooo ox i: oaoo, oaioaoo, ecoo.

oaa oea - cic i, o oo oee ie e aci oeaa, i o aa (a xii ai a aaa ei oeoo ie).

Eca oea - oea, a e iac oao oc, e oe ocaa aoo i a ex oca e aee oeoo ie.

oaioaa oea - oea, o oe e acoo oao ocac aoo; o oa, ei oex ie oc e e eexoi ooo O o ioo, a oeci ice oe.

eo, o xaae ci aoaai oex oi.

oe oea aeo i i eooi oeoao ioaio cce a oei ooe eeaa acoca eeeoo, icceoo, oᒺoo eoi oea.

a eeeoo eo oea eooi icc a ii aa oex oex ie a ocoi ioaioo, oaoo, aeaoo i exioo aeee.

i ac acoca icceoo eo oea eooi oc a ii icce, o ca o eeea. o ocac ioaa ooa icce, iiiai oiix ioaix 'i, aaea acoaic oa aa icce, aeaic cxe eax xix aaei.

Oᒺe oea eeaa coe ooo oe ioaio cce aaeoo oᒺa, ieoo o oᒺi eao. o a oox oᒺi oe eeo (aa, oox aoi).

Aoaoae oea - e coe oei ioaio cce a ocoi CA, o c a oai ioaii oei oᒺa ai (oee oea). oe a ic oaioa oc ioaix ooei i ioe i , a xi ' aoi aoi.

Oaiaii eo oea.

o i ae eo ex (cae oea), e oaiai oec oea icc i aa-eea, a oea oa ooa -o aai a ec aaeo iox.

o eo oea oa i coe oaoo ioaioo aeee o ioco eaex oi. oi a ioaii ao', i aac a coci, o o o e a ioai o ii ic ix oi, i i, a icc ceiiaix ieec.

o oaoo ioaioo aeee ioaio cce a oei oi a x oae ce aa i cao oaioa oeco, o o ooi a ce oai aa oaiai oo oaici a aaii (ocaai aa).

C eo eeaa aic oa, o aio aaoc a c aci ioaioo o cce. o oc aci ci oaia, a x eee i ia aeao cai a oaioai ccei ioaioo o. e eo oco i ac coe a ax, i coa a aeee oio a io eaeoci ax.

eo a ocoi aeao oei eeaa oa aai i a ooe eooio-aeao oei, o a coe ao o'a i caa ao oa.

eo eeeoci o cce oa o, o ic coe ioaio cce oeci ioa c oi, ic ii aai ai, a eoxiic ec i cce. e oec aco ieii, i oec oo ooe ax. o i ac oea ioaio cce oi ax oa a aaei ao oaiai ax oi ai EO, a i eo oc o x, o aee i eaeic aa a a o aoaa ece i.

Caci aoaoai ioaii cce c a ocoi a ax, a oa ao ooaa coei, oiai a ocai ax. o ai i aa ie aao ooce, eoxix oo a. Ic aao oee a ax.

ai x eiac ai caac ao aci oaoo c. oa caa o a - e oi ac, e oei oe aca, a coi - o oo ac. i oo a ecac ooi ac io o aci oeo c.

oe a caac i oix a aac eio. eia oe oa o ocoa ooi i eaiai, oo o coa ai cce.

ao e eia oee . ei x ao eeii, i eia:

iaxia oe - ai oaioai i eea

eeea oe - oe o aoi i a a cai ccei i

oᒺa oe - eiac e e ai, a i eo x oo i oaoo o.

Ic aci axiea C:

oaa - oaa i aa ax oiei a oo oei. a ao axieo a iic acix ax oa.

a - ceea - oiea a oo ieo oei (ceei), a ecoai oe iei o oo ee oa ee. a x oeax caoei ici oa, i eac o ee ee.

i - ceea - ai axiei a ceei e e eiac , ae i a oaa C, o oo a ocaa i oea ai aci. o oaa ocaa e e a a aoo ix ai, a eac o C, a o oeai. C aoao ci a iicic , a ao oo oc o ioai a oooo c aoi.

ooiea - eei a eia ceei, i ai ooiei i coo oce aio eeoci. a oo ceei io co oi C. ao aco ococ iai oa, a ai cee ax oa. o oo aoaa oo ai eo ioci ocai i ioio ooi aaae eei.

Iee - oc o i C oie a oo oei eei icc aea ee caa ooo. ai oa aa "o ia", o o ai aa a i ca oecoo.

coo oe oa a-cee axie o, o oa ieao ixo ie oo aa - a ii oie cee, a o i e oiac aa ax, a ii oe ocai a e e oic a oe aoai a ocx aix cax, eac o ceea.

ao, oa ooi aa ax oco ai exai oc o ax BDE, ADO a ODBC. ci o a co eea, a i eoi. oeo x eaie.

ODBC ao Oen Database Connectivity (o ix a ax) - eae i ocaaa exai oc o ax ix ee. i eaiai ceiai X/Oen a SAG CLI (SQL Access Grou Call Level Interface) - ieec i oc SQL, oaa ia Microsoft. ODBC oo i aoi aa ax a oooo o oaa, aa, oaa, oia i ae ax, oa coo ioai o a ax, ai a iec.

Axiea ODBC caac ocox ii: a ie, ieec ODBC, cee aei, ae a eeo ax.

a ie eai GUI (Grahical User Interface - ai ieec ocaa) a iec-oi. i aca a oi oaa, ai Java, Visual Basic ao C++. aa oaa oco i ieec ODBC aoi aa ax.

cee aei aco ODBC Microsoft. i e i aea, o axoc ccei, o aaae, ca i a oi ae i aa ai oai ioai o ae, o e eoxio. Oci oa aa oaa oe aa eioa aa ax, o cee aei aa, o ioia ccea ea ao ax o ci a, o axo o e, a o ci ai eea ax eeai ai oai.

ae - a aca axie, a ce a o - a ax. Ccea aei ODBC a e e a aoi WINDOWS, ae i a ix, oea UNIX, o eeo AI ODBC a oi ice coe aoo-eaex acoca. i oo ODBC o oco acocai cacc SQL o oo caa, o oo oo acoca eaei i a a ax. ao ae oa oeo ao ax, aa, ae Access, Oracle a ae SQL Server. Ieec ODBC a ai i, ax oeao SQL, ai 璺a, ioai o a ax oo. oo aea xo x eaiai. e oaa, o ex aax ax ae oe ea i ieec ODBC, i e ic cceo ea ao ax. i o oo o oca ai a ax, oa ioie i iae x ai oai. a ax, o a oax eeax ao Internet, ae i ee o.

eeo ax oeci ODBC oe cceo ea ao ax ao oco aoo ai a oco c. i oe oco ao ax Microsoft Access eeo i, a i aaocee eiae ioai o ii eeoo oai i x ooax.

aacie oco iioe BDE (Borland Database Engine), acoa a exooi IDAI (Integrated Database Alication rogram Interface). iioea caoc aoao caoei IDE i Borland, ax C++ Builder Delhi. a aoa oa caoc C: \rogram Files\Borland\Common Files\BDE.

BDE aee coex oai aci i:

eoceei oc o oax a ax (dBase, aradox, ecoi a)

oc o SQL-ceei (Oracle, Sybase, MS SQL Server, InterBase, Informix, DB2) a oooo aei Borland SQL Links

oc o -x ee ax, o i ae ODBC (Oen DataBase Connectivity), aa, o ai eeox a (Excel, Lotus 1-2-), ceea a ax, o e i aei SQL Links (aa, Guta/Centura)

coe oai i-cee, o oco ioii ai

co oic ooi

oca SQL (Structured Query Language - oa ai) ioi oai i acoi i o.

a oa o e ooe ceeoi oaa Delhi, e oci, a o , ceeoe oo aoo oaoo aeee. Ceeoe oaa Delhi a eea: ieec, ocoa oo, oa cooo i, ceeoe aa oo ci ooe oo i ieeco oa, oa oaa - Object ascal. aa ax e coeoaa InterBase, a InterBase - e a-ceea exooi, a oo aa iae aa ax. InterBase icac aoao caoi Delhi. a ii i oax ai aradox i dBase, ai InterBase e eiac i oex ai, oaoax ceei aaoa. aoic ai eiac i ooo eoo a, aoo ao ax. oaa ocaa oic a oei ocaa, a caa aa ax ioai axoc a oeo ceei.

oo aoo oe i ocoa ceeoe iaoo oaa Delhi. a e eia :

Delhi - ceeoe iaoo oaa ocoae a oi oaa Object ascal.

Delhi o i aix iax ceeo;

Delhi - aocie, a o , ceeoe coe a ax, oax, a i iaex;

oca iax ooei oeo eoceeo eac o oᒺi i coceia a a eai. i acoce oᒺa ococ a. A - e iiai acoci, i ooaa oca oᒺ i ococ i aaei oᒺa.

oo aa ax Delhi co ooe BDE (Borland database Engine). i a oic oc o ocox oai a ax (Oracle, Informix, Dbase, aradox, InterBase).

Delhi eea ia o ai SQL (Structured Query Language). oa oo o i a ax i oa i ioai a ac ia.

i i ao oe , o ocai oo ceeoa oaa aeec aci o o AIC:

ocoa ocai ao AIC;

ic ocoai;

ecoa ia, oio i a ceeoa.


2. ooa exioo a oooo oe


2.1 Oc a oa o c a eo oaiai xix a xix ax


xoi cooo oea eoxio aoaa a ax AIC. o e ea oea iaa o eoi oea a ax. aaoc oii Oc icx eoi a ie oea -o a ax ci oa i ae ai oᒺi eeo ce, x acoce a aoi. oo eoxio a ci o, i coa a oᒺi ao eeo oaci:

IO ia

oe eeo ia

ecai oe aooi

aa aooi

i c aooi

aa oc, o aa ia

aa ocoa

aic oc

aa aac

ia aac

iic aac

oco i ea oc aaea ea a, o ic ci a eeo ce. a ao axoc ei oai oi. oe aioo ioa a ax eoxio oec oaiai i ai.

oaiai - e o ai a i ie a, o ooi a acoc ei, ii i aei ax. Ocaoa ea oaiai oc o oea aoo oe a ax, o oe a 'c e oo ici, oo ea aiic ioai. e oc e ci eo eooi a'i, ci e oo ceeoci eeex ax.

ea oaa oa (1) eeaa, o oe oe ai o eoi i e ico oox . ao e eee ioe i 1, i oio oe IO o a eia: ie, I, o-aoi oo, o i o eoi.

a oaa oa (2) eeaa, o ioe oooo axoc 1 i o o ioe ooao c e e. ao oio o a, o oa oeai a eia a. ic ee ai o 2 oa ai ai: "i", "oc".

a "i" a ai o:

IO ia

oe eeo ia

ecai oe aooi

aa aooi

i c aooi

a "oc" a ai o:

aa oc, o aa ia

aa ocoa

aic oc

aa aac

ia aac

iic aac

a ei i ax. ai "i" e oe e "o ia", ai "oc" - "o oc".

e oaa oa () eeaa, o ioe axoc 1 i 2, a ao, o ae oo o, o e xo o eoo a e aeao i ix oi. oo oio oc ax aeoce ax. aa, o ao a ax ooc ia, o ac o aooi e oe ao i aco o ia. o oio e eeec ioai o aooi a "Aooii", a e a ai o:

ecai oe aooi

aa aooi

i c aooi

oe "ecai oe" e e e ao ai.

Aaoio oio co a "aac" a o:

o aac

aa aac

ia aac

iic aac

oe "o aac" e e e ao ai.

ao oio co a "aoe", e axoc o: o aooi, o oc, o aac, aa oc a aa oa ee ioai o e, xo, oc ao.

ee o o a eo oao o oa o, o oo eooi eo ai a eia.

oo aie eooi aac o oe, o -i ai a ax ea e ox ai, o aea i ac caoo a i ci e oi a aoeaei, i e oi a, i ae, iocc oee ioe.

e o a - e a, e xo o ca ioo oeioo a. A aac aoeae, o oe x ioao e ae o i ooo.

a, ai ai coeoai InterBase, oo x oea e ocoac a-ceea exooi, o oio ii, o aa ax e axoc a ceei. InterBase ci coeoai ai axoc oi ai, oo aa ax a - e o a. Oe, ci ai a ax axoc a oo oei - ceei. oaa ocaa e oca a a i ax o ceea i oa ea.

eao oee oaiai a ax a c a ax, o eea aio oa 1. ao a aa ax a eea o eo, o, eo oao o.


2.2 ooa a oc oa eaiai aoi oa aai


oo aoo oe i ocoa ceeoe iaoo oaa Delhi. Delhi a eea, i ocai oii 1.5

ao oii oeo ocoi aco, o ocoac oeai AIC ocoa a eo aooii.

oc o a ax Delhi icc ee BDE (Borland Database Engine). oca BDE oo oa ica oc o ax e i oax (aradox i dBase), ae i iaex a ax, oaoax a SQL-ceeax (Interbase, Sybase, MS SQL Server, Oracle, Informix).

aaa BDE Administrator, oo o co aiac - oca o a ax. Oa e Object → New. ae a ax oa Interbase. i a aiac - avtoser. oi ServerName aa x o a ax, a oi User Name - SYSDBA, a ei aiac Object → Aly.

aa aa ax a coea, iaea. iaoe aa aa ax a coa coea, oaa eci iaeo a ax InterBase. Ceiao coe i oiai a ax ae ocaa Delhi ea ia IBConsole. oco i i oaa a a ax. oo oa aci i:

co eoi, i eiac ai. eoi - e aa, e axoc a a ax. ao a - e Avto_BD;

aa a a ax (ServisAvto. GDB) a oooo i WISQL a aiac - avtoser;

co a i䒺ac o cee a ax a oooo i IBConsole;

co ai a ' i i IBConsole.

Coo a a o oo eo eac i ac oo. Oi ocooce InterBase e, o aa ax icc oo ai, o co oo e. InterBase aa ax coc ii WISQL. aac eoi a aa aa a ax, aa ocaa a ao i䒺a o a ax. ai IBConsole oc o ao a ax, i a ocaa a ao oc. ic oo a oooo o SQL a aei icei iao eao Interactive SQL. o eaoi coo ai a ax a i a oooo SQL.

ceeoi oaa Delhi a o eoxio oic ai ooe, : DataSourse, DBGRid, DBNavigator, Query a ic 'o i ioi a, i coei aie.

aii ooei oiei ci caoei a a oe iai ooe Delhi. oo, o ocoa c ooei co oi, eoxio aca io aii a eoxi ooe i oic oo a io o. o ooe a co acoci, i oa i Iceoi oᒺi a ea a ii oi. oi oi oa a Iceoi oᒺi a aai oi. ic oo ic io o, e oio ec oa o. eoxii ii xi o oa oc aoao.

oo, o ioaa ai ai a oi ococ ooe iaoo ioae ax (coia Data Controls):

TDBEdit - e , o i oee oic eaa.

TDBMemo - ae ioae i eaa aao ox ax.

TDBListBox - oo eaa 'ae oe oooo ac ao ax xo o ooo ae i cc. Eee cc aac a oooo acoci Items.

TDBComboBox - i ae i cc o ee.

TDBLookuList i TDBLookuCombo - ococ aax, o eoxio eeiei o acax eo ai ooaco a o'a ooo aco oao ioai io ai.

TDBGrid - ococ ee i eaa ax, ecaex ao oai.

'o i ooeo Table i ooea iaoo ioae ax iac a oooo ooe DataSource (coia DataAccess). i eeo ax iax ooei, i eca ooe Table.

oa o oe DataModule: File-New-DataModule. e o oiac e iai ooe, o e aoaa oco o. eeic o ooe DataBase, 8 ooe Table, i ioia a a. oo x iceoi oᒺi aa acic DatabaseName AVSIS - e aiac, e ocoac ooe Table, a acic TableName - Clientu, Avto, Zachastunu, oslygu. Zakaz ioio. oi o o oa 8 ooe DataSource i iceoi oᒺi DataSet aa iea a: Table1, Table2, Table, Table4 i .. ioio. acoci ooe Database - DatabaseName AVSIS, a AliasName - avtoser - aiac, co BDE Administratori.

ao eeic a o ooe TDBGrid ioae ioai ax. acocx x ooe oi DataSource aa eeo ax DataSource1, DataSource2 i .. ioio. oi o a ai ai - Activ - true. ee c ioai e ioaac ooeax DBGrid. aiai o ax oca ooe TDBNavigator - ae, a i oie oo (ea, oee, aca, oca, ca, eaa, a, aica, , io). acocx x ooe oi DataSource aa eeo ax DataSource1, DataSource2 i .. ioio. a cao oa aa ooea TDBEdit, x acocx DataSource aa DataSource1, DataSource2, DataSource i .., a DataField - ioie oe ai.

oo o a eoxii ai ix a, oio x a.

i a "i" i "Aooii" o o o aaox (eoxio oa a i coo aao). o o ai "Aooii" o oae oe "o_ia". o a i i ai Delhi oa ai i: a ooe Table4, a ioia ai "Aooii". iceoi oᒺi e acic MasterSource oca DataSource, a acic MasterFields - ii, e ioc, oacx DetailFields (o oo o), MasterFields (o oao o) a o, o ai ai (o ex iecax), oo "Aooii" - e oe id_clienta, ai "i" - e id_clienta, i ac Ok. Aaoio a e a.

oa o o ax ooe Query, i ax a. ec ai aca oao oi. ocai ao ai oaxoi o - ooea Edit, ec oaxi aca oao oi. ea a oa oa ic aca ioio o, a a oi a.

oo i ia oca ooe QuickRe, oic a o o. ooe QRBand, QRSubDetail oic a QuickRe. a x oic ooe QRLabel, QRDBText. ooe QuickRe oio a eeo ax. o a ooe a i ooeo IBQuery. ea i oa oa ic aca ioio o, a a i.

ec oax oi ee oa A.


2.3 Cxea exooioo oec ee, eaa, ee a ai eai


ao ioii cooo oe oeo oeai exooioo oec oa aai.

oo oa cxe exooioo oec ee, eaa, ee a ai eai oio oi e oec a eia eai, a oo x oc ea oeai.

oec oa oo oi a ai ocoi ea:

ee/eaa ax a a ax;

ee ioai;

ee eai ai;

ee/ ii.

ee/eaa ax a a ax o ceia ai, a oc o ee a eaa ioai, oo ai, a ao oc. ai eoxioci oe i ao. Coeco cxe exooioo oec ee/eaa ax a oa oca a o: coa ai o ao oc o a, ia ai-oi "oc": e oi → oc, a oc ioai o oc, o aa ia, a "aac": e oi → aac, e aaa ai aac. ai ai ia a "Ioai o ia": e ee ax → Ioai o ia, a oia o xix ax a o ai o ia a oo aooi o ai. ai ai ao a "aoe": e ee ax → aoe. ic ee ax ai eei aic eeo ioai. o ioai e eea i oio i, o ai ia oi a a i ai.

ee ioai icc ocae a ax. ai, i ai o a oe ee ioai, i ai ee: e a → ee ioai.

oca oe ee ea ai ic ee aaei i ioai: e a → (a oi a). aa, i ax o oc, o x aaa ia a e eio oio a oi a "Cco oeex oc" a ec oi eio.

ee ii ic oca ic i eoxix ax: e i → (a oi i). oei oca oe oa i "o oee oi a e eio" ao "ioic o ia".

ae eeoci oo oa a aoci oa oeai a oao o oeeo eca.

Cxea oooo e oa eea aio oa .


3. Ceia oi


3.1 Ici icai ooeoo oe


a oe ooe oeaii ccei Windows X, ae ocao oco, o i e ix oo i oe aa i Windows 95, Windows 98, Windows 2000, Windows NT, oo cix oeaix cceax Windows. e oa oec e oe aa ax oeaix cceax Linux a Unix, a a oe exe (ioo, o i oeaii cce e i ae oe). oo, o aa ao oao a oei a caoee oae aeee: BDE Administrator, InterBase.

a oe e oe icai. oo, o ooa oo a oao eoxio coia a oe ocaa. oi oca aiac BDE Administratori. aaa BDE Administrator. Oa e Object → New. ae a ax oa Interbase. ec a aiac - avtoser. oi ServerName aa x o a ax, a oi User Name - SYSDBA, a ee aiac Object → Aly. ai eoxio ac i IBConsole aeca oa cee InterBase. e Server → Register. ǒc io a o cee. oio aeca oa cee: ec ocaa UserName - SYSDBA, a ao assword - masterkey. oi oio a a ax o ceea. e DataBase → Register. oi DataBase aa x o a ax. oi Alias Name aa aiac, coe BDE Administratori, oi ec ocaa SYSDBA a ao masterkey. oei oo ao ax eei eoxio coia a AvtoDB, i axoc aa, a i oe. a aeca oa cee InterBase a o oei, a oei ocaa eca cee InterBase e oio.


3.2 Ici ecaai oe


ec oa oec: aa ax, oaa, axoc ai "AvtoServis": AvtoDB - aa, e icc aa ax a, oaa/AvtoServis. exe - oaa aooix ceici.

aeee oaoo ioa AIC eoxio, o oa a caoea a ecoao oei. iiaa oiai ecoaoo oea aca:

aoa acoa eaoo oecoa - e e 500 ;

oᒺ oeao ai e ee 64 a;

oᒺ ioo ic a oco c 4 eaaa;

eoxio eea aic CD-ROMa aoUSB-oa;

ec co oe oao a ao ax aa .72 cooo oco.

ic ac oa AvtoServis. exe oio ac o ceea a → ic o ceea. ic i䒺a oa eea ai, o i oix ax a a eoxioci a i. oo, o oca i o a eaa ai oio ec ao oc: a → ec ao oc. Caa ao oc: 1111. eoxioci oca oe i ao: a → i ao. ao c i acc a Info. ini.

ic aie oo ao eoxio i䒺ac i ceea: a → i䒺ac i ceea a oa.

i eao oaoc ici ecaai oe oa oa oi oa.


4. Eooi oi


4.1 oaxo ooc ooeoo oaoo o


ooa oaoo aeee a aa e aeia a i aa, cae o, a ica a cceaa ci a o eo i oao a oi.

ooc coei aoaoao cce a cee:

aeiai a;

Aoai oaa;

acoi a;

Ii a;

axo ce e caae, aa ooc eo a aao oo 1


(1)


- aeiai a;

- acoi a;

- a a aoi a;

- a a oao aoi a;

- a a aoai oaa;

- iaxa a coiai oe.

oeo eaie a iaxo a, i a oe oao o 1.

ooeo i oax aoci aeiax a, o co e oaxoc a oo 2 i a cee aic cix ox aeiai, ocax ooi ioaio cce a oa oc ix ic a oaiai a oa coo eeoeei.


(2)


- caa aic ox aeiai;

- oaa oc ix ic a oaiai;

- oaa coo eeoeei.

aaa ca a a oi aeia caac c oi i i-o () aeia a oo iic (), o ioaeo oi 1


()


ioae oax aoci cix ox aeiai o oa i ai 1.


a 1

aea

ia a o,

iic, .

aic, .

CD-R c

1,2

1

1,2

aa

2

1

2

ai A4

0,1

60

6

a

1

1

1

coo

10,2


a a oa ocax ox oc (), i aa ii ica a oaiai eeo aco eei:

ceoc aio oo a aei A ( ca o 0,50 ) - 1,5 ;

a aei A4 (60 ci o 0,25 ) - 15 .

coo ocao oi a oa oc =16,5 ()

Oaa ocao i ac oa cooo oe eeo eei e icac a oo (4).


(4)


- ia 1 /o, ;

- oic, o coa , ;

- ac oea, o.

oea iaoc a ao oiai Athlon 000+, 17 o TFT-oio LG, o cao coa o 50 ao 0, 5 eeoeei.

a oea, a a, o oa i ac iaxa oicoci, e iaoc a aeo 160 o. oi oaa a eeoeei cae:


()


ao c aeiax a, ica oai ai o 2:


()


acoi a - a, i a cee o ico acoi o aaoo aa, iioe a ix aai ioo, oo cooo oe a oa eoxix oaox oc oo co oa oe (2 ic).

a e ei o ocao:

2 icx ox a oec o 1,5 , oo 27 ;

10 i a ae aci o 0,8 , ci 8 .

Oe, c acoi a oao =5 .

ac eao e iaxo a a aoi a. aoo oo aacie acococ oca ooa oa oa ai, oo ca aoio a oi oe oo ao ca a iic iaoax o. o coa oio a aa oicic () oax oi (iic iaoax o) o ooi a oea AIC, o caac c o, aex a oa eoo oi () i occ a oo 5.


(5)


eeo oicic cix oi ai 2.


a 2

oo

oicic, o

oao oo

1

Oaa i oe oaoo aa

6

ooa a oo, oeai ie

5

Icai eoxioo oaoo aeee

2

i xio ioai

8

Oaa iea

10

O icx eoi a ie

2

ooa ao oo oa

10

i c oaiai xix a xix ax

6

ooa oaoo o

104

eca a aaoe oa

2

iooa i

40

oaxo ooc oe

2

coo

198


io a ai 2 coo iaoax o 198. a a aoi a iaxo oo ooo ao ca () a aa oicic oax oi (), o ioaeo oi 6.


(6)


xo oo, o ic aoio oaica cao 800 ., ooa aa caa caoe 5 /o. oi iaxoo a a oo 6 i oao:


()


oaoa aoia aa () - 20% i oi ocoo, oi oao ai ai:


()


ac o - iaxa a coiai oe, o a ai iaxa aei aooaco:

eci o - 1,8%;

o coiaoo caxa a ao acoo a aeaoci - 2,9%;

o coiaoo caxa a ao eoi - 1, %.

o coiaoo caxa i eacx ai a oecix axoa - 1%. aaa ca, o ooc a caa (), oi ca cix coiax iaxa caa 7% i oeeo, oo


()


a oao aic () ocao oeo exi a o aoai () oa a ii aoaii iaxa () a oo 7.


(7)


Oao ax ax . a % ii iaxa ci (), ae axo, o ei eaoo oca caa 2 ici, o a a aoai oeo exi () ca ()

ao oio a aoai oaoo aeee. eei i a oae aeee:

OC Windows X rofessional Rus - 680.85 .

MS Office 200 - 1122 .

Delhi 7 rofessional - 5600, 77 .

Ca aoci oaoo aeee - 740,62 . a aic () oaoo aeee a o aoai () oa a ii aoaii iaxa () a oo 8.


(8)


Oao ax ax . a % ii iaxa ci (), ae axo, o ei eaoo oca caa 2 ici, o a a aoai oaoo aeee () ca ()

aaa ca aoaix iaxa cao ()

C ci a a iaxa a eeo oo 1, oao a ooc oea ao ioaio cce:


()


co


ico, ce oee, oa caa, o a co oe ooi ei ae oi a oi exooi oea a ax. e oaoo iea o ai ei e i io i aa a, a oooo ei oei oea a ax a o oao oaiai c ax ai.

ioxc i oe coe aioo ieec ocaa, ei aa aoa ae oaoc a oca i aco, o aa ieoae ceeoe oo Borland Delhi 7, ooi iae aa ax.

xoi aoo cooo oe a coea AIC ocoa a eo aooii. ooi cce a ocaa a-ceea exooi, o oo oo ao cce eei. a o aa oaa ioia cac oa o icoo oaoo o, xoa i e ieao.


ieaa


  1. c .., Aoxi . ., ca . A. "aca. Turbo ascal i Delhi", - ., - i: eo", 2002.

  2. oo ., . e, A. Caa "a ax: oeoae, eaa coooee. eo aa", BH, 200

  3. aoo . "oaoae a ax Delhi 7: e c". - C.: e, 200.

  4. htt: // omega. km.ua/katalog. h? lev=&de=7&tye=0&code=144

  5. htt: // www.ibase.ru/rices/borland. htm#d10



oao A - oa o oe


rogram AvtoServis;

uses

Forms,

UAvto in 'UAvto. as' {Form1},

Uoslygu in 'Uoslygu. as' {Form2},

Unit1 in 'Unit1. as' {DataModule1: TDataModule},

UZachastunu in 'UZachastunu. as' {Form},

UClientu in 'UClientu. as' {Form4},

UZakaz in 'UZakaz. as' {Form5},

UShow in 'UShow. as' {Form6},

UZautoslyg in 'UZautoslyg. as' {Form7},

UZautZachastun in 'UZautZachastun. as' {Form8},

Urint in 'Urint. as' {fmrint},

UZvit1 in 'UZvit1. as' {Form9},

UZvit2 in 'UZvit2. as' {Form10},

UConnect in 'UConnect. as' {fmConnect},

Uassword2 in 'Uassword2. as' {Form12},

UZminaassword in 'UZminaassword. as' {Form1};

{$R *. res}

begin

TForm1 = class (TForm)

MainMenu1: TMainMenu;

N1: TMenuItem;

N2: TMenuItem;

N: TMenuItem;

N4: TMenuItem;

N5: TMenuItem;

N7: TMenuItem;

N8: TMenuItem;

N9: TMenuItem;

N10: TMenuItem;

N11: TMenuItem;

N12: TMenuItem;

N1: TMenuItem;

Hel1: TMenuItem;

N14: TMenuItem;

N16: TMenuItem;

N17: TMenuItem;

N18: TMenuItem;

N19: TMenuItem;

N15: TMenuItem;

N20: TMenuItem;

N21: TMenuItem;

N6: TMenuItem;

rocedure TForm1. FormShow (Sender: TObject);

begin

Form1. N. Enabled: =false;

Form1. N4. Enabled: =false;

Form1. N7. Enabled: =false;

Form1. N8. Enabled: =false;

Form1. N1. Enabled: =false;

Form1. N15. Enabled: =false;

Form1. N2. Enabled: =false;

Form1. N6. Enabled: =false;

assword: ='1111';

Label2. Cation: =assword;

end;

rocedure TForm1. N7Click (Sender: TObject);

begin

Form1. N. Enabled: =false;

Form1. N4. Enabled: =false;

Form1. N7. Enabled: =false;

Form1. N8. Enabled: =false;

Form1. N1. Enabled: =false;

Form1. N15. Enabled: =false;

Form1. N2. Enabled: =false;

Form1. N6. Enabled: =false;

Form1. N17. Enabled: =true;

Form1. N2. Enabled: =true;

DataModule1. IBTable1. Close;

DataModule1. IBTable2. Close;

DataModule1. IBTable. Close;

DataModule1. IBTable4. Close;

DataModule1. IBTable5. Close;

DataModule1. Avto. Close;

DataModule1. oslygu. Close;

Form6. ShowModal;

end;

rocedure TForm1. N18Click (Sender: TObject);

begin

Form7. ShowModal;

end;

rocedure TForm1. N19Click (Sender: TObject);

begin

Form8. ShowModal;

end;

rocedure TForm1. N20Click (Sender: TObject);

begin

Form9. ShowModal;

end;

rocedure TForm1. N21Click (Sender: TObject);

begin

Form10. ShowModal;

end;

rocedure TForm1. N2Click (Sender: TObject);

begin

Form12. ShowModal;

{if not ass then

begin

ShowMessage ('ei ao! ');

Exit;

end

else

begin

Form1. N. Enabled: =true;

Form1. N8. Enabled: =true;

end; }

end;

rocedure TForm1. N6Click (Sender: TObject);

begin

form1. showmodal;

end;

end.

unit Uoslygu;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Grahics, Controls, Forms,

Dialogs, Grids, DBGrids, ExtCtrls, DBCtrls, StdCtrls, Mask;

tye

TForm2 = class (TForm)

GrouBox1: TGrouBox;

DBGrid1: TDBGrid;

DBEdit1: TDBEdit;

DBEdit2: TDBEdit;

DBEdit: TDBEdit;

Label1: TLabel;

Label2: TLabel;

Label: TLabel;

DBNavigator1: TDBNavigator;

Button1: TButton;

DBNavigator2: TDBNavigator;

Label4: TLabel;

rocedure GiveIndex;

rocedure Button1Click (Sender: TObject);

rocedure DBNavigator1Click (Sender: TObject; Button: TNavigateBtn);

rocedure DBNavigator2Click (Sender: TObject; Button: TNavigateBtn);

rivate

{ rivate declarations }

ublic

{ ublic declarations }

end;

var

Form2: TForm2;

index,max: Integer;

imlementation

uses UAvto, Unit1;

{$R *. dfm}

rocedure TForm2. GiveIndex;

begin

if DataModule1. IBTable1. RecNo<>0 then

begin

DataModule1. IBTable1. First;

max: =DataModule1. IBTable1. FieldByName ('id_oslygu'). AsInteger;

while not DataModule1. IBTable1. Eof do begin

if max

DataModule1. IBTable1. Next;

end;

index: =max+1;

end else index: =1;

end;

rocedure TForm2. Button1Click (Sender: TObject);

begin

GiveIndex;

DataModule1. IBTable1. Insert;

DBEdit1. Text: =IntToStr (index);

Button1. Enabled: =false;

end;

IBQuery2RICE: TIBBCDField;

IBQuery2ZACHASTUNU: TIBStringField;

IBQuery2RICE1: TIBBCDField;

IBQuery2KOUNT: TIntegerField;

IBQuery2SYMA: TIBBCDField;

IBQueryID_ZAKAZY: TIntegerField;

IBQueryOSLYGA: TIBStringField;

IBQueryRICE: TIBBCDField;

IBQueryZACHASTUNU: TIBStringField;

IBQueryRICE1: TIBBCDField;

IBQueryKOUNT: TIntegerField;

IBQuerySYMA: TIBBCDField;

IBQuery1NAME: TIBStringField;

IBQuery1RICE: TIBBCDField;

IBQuery1KOUNT: TIntegerField;

IBQuery1F_1: TIBBCDField;

IBQuerySYMA1: TIBBCDField;

rivate

{ rivate declarations }

ublic

{ ublic declarations }

end;

var

DataModule1: TDataModule1;

imlementation

uses Urint;

{$R *. dfm}

end.

unit UZachastunu;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Grahics, Controls, Forms,

Dialogs, StdCtrls, Mask, DBCtrls, ExtCtrls, Grids, DBGrids;

tye

TForm = class (TForm)

GrouBox1: TGrouBox;

DBEdit1: TDBEdit;

DBEdit2: TDBEdit;

DBEdit: TDBEdit;

Label1: TLabel;

Label2: TLabel;

Label: TLabel;

DBGrid1: TDBGrid;

Button1: TButton;

DBNavigator2: TDBNavigator;

DBNavigator1: TDBNavigator;

Label4: TLabel;

rocedure GiveIndex;

rocedure Button1Click (Sender: TObject);

rocedure DBNavigator1Click (Sender: TObject; Button: TNavigateBtn);

rocedure DBNavigator2Click (Sender: TObject; Button: TNavigateBtn);

rivate

{ rivate declarations }

ublic

{ ublic declarations }

end;

var

Form: TForm;

index,max: Integer;

imlementation

uses Unit1;

end.

unit UClientu;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Grahics, Controls, Forms,

Dialogs, ExtCtrls, DBCtrls, StdCtrls, Mask, Grids, DBGrids;

tye

TForm4 = class (TForm)

GrouBox1: TGrouBox;

Label1: TLabel;

Label2: TLabel;

Label: TLabel;

Label4: TLabel;

Label5: TLabel;

DBEdit1: TDBEdit;

DBEdit2: TDBEdit;

DBEdit: TDBEdit;

DBEdit4: TDBEdit;

DBEdit5: TDBEdit;

GrouBox2: TGrouBox;

DBEdit12: TDBEdit;

DBEdit1: TDBEdit;

DBEdit14: TDBEdit;

Label12: TLabel;

Label1: TLabel;

Label14: TLabel;

Label15: TLabel;

DBEdit15: TDBEdit;

DBNavigator2: TDBNavigator;

Button1: TButton;

DBNavigator1: TDBNavigator;

DBNavigator: TDBNavigator;

rocedure GiveIndex;

rocedure Button1Click (Sender: TObject);

rocedure DBNavigatorClick (Sender: TObject; Button: TNavigateBtn);

rocedure DBNavigator1Click (Sender: TObject; Button: TNavigateBtn);

rivate

{ rivate declarations }

ublic

{ ublic declarations }

end;

var

Form4: TForm4;

index,max: Integer;

imlementation

uses Unit1;

{$R *. dfm}

rocedure TForm4. GiveIndex;

begin

if DataModule1. IBTable. RecNo<>0 then

begin

DataModule1. IBTable. First;

max: =DataModule1. IBTable. FieldByName ('id_clienta'). AsInteger;

while not DataModule1. IBTable. Eof do begin

if max

DataModule1. IBTable. Next;

end;

index: =max+1;

end else index: =1;

end;

rocedure TForm4. Button1Click (Sender: TObject);

begin

GiveIndex;

DataModule1. IBTable. Insert;

DBEdit1. Text: =IntToStr (index);

Button1. Enabled: =false;

end;

unit UShow;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Grahics, Controls, Forms,

Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls, Mask;

tye

TForm6 = class (TForm)

GrouBox1: TGrouBox;

Label1: TLabel;

Label2: TLabel;

Label: TLabel;

Label4: TLabel;

Label5: TLabel;

DBEdit1: TDBEdit;

DBEdit2: TDBEdit;

DBEdit: TDBEdit;

DBEdit4: TDBEdit;

DBEdit5: TDBEdit;

DBGrid1: TDBGrid;

DBNavigator1: TDBNavigator;

DBGrid2: TDBGrid;

DBNavigator2: TDBNavigator;

GrouBox2: TGrouBox;

GrouBox: TGrouBox;

rivate

{ rivate declarations }

ublic

{ ublic declarations }

end;

var

Form6: TForm6;

imlementation

uses Unit1;

{$R *. dfm}

end.

unit UZautoslyg;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Grahics, Controls, Forms,

Dialogs, StdCtrls, Grids, DBGrids, ComCtrls;

tye

TForm7 = class (TForm)

DBGrid1: TDBGrid;

Button1: TButton;

_zachastun');

DataModule1. IBQuery1. SQL. Add ('from zakaz, zachastunu');

DataModule1. IBQuery1. SQL. Add ('where zachastunu. id_zachastun=zakaz. id_zachastun');

DataModule1. IBQuery1. SQL. Add ('and data_olatu between'+Label1. Cation+DateToStr (dat1) +Label1. Cation+'and'+Label1. Cation+DateToStr (dat2) +Label1. Cation);

DataModule1. IBQuery1. Oen;

sum: =0;

for i: =1 to DataModule1. IBQuery1. RecordCount do

begin

sum: =sum+DataModule1. IBQuery1. fieldbyname ('F_1'). AsFloat;

DataModule1. IBQuery1. Next;

end;

Edit1. Text: =FloatToStr (sum);

end;

rocedure TForm8. FormClose (Sender: TObject; var Action: TCloseAction);

begin

DataModule1. IBQuery1. Close;

end;

end.

unit Urint;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Grahics,

i: integer;

sum: real;

dat1,dat2: TDate;

imlementation

uses Unit1, Urint, DB;

{$R *. dfm}

rocedure TForm9. Button1Click (Sender: TObject);

begin

dat1: =icker1. Date;

dat2: =icker2. Date;

DataModule1. IBQuery2. Close;

DataModule1. IBQuery2. SQL. Clear;

DataModule1. IBQuery2. SQL. Add ('select id_zakazy, oslyga as oslyga, rice_oslygu as rice, name_zachastun as zachastunu, rice_zachastun as rice, count_zachastun as kount, (rice_oslygu+rice_zachastun*count_zachastun) as syma');

DataModule1. IBQuery2. SQL. Add ('from zakaz, oslygu, zachastunu');

DataModule1. IBQuery2. SQL. Add ('where zachastunu. id_zachastun=zakaz. id_zachastun and oslygu. id_oslygu=zakaz. id_oslygu');

DataModule1. IBQuery2. SQL. Add ('and data_olatu between'+Label1. Cation+DateToStr (dat1) +Label1. Cation+'and'+Label1. Cation+DateToStr (dat2) +Label1. Cation);

DataModule1. IBQuery2. Oen;

sum: =0;

for i: =1 to DataModule1. IBQuery2. RecordCount do

begin

sum: =sum+DataModule1. IBQuery2. fieldbyname ('syma'). AsFloat;

DataModule1. IBQuery2. Next;

end;

Edit. Text: =FloatToStr (sum);

end;

rocedure TForm9. FormClose (Sender: TObject; var Action: TCloseAction);

begin

DataModule1. IBQuery2. Close;

Edit. Text: ='';

Edit5. Text: ='';

end;

rocedure TForm9. Button2Click (Sender: TObject);

begin

if DataModule1. IBQuery2. Active=false

then MessageDlg ('oae a', mtWarning, mbOKCancel, 0)

else begin

fmrint: =Tfmrint. Create (Self);

fmrint. QRLabel4. Cation: =DateToStr (icker1. Date);

fmrint. QRLabel6. Cation: =DateToStr (icker2. Date);

fmrint. QRLabel17. Cation: =Form9. Edit. Text+' . ';

fmrint. QRLabel18. Cation: =Form9. Edit5. Text+' . ';

fmrint. QuickRe1. review;

fmrint. Free;

end;

end;

rocedure TForm9. ButtonClick (Sender: TObject);

begin

if DataModule1. IBQuery2. Active=false

then MessageDlg ('oae a', mtWarning, mbOKCancel, 0)

else begin

Edit5. Text: =FloatToStr (StrToFloat (Edit. Text) *StrToFloat ('0,'+Edit4. Text));

end;

end;

end.

unit UZvit2;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Grahics, Controls, Forms,

Dialogs, StdCtrls, Grids, DBGrids, ExtCtrls, ComObj;

tye

TForm10 = class (TForm)

GrouBox1: TGrouBox;

Label2: TLabel;

Label4: TLabel;

DBGrid1: TDBGrid;

Button1: TButton;

Edit1: TEdit;

Edit2: TEdit;

Button2: TButton;

Label1: TLabel;

Label: TLabel;

Edit: TEdit;

anel1: Tanel;

Label5: TLabel;

Edit4: TEdit;

Edit5: TEdit;

Label6: TLabel;

Edit6: TEdit;

Label7: TLabel;

rocedure Button1Click (Sender: TObject);

rocedure FormClose (Sender: TObject; var Action: TCloseAction);

rocedure Button2Click (Sender: TObject);

rivate

{ rivate declarations }

ublic

{ ublic declarations }

end;

var

Form10: TForm10;

sum,sum1,sum2: real;

i: integer;

imlementation

uses Unit1, Urint1;

{$R *. dfm}

Edit6. Text: =FloatToStr (sum2);

end;

end;

for i: =0 to DBGrid1. Columns. Count-1 do

begin

Exc. Cells [1,j]: =DBGrid1. Columns [i]. Title. Cation;

Exc. Cells [1,j]. Font. Bold: = True;

Exc. Cells [1,j]. Font. Size: =12;

j: =j+1;

end;

j: =0;

DataModule1. IBQuery. First;

for i: =1 to DataModule1. IBQuery. RecordCount do

begin

jj: =1;

begin

for j: =0 to DBGrid1. Columns. Count-1 do

begin

Exc. Cells [i+1,jj]: =DBGrid1. Columns [j]. Field. AsString;

jj: =jj+1;

end;

end;

DataModule1. IBQuery. Next;

end;

end;

end;

end.

unit UConnect;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Grahics, Controls, Forms,

Dialogs, StdCtrls, ExtCtrls;

tye

TfmConnect = class (TForm)

GrouBox1: TGrouBox;

RadioGrou1: TRadioGrou;

Button2: TButton;

Button: TButton;

OenDialog1: TOenDialog;

Label1: TLabel;

Label2: TLabel;

Edit1: TEdit;

Edit2. Text: =str2;

CloseFile (tfl);

end;

end.

unit Uassword2;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Grahics, Controls, Forms,

Dialogs, StdCtrls, Mask;

tye

TForm12 = class (TForm)

MaskEdit1: TMaskEdit;

Label1: TLabel;

end.

unit UZminaassword;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Grahics, Controls, Forms,

Dialogs, StdCtrls, Mask;

const

Chars='~EXAOCި,. ! exaocqwertyuio [] \; lkjhgfdsazxcvbnm,. /124567890-=`~! @#$%^&* () _+<>?: |}{MNBVCXZLKJHGFDSAOIUYTREWQ';

tye

TForm1 = class (TForm)

Label1: TLabel;

Label2: TLabel;

Label: TLabel;

MaskEdit1: TMaskEdit;

MaskEdit2: TMaskEdit;

MaskEdit: TMaskEdit;

Button1: TButton;

Button2: TButton;

rocedure Button1Click (Sender: TObject);

rocedure Button2Click (Sender: TObject);

rocedure FormShow (Sender: TObject);

rivate

{ rivate declarations }

ublic

{ ublic declarations }

end;

Wchar=record

C: string [1] ;

end;

var

Form1: TForm1;

assword: string;

SWDChar: array [1. 6] of Wchar;

f2: file of Wchar;

imlementation

uses UAvto, Uassword2;

{$R *. dfm}

rocedure TForm1. Button1Click (Sender: TObject);

var l,r, i: byte;

begin

r: =0;

i: =0;

if MaskEdit1. Text=assword then

begin

if MaskEdit2. Text=MaskEdit. Text then

begin

assword: =MaskEdit2. Text;

Form1. Label2. Cation: =assword;

l: =length (assword);

while i<= do begin

inc (r);

inc (i);

SWDChar [i]. C: =coy (Chars,random (162),1);

inc (i);