• Nenhum resultado encontrado

Τύπος οντοτήτων Κατηγορία Category (C atcode, C atdescription)

Πρωτεύον Κλειδί: (C atcode)

3. Τύπος οντοτήτων Είδη

Product (Pcode, Pdescription, Pconstruction_date, Pattribute, valueWFPA, FPA, SourceCompany, Fund, Catcode)

Πρωτεύον Κλειδί: (Pcode) Ξένο Κλειδί: Catcode

4. Τύπος οντοτήτων Προμηθευτής

Supplier (Ssurname, Sname, Scode, Saddress, Scity, Semail, Stelephone) Πρωτεύον Κλειδί: (Scode)

Τύπος οντοτήτων Παραγγελία πελάτη Order_Cust (Order_Cust_No, Order_Cust_date, Order_Cust_promised_date, Order_Ccode) Πρωτεύον Kλειδί(Order_Cust_No) Ξένο Κλειδί: Order_Ccode

6. Τύπος οντοτήτων Λεπτομέρειες παραγγελίας πελάτη

Order_Cust_Details (Detail_cust_code, Cust_Details_quantity, Order_Cust_No, Pcode)

Πρωτεύον KλειδL(Detail_code) Ξένα Κλειδιά: Order_Cust_No, Pcode Εναλλακτικό κλειδί: (Order_Cust_No, Pcode) Ανάπτυξη λογισμικού «Electrical Store»

Τύπος οντοτήτων Παραγγελία προς προμηθευτή Order_Suppl (Order_Suppl_No, Order_Suppl_date, _promised_date, Order_Scode)

Πρωτεύον Κλειδί(Οτύοτ_ Suppl _No) Ξένο Κλειδί: Order_Scode

O rder_ Suppl

Τύπος οντοτήτων Λεπτομέρειες παραγγελίας προς προμηθευτή Order_ Suppl _Details (Detail_suppl_code,Suppl _Details_quantity, Order_ Suppl _No, Pcode)

Πρωτεύον Kλειδί(Detail_suppl_code) Ξένα Κλειδιά: Order_ Suppl _No, Pcode Εναλλακτικό ιο\ειδί: (Order_ Suppl _No, Pcode)

Τύπος οντοτήτων Παραστατικό

Receipt (Receipt_No, R_value, R_date, R_datepaid, R_status, Order_Cust_No, Rcatcode)

Πρωτεύον Kλειδί(Receipt _No) Ξένο Κλειδί: Order_Cust_No, Rcatcode

10. Τύπος οντοτήτων Κατηγορία παραστατικού Receipt_Cat (Rcatcode, Rcatdescription) Πρωτεύον Kλειδί(Rcatcode)

Ανάπτυξη λογισμικού «Electrical Store»

12. Τύπος οντοτήτων Αγοράζονται από

Buys (Buy_value, Buy_date, Buy_quantity, Scode, Pcode, Order_Suppl_N o)

Πρωτεύον Κλειδί: (Buy_ d ate, Pcode, Order_Suppl_No) Ξένα Κλειδιά: Scode, Pcode, Order_Suppl_No Εναλλακτικό κλειδί: (Buy_code)

Φ Υ ΣΙΚΗ Σ Χ ΕΔ ΙΑ Σ Η

CREATE TABLE Client

( Csurname VARCHAR(20) NOT NULL, Cname VARCHAR(30) NOT NULL, Ccode BIGINT NOT NULL, Cafm V ARCH AR(ll) NOT NULL, Caddress VARCHAR(30) NOT NULL, Ccity VARCHAR(25) NOT NULL, Ctelephone V A RCH A R(ll) NOT NULL, primary key (Ccode))

CREATE TABLE Category (Catcode BIGINT NOT NULL, Catdescription VARCHAR(50) NOT NULL, Primary key (Catcode))

Ανάπτυξη λογισμικού «Electrical Store»

CREATE TABLE Product ( Pcode BIGINT NOT NULL,

Pdescription VARCHAR(50) NOT NULL, Pconstruction_date ΟΑΤΕΉΜΕ NULL, Pattribute VARCHAR(30) NOT NULL, Value_WFPA BIGINT NOT NULL, Fpa BIGINT NOT NULL,

SourceCompany VARCHAR(30) NOT NULL, Fund BIGINT NOT NULL,

Catcode BIGINT NOT NULL, primary key (Pcode),

Foreign key(Catcode) references Category(Catcode))

CREATE TABLE Supplier ( Ssurname VARCHAR (20) NOT NULL, Sname VARCHAR (20) NOT NULL, Scode BIGINT NOT NULL, Saddress VARCHAR(30) NOT NULL, Scity VARCHAR(25) NOT NULL, Semail VARCHAR(20) NOT NULL, Stelephone V A RCH A R(ll) NOT NULL, primary key (Scode))

CREATE TABLE Order_Cust

(Order_Cust_No INT NOT N ULL ID ENTITY(1,1), Order_Cust_date DATETIME NOT NULL, Order_Cust_promised_date DATETIME NOT NULL,

Order_Ccode BIGINT NOT NULL Foreign key references Client(Ccode) ON DELETE CASCADE,

primary key (Order_Cust_No))

CREATE TABLE Order_Cust_DetaiIs (Order_Cust_No INT NOT NULL, Pcode BIGINT NOT NULL, Cust_DetaiIs_quantity INT NOT NULL, primary key (Order_Cust_No, Pcode),

Foreign key(Order_Cust_No) references Order_Cust (Order_Cust_No) ON DELETE CASCADE,

Foreign key(Pcode) references Product (Pcode)) Ανάπτυξη λογισμικού «Electrical Store»

CREATE TABLE Order_SuppI

(Order_Suppl_No INT NOT NULL IDENT1TY(L 1), Order_Suppl_date DATETIME NOT NULL, Order_Suppl_promised_date DATETIME NOT NULL,

Order_Scode BIGINT NOT NULL Foreign key references Supplier(Scode) ON DELETE CASCADE,

primary key (Order_Suppl_No))

CREATE TABLE Order_Suppl_Details (Order_Suppl_No INT NOT NULL, Pcode BIGINT NOT NULL, Suppl_Details_quantity INT NOT NULL, primary key (Order_Suppl_No, Pcode),

Foreign key(Order_Suppl_No) references Order_SuppI (Order_Suppl_No) ON DELETE CASCADE,

Foreign key(Pcode) references Product (Pcode))

CREATE TABLE Receipt_Cat (Rcatcode BIGINT NOT NULL, Rcatdescription VARCHAR(50) NOT NULL, primary key(Rcatcode))

Ανάπτυξη λογισμικού «Electrical Store»

CREATE TABLE Receipt

(Receipt_No INT NOT NULL IDENTITY(1,1), R_value REAL NOT NULL,

R_date DATETIME NOT NULL, R_datepaid DATETIME NOT NULL, R_status INT NULL,

Order_Cust_No INT NOT NULL, Rcatcode BIGINT NOT NULL,

Primary key (Receipt_No),

Foreign key(Rcatcode) references Receipt_Cat(Rcatcode),

Foreign key(Order_Cust_No) references Order_Cust (Order_Cust_No) ON DELETE CASCADE)

Ανάπτυξη λογισμικού «Electrical Store»

CREATE TABLE Buys

( Buy_code INT NOT NULL IDENT1TY(1,1), Buy_value NUMERIC NOT NULL, Buy_quantity BIGINT NOT NULL, Buy_date DATETIME NULL,

Scode BIGINT NOT N ULL Foreign key references SuppIier(Scode) ON DELETE CASCADE,

Pcode BIGINT NOT NULL, Order_Suppl_No INT NOT NULL, Primary key(Buy_code),

Foreign key(Pcode) references Product(Pcode),

Foreign key (Order_Suppl_No) references Order_SuppI(Order_Suppl_No) ON DELETE NO ACTION)

Ανάπτυξη λογισμικού «Electrical Store»

Ανάπτυξη λογισμικού «Electrical Store»

ΚΩΔΙΚΑΣ ΠΡΟΓΡΑΜΜΑΤΟΣ

Κ εν τρική σ ε λ ίδ α M a in M e n u

#include <v c l .h>

#pragma hdrstop

#include

#include

#include

#include

#include (♦include

#include

#include

#include

#include

#include

#include U---

#pragma package(smart_ind tpragma resource "*.dfm"

Tforml *forml;

"kentrikh.h"

"kentrikh_pelath.h "

"kentrikh_eidi.h"

"kentriki_promhtheuth.h "

"eyrethrioplirofories.h"

"plirofories_eidwn.h"

"stoixeia_ths_apothikis.h"

"paraggelia_pelath.h"

"paraggelia_pros_promhtheuth.h"

"parastatiko.h"

"anektelesto_parastatiko.h"

"agores_apo_promhtheuth.h"

void fastcall Tforml::SpeedButtonlClick(TObject *Sender) 1 ~

kentrikh_pelaths->Show0 ;

void fastcall T f o rmleidhClick(TObject *Sender) 1 ~

kentrikh_eidh->Show0 ;

void fastcall Tforml;;promhtheuthsClick(TObject *Sender) kentrikhjpromhtheuths->Show0 ;

Ανάπτυξη λογισμικού «Electrical Store»

3id __fastcall Tforml:;eurethrioplhroforiesClick(TObjec irethrio_plhrifories->Show0 ;

v o i d __fastcall Tforml::plhroforieseidwnClick(TObject *Sender) {

pliroforieseidwn->Show();

v o i d __fastcall Tforml;;SpeedButtonSClick(TObject ‘Sender) {

stoix_apothikis->Show0 ;

v o i d __fastcall Tforml::BitBtnlClick(TObject ‘Sender) {

kentrikh_j>elaths->Show 0 ;

v o i d __fastcall Tforml::BitBtn2Click(TObject ‘Sender) (

kentrikh_eidh->Show0 ;

void fastcall Tforml::BitBtnSClick(TObject ‘Sender) ( ~

kentrikh_promhtheuths->Show0 ;

v o i d __fastcall Tforml;:BitBtn6Click(TObject ‘Sender) { ~

eurethrio^lhrifories->Show 0 ;

void __fastcall Tforml::BitStnVClick (TObjei { ~

stoix_apothikis->Show0 ;

void fastcall TformlBitBtneciick(TObject ‘Sender) pliroforieseidwn->Show0 ;

Ανάπτυξη λογισμικού «Electrical Store»

v o i d __fastcall Tforml::BitBtnlOClick(TObject *Sender) {

paraggel_pelath->Show{);

v o i d __fastcall Tforml;;BitBtnllClick(TObject *Sender) {

paraggel_pros_promhtheuth->Show{);

void __fastcall TformlBitBtnl2Click(TObjei {

parastatika->Show0 ;

v o i d __fastcall Tforml::BitBtnl3Click(TObject ‘Sender) {

anektel_parastatika->Show();

v o i d __fastcall Tforml;:BitBtnl4Click(TObject ‘Sender) {

agora_apo j>romhtheuth->Show();

Ανάπτυξη λογισμικού «Electrical Store»

Δ ια χ ε ίρ ισ η π ελ ά τη

#include < v c l .h>

#pragma hdrstop

#include "kentrikh.h"

#include "kentrikh_pelath.h"

#include "anazitisi_pelath.h"

#include "eisagwgh_pelath.h"

#include "tropopoihshjielath.h"

#include "diagrafh_pelath.h"

H---

#pragma package(smart_init)

#pragma resource "*.dfm"

Tkentrikh_pelaths *kentrikh_j3elaths ;

v o i d __fastcall Tkentrikh_pelaths:;FormActivate(TObject *Sender) {

Editl8->Visible=false;

Query client->Close();

Query_client->Open0 ; Queryl_update->Close();

Queryl_update->Open0 ; ComboBox3->Clear0 ;

while(!Queryl_update->Eof) {

int code=Queryl_update->FieldByName("Ccode")->AsInteger;

ComboBox3->Iterns->Add(code);

Queryl_update->Next0 ; )

ComboBox3->Vi s ible= true;

void fastcall Tkentrikh_pelaths::SpeedButtonSClick (TObje<

( ^

Table_client->Close();

Ανάπτυξη λογισμικού «Electrical Store»

Table_client->Active=true;

if(Editll->Text.IsEmpty0 || Editl2->Text.IsEmpty() ||Editl3-

>Text.IsEmpty0 || Editl4->Text.IsEmpty() ||Editl5->Text.IsEmpty<) Editl6->Text.IsEmpty0 ||Editl7->Text.IsEmpty())

(MessageBox(0,"Aea ogi aeoaauaP θήΫθ4έ ia ooiaegnueiyi uea 6a aaafia. . . " , "ΒΝΪΑΕΑΪΒΪΕςός . . . " ,MB_ICONINFORMATION) ;

return;}

int code=Editl3->Text.Length 0 ; while(!Queryl_select->Eof)

{

MessageBox (0 , "le u aeeu o o atjfi-raeg ag . . ON) ;

return;

)

Queryl_select->Next() ;

',MB ICONINFORMATI

if((code<2) II (oode>5)) {MessageBox (0 , "Degeonieialioaoa etieio euaeeu. . . . " , "Degnioififia. . . " ,MB_ICONINFORMATION) ;

if((afm<10) I I (afm>10)) (MessageBox(0,"DegeonieiaCoaoa eUeid a o i " D e g n i o i f i B a ...",MB_ICONINFORMATION); re

i f ((telephone<10) || (telephone>10)) (MessageBox (0 , "Degeonieiatoaoa etJeio

ogeYouii "DegnidifiBa..." ,MB_IC0NINF0RMATI0N) ;

else{

Queryl->Params->Items[0]->AsString=Editll->Text;

Queryl->Params->Items[1]->AsStrincr=Editl2->Text;

Queryl->Params->Iterns[2]->AsInteger=Editl3->Text.Toint();

Queryl->Params->Items[3]->AsString=Editl4->Text;

Queryl->Parauns->Iterns [4] ->AsString=Editl5->Text;

Queryl->Params->Iterns[5]->AsString=Editl6->Text;

Queryl->Params->Iterns [6] ->AsStrincr=Editl7->Text;

Ανάπτυξη λογισμικού «Electrical Store»

MessageBox(0,"Adeoo^Co aeoaauat

eaoa^^iigogo. . . ", "DegnioifiBa. . . " ,MB_ICONINFORMATION) ; Editll-

Editl2- EditlS- Editl4- EditlS- Editl6- Editl7- }

Queryl->ExecSQL()

■>Clear 0

■>Clear 0

■>Clear 0

■>Clear ()

■>Clear 0

•>Clear 0

■>Clear 0

QuerY4_update->Close0 ; Query4_update->Open0 ; ComboBox3->Clear0 ; while(!Queryl_update->Eof) {

int code=Queryl_update->FieldByName("Ccode")->AsInteger;

ComboBox3->Items->Add(code);

Queryl_update->Next0 ;

>

ComboBox3->Visible=true;

while{!Query4_update->Eof) t

int code=Query4_update->FieldByName("Ccode")->AsInteger;

ComboBox3->Items->Add(code);

Query4_update->Next0 ; }

ComboBox3->Visible=true;

void fastcall Tkentrikh_pelaths::SpeedButton6Click(TObject *Sender) {

Table_client->Close0; Table_client->Active=true;

if (Editl8->Text.IsEmpty() | IEditl9->Text.IsEmpty() || Edit20-

>Text.IsEmpty0 ||Edit21->Text.IsEmpty() || Edit22->Text.IsEmpty() I |Edit23->Text.IsEmpty() || Edit24->Text.IsEmpty ())

(MessageBox(0,"Aea ogi onidxfliBgog θήΥβΑθ ia ooiflegnuelyi iiea 6a daa&a. . .","ΒΝΪΑΕΑΪΒΪέςός...",MB_ICONINFORMATION);

return;)

Query2_update->Close0 ; Query2_update->Prepare();

Ανάπτυξη λογισμικού «Electrical Store»

if({afm<10) || (afm>10)) {MessageBox(0,"Degeonieiatoaoa aOeio

a o i " D e g f i i o i n B a ...",MB_ICONINFORMATION); return;) i f ((telephone<10) || (telephone>10))

(MessageBox (0 , "Bege5nieial>0a0a etjeio

ogeYouii. ... ", "DegiiioinBa. . . " ,MB_ICONINFORMATION) ; return; ) else{

Query2_update->Params->Items[6]->AsInteger = Editl8->Text.Toint() QuerY2_update->Params->Iterns[0]->AsString = Editl9->Text;

Query2_update->Params->Items[1]->AsString = Edit20->Text;

Query2_update->Params->Items[2]->AsString = Edit21->Text ; Query2_update->Params->Items[3]->AsString = Edit22->Text;

Query2_update->Params->Items[4]->AsString = Edit23->Text;

QuerY2_update->Params->Items[5]->AsString = Edit24->Text ; MessageBox (0 , "Αδέδο-τΡό δήϊθϊβϊβςόρ

ooie-faBui. . . " , "Degnioififla. . . " ,MB_ICONINFORMATION) ; Editl8->Clear0 ;

Editl9->Clear0 ; Edit20->Clear0 ; Edit21->Clear0 ; Edit22->Clear0 ; Edit23->Clear0 ; Edit24->Clear0 ;

)

Query2_update->ExecSQL0

v o i d__fastcall Tkentrikh_pelaths::ComboBox3Change(TObject ‘Sender) (

int kwdiko=ComboBox3->Text.Toint{);

Editl8->Text=kwdiko;

Query3_update->Close0 ;

Query3 update->Params->Iterns[0]->AsInteger=kwdiko ; Query3_update->Open0 ;

while ((Query3_update->Eof)

{String surname=Query3_update->FieldByName("Csurname")->AsString;

Editl9->Text=surname;

String name=Query3_update->FieldByName("Cncune")->AsString;

Edit20->Text=name;

String afm=Query3_update->FieldByNcune("Cafm")->AsString;

Edit21->Text=afm;

Ανάπτυξη λογισμικού «Electrical Store»

string city=Query3_update->FieldBYName("Ccity")->AsString;

Edit23->Text=city;

Query3_update->Next()

void __fastcall Tkentrikh_pelaths::SpeedButton9Click(TObject *Sender) {

if(Edit25->Text.IsEmpty() )

(MessageBox (0, "Aea ogi aeaaSaoC efiY3ae i3ii0al>3i0a ia odiaegntsoaoa 6ii euaeeii. . . " , "ΒΝΪΑΕΑΪΒΪΕςός. . . " ,MB_ICONINFORMATION) ;

return;}

if (MessageBox (0 , "Aflooa ofiaiofiie aea 6gi aeaanaol·? " , "AigiYnuog aeaanaoCo eaoa-r^ngogo" ,MB_YESNO) ==IDYES) ;

{

Query_delete->Close0 ; Query_delete->Prepare() ;

Query_delete->Params->Iterns[0]->AsInteger=Edit25->Text.Toint () ; MessageBox (0 , "ASeooiPo aeaanaol» ooie-rafiui . . . " , "Degnioinfia aeaanaoPo...",MB_ICONINFORMATION);

Edit25->Clear0 ; Query_delete->ExecSQL() ;

Queryl_update->Close0 ; Queryl_update->0pen0 ; CoMboBox3->Clear0 ; while(!Queryl_update->Eof) {

int code=Queryl update->FieldByName("Ccode")->AsInteger;

ComboBox3->Items->Add(code) ; Queryl_update->Next0 ; }

ComboBox3->Visible=true;

void fastcall Tkentrikh_pelaths::BitBtnlClick(TObject ‘Sender) { ~

forinl->Show () ;

Ανάπτυξη λογισμικού «Electrical Store»

Δ ια χ ε ίρ ισ η ε ιδ ώ ν

#include <νο 1 .h>

#pragma hdrstop

#include

#include

#inolude

#include

#include

#include //---

#pragma package(smart_init)

#pragma resource "*.dfm"

Tkentrikh eidh *kentrikh eidh;

'kentrikh.h"

'kentrikh_eidi.h"

'trpopoihsh_eidous.h"

'diagrafi_eidous.h"

'eisagwgh_eidous.h"

'anazitisi eidous.h"

v o i d __fastcall Tkentrikh_eidh;;SpeedButton3Click(TObject *Sender) {

update_eidh->Show0 ;

v o i d __fastcall Tkentrikh_eidh::SpeedButton4Click(TObject *Sender) {

delete_eidh->Show();

v o i d __fastcall Tkentrikh_eidh::SpeedButton2Click(TObject *Sender) {

if (Edit35->Text. IsEmptyO )

(MessageBox (0, "Aea ogi aeaanaoP diiidke idiioaMioa ia ooiaegniJoaoa oii euaeeu...","ΒΝΪΑΕΑΪΒΪΕςός...",MB_ICONINFORMATION);

return;}

"AigiYnuog if (MessageBox(0,"ABooa ofiaxonie aea ogi aeaanaot?' aeaafiadCo eaoa-rjsngogo" ,MB_YESNO) =IDYES) ;

{

Query_cat_deletel->Close() ; Query_cat_deletel->Prepare0 ; Query_cat_delete2->Close0 ; Query_cat_delete2->Prepare0 ;

Query cat deletel->Params->Iterns[0]->AsInteger=Edit35->Text.Toint () Query~cat~delete2->Parajns->Iterns[0]->AsInteger=Edit35->Text.Toint ()

Ανάπτυξη λογισμικού «Electrical Store»

MessageBox (0 , "Αβέδό-Γΐ>ό aeaanaot

ooie^aflui...","DegnioiftBa...",MB_ICONINFORMATION);

Edit35->Clear0 ;

v o i d __fastcall Tkentrikh_eidh:;SpeedButtonlClick(TObject *Sender)

if(Editl6->Text.IsEmptY() || Edit34->Text.IsEmpty() )

{MessageBox(0,"Aea 6gi aeoaauaC eftYflae ia ooiflegfiueiyi iiea 6a aaafia.. . "ΒΝΪΑΕΑΪΒΪέςός...",MB_ICONINFORMATION);

return;)

Query_catcode_select->Close0 ; Query_catcode_select->Open() ; while(!Query_catcode_select->Eof)

{

int bb=Query_catoode_select->FieldBYNaine("Catcode")->AsInteger;

if(bb==Editl6->Text.ToInt() ) {MessageBox (0 , "Ϊ euaeeiid δθϋή-rae gag. . .","Degnidinfla...",MB_ICONINFORMATION) ;

Query catcode_select->Next();

}

int catcode=Editl6->Text.Length 0 ; i f ((catcode<2) || (catcode>5))

{MessageBox (0 , "Dege6niexal>6a6a etJeio euaeeu....","Degnioinfia...",MB_ICONINFORMATION); return;}

Query insert_category->Params->Items[0]->AsInteger=Editl6-

>Text.ToInt 0 ;

Query insert_category->Params->Items[1]->AsString=Edit34->Text;

MessageBox (0 , "Αββδδ-^Οό aeoaauat

ea6at^ng0go.. . "Degnioinfia...",MB_ICONINFORMATION);

Editl6->Clear () ; Edit34->Clear0 ;

)QuerY_insert_category->ExecSQL 0 ;

Ανάπτυξη λογισμικού «Electrical Store»

v o i d __fastcall Tkentrikh_eidh:;FormActivate(TObject ‘Sender) 1

Editl->Visible=false;

Edit2->Visible=false;

Edit4->Visible=false;

update_eidhl_Query->Close0 ; update_eidhl_Query->Open0 ; ComboBox4->Clear();

while(!update_eidhl_Query->Eof) 1

int code=update_eidhl_Query->FieldByName("Pcode")->AsInteger;

ComboBox4->Items->Add(code);

update_eidhl_Query->Next0 ; )

ComboBox4->Visible=true;

update_eidh6_Query->Close0 ; update_eidh6_Query->0pen0 ; ComboBox2->Clear0 ; while(!update_eidh6_Query->Eof) (

int code=update_eidh6_Query->FieldByName("Catcode")->AsInteger;

ComboBox2->Items->Add(code);

update_eidh6_Query->Next0 ; )

ComboBox2->Visible=true;

Query_ana_kathgoria->Close0 ; Query_ana_kathgoria->Open0 ; ComboBoxl->Clear0 ;

while (!Query_ana_kathgoria->Eof) (

String descr=Query_ana_kathgoria

>AsString;

ComboBoxl->Iterns->Add(desor);

Query ana_kathgoria->Next();

•>FieldByName("Catdescription")-

ComboBoxl->Visible=ti

void fastcall Tkentrikh_eidh::SpeedButtonVClick(TObject ‘Sender)

Ανάπτυξη λογισμικού «Electrical Store»

if (Editl5->Text.IsEmptyο || Edit33->Text.IsEmpty() ||Editl7-

>Text.IsEmpty() || Editl8->Text.IsEmpty() ||Editl9->Text.IsEmpty() I Edit20->Text.IsEmpty() | |Edit21->Text.IsEmpty() I I Edit22-

>Text.IsEmpty 0)

{MessageBox(0,"Aea ogi aeoaauat dnYdae ia ooiflegniiexyi tea oa aaaiia. . . "ΒΝΪΑΕΑΪΒΪέςός . . . " ,MB_ICONINFORMATION) ;

Queryl_select_eidh->CloseO ; Queryl_select_eidh->Prepare() ; Query_anazitisi_eidous->Close();

Query_anazitisi_eidous->Open0 ; int bdate=DateTimePicker2->Date;

while{!Query_anazitisi_eidous->Eof) {

int aa=Query_anazitisi_eidous->FieldByName ("Pcode") ->AsInteger;

if(aa==Editl5->Text.ToInt())

{MessageBox (0 , "Ϊ eiiaeeuo όθϋή-rae gag. . . " , "OotJeia aeoaauaPo...",MB_ICONWARNING);

return;}

Query_anazitisi_eidous->Next0 ; )

int code=Editl5->Text.Length 0 ; if((code<2) || (code>5))

(MessageBox (0 , "Degeofiieiatoaoa etJeio euaeeii. ... ", "DftiaeaidiBgog. . . " ,MB_ICONWARNING) ; return;}

int fpa=Edit20->Text.Length();

if((fpa<2) II (fpa>2))

{MessageBox(0,"DegeonieiaPoaoa eOeid ODA. . . . ", "Driiaeaiaiflgog. . . " ,MB_ICONWARNING) ; return;)

int apoth=Edit22->Text.Length();

i f ((apoth>l))

{MessageBox (0 , "Degeonieialioaoa eileio aaiieaia. . . . " , "DfiiaeaiaiBgog. . . " ,MB_ICONWARNING) ; return;)

int apothema=Edit22->Text.Toint();

i f ((apothema<0) I I (apothema>0))

{MessageBox (0 , "DegeonieiaCoaoa eOeio aaiieaia .... Aajs aegeoftieiaaBoa iliii 6i igaai ! " , "DniaeaiaiBgog. . . " ,MB_ICONWARNING) ; return;)

else{

Queryl select eidh->Params->Iterns[0]->AsInteger=Editl5-

>Text.Toint0 ; Queryl_select Queryl_select Query l_select_

Queryl_select

>Text.Toint0 ;

Queryl select_eidh->Params->Iterns[5]->AsInteger=Edit20-

>Text.Toint0 ; Queryl_seleot Queryl_select

>Text.Toint0 ; : eidh-

->Params->Iterns[1] ■ ->Params->Iterns[2] ■ ->Params->Iterns[3]- ->Params->Iterns[4]■

>AsString=Editl7->Text;

>Value= b d a t e ;

>AsStrincp=Editl8->Text;

>AsInteger=Edit19-

Ανάπτυξη λογισμικού «Electrical Store»

Editl5->Clearο Editl7->ClearΟ Editl8->ClearΟ Editl9->ClearΟ Edit20->ClearΟ Edit21->ClearΟ Edit22->ClearΟ Edit33->ClearΟ

Queryl_select_eidh->ExecSQL()

update_eidhl_Query->Close0 ; update_eidhl_Query->Open0 ; ComboBox4->Clear0 ;

while(!update_eidhl_Query->Eof) (

int code=update_eidhl_Query->FieldByName ("Pcode") ->AsInteger;

ComboBox4->Items->Add(code);

update_eidhl_Query->Next0 ; }ComboBox4->Visible=true;

void fastcall Tkentrikh_eidh:;SpeedButtonBClick(TObject ‘Sender)

if (Edit23->Text.IsEmpty0 || Edit24->Text.IsEmpty() ||Edit25-

>Text.IsEmpty0 I I Edit26->Text.IsEmpty() I |Edit27->Text.IsEmpty () Edit28->Text.IsEmpty0 I IEdit29->Text.IsEmpty())

{MessageBox <0, "Aea ogi onifliaiBgog ahYdae ia ooiaegftiieiyi iiea oa aaaBa...","DNIAEAIBIEQOg...",MB_ICONINFORMATION);

update_eidh2_Query->Close0 ; update_eidh2_Query->Prepare {) ; int bdate=DateTimePickerl->Date;

int £pa=Edit28->Text.Length();

if((fpa<2) II (fpa>2))

{MessageBox(0,"DegeoSieiaPoada eaeio

ODA. . . "DegnioiftBa. . .",MB_ICONINFORMATION) ; return;) else(

Ανάπτυξη λογισμικού «Electrical Store»

update_eidh2_Query->Params->Items[0]->AsString = Edit25->Text;

update_eidh2_Query->Paraiiis->Itenis [1] ->Value= bdate;

update_eidh2_Query->Params->Items[2]->AsString = Edit26->Text;

update_eidh2_Query->Parains->Items [3]->AsInteger = Edit27-

>Text.ToInt<) ;

update_eidh2_QuerY->Params->Items[4]->AsIntGger = Edit28-

>Text.ToInt() ;

update_eidh2_Query->Params->Items[5]->AsString = Edit29->Text;

update_eidh2_Query->Params->Iteins[6]->AsString = Edit2->Text.T oint();

MessageBox (0 , "Αθέόό-τΙ>ο όηί δχβί &φός

06ie-afiui. . . "DegfiidifiBa. . . " ,MB_ICONINFORMATION) ; Edit23->Clear0 ;

Edit24->Clear0 ; Edit25->Clear0 ; Edit26->Clear0 ; Edit27->Clear0 ; Edxt28->Clear0 ; Edit29->Clear0 ;

)

update_eidh2_Query->ExecSQL0 ;

v o i d __fastoall Tkentrikh_eidh::ComboBox4Change(TObject «Sender)

update_eidh3_Query->Close0 ;

update eidh3 Query->Parains->Items [0]->AsInteger=kwdiko ; update_eidh3_Query->0pen0 ;

while (!update_eidh3_Query->Eof) 1

string description=update_eidh3_Query->FieldByName("Pdescription") -

>AsString;

Edit25->Text=description;

String attribute=update_eidh3_Query->FieldByName("Pattribute")-

>AsString;

Edit26->Text=attribute;

String ValueWFPA=update_eidh3_Query->FieldByName ("Value_WFPA") -

>AsInteger ,■ Edit27->Text=ValueWFPA;

String fpa=update_eidh3_Query->FieldByName<"Fpa")->AsInteger;

Edit28->Text=fpa;

String sourcecompany=update_eidh3_Query-

>FieldByName("SourceCompany")->AsString;

Edit29->Text=sourcecompany;

Ανάπτυξη λογισμικού «Electrical Store»

update_eidh3_Query->Next ο

int catcode=Edit23->Text.Toint();

Query_select_catdescr->Close() ;

Query_select_catdescr->Params->Items[0]->AsInteger=catcode ; Query_select_catdescr->Open0 ;

while(!Query_select_catdescr->Eof) 1

String catdescr=Query_select_catdesor->FieldByName("Catdescription")-

>AsString;

Edit24->Text=catdescr;

Query_select_catdescr->Next();

) )

v o i d __fastcall Tkentrikh_eidh::SpeedButtonllClick(TObject ‘Sender) {

if(Edit30->Text.IsEmpty() )

{MessageBox(0,"Aea ogi aeaanaot dnYflae ifluoaCdioa ia 00i3egn{30a6a oii euaeeu...","DNIAEAIDIEg0g...",MB_ICONWARNING);

return;)

if (MessageBox (0 , "ASooa ofiaionie aea ogi aeaanaol»? " , "AigiYnuog aeaanaoto eadat^iigogo" ,MB_YESN0) ==IDYES) ;

(

Query_deletel->Close0 ; Query_deletel->Prepare0 ; Query_delete2->Close0 ; Query_delete2->Prepare() ; delete_eidh_Query->Close() ; delete_eidh_Query->Prepare0 ;

Query deletel->Params->Items[0]->AsInteger=Edit30->Text.Toint () ; Query3delete2->Params->Iterns[0]->AsInteger=Edit30->Text.T oint() ; delete eidh_Query->Params->Iterns[0]->AsInteger=Edit30->Text.Toint {) , MessageBox (0 , "Α3έόδ-Ι-Ι>ό aeaanaoC

06ie-afiui...","DegnioinSa...",MB_ICONINFORMATION);

Edit30->Clear0 ; Query_deletel->ExecSQL0 ; Query delete2->ExecSQL() ; delete_eidh_Query->ExecSQL 0

update_eidhl_Query->Close();

update_eidhl_Query->Open();

ComboBox4->Clear0 ;

while(!update_eidhl_Query->Eof) {

int code=update_eidhl Query->FieldByName("Pcode")->AsInteger;

ComboBox4->Items->Add(code);

update_eidhl_Query->Next0 ; )

ComboBox4->Visible=true;

//---

)

v o i d __fastcall Tkentrikh_eidh;:BitBtnlClick(TObject *Sender) {

fonnl->Show () ;

H}---

v o i d __fastcall Tkentrikh_eidhComboBoxlChange(TObject *Sender) {

String descr=ComboBoxl->Text;

Editl->Text=descr;

Query_kathgoria->Close() ;

QuerY_kathgoria->Params->Items[0]->AsString=descr ; QuerY_kathgoria->Open{) ;

ListBoxl->Clear0 ;

while(!Query_kathgoria->Eof) Ανάπτυξη λογισμικού «Electrical Store»

int code=Query_kathgoria->FieldByName("Pcode")->AsInteger;

String attribute=Query_kathgoria->FieldByNaune("Pattribute")-

>AsString;

String description=Query_kathgoria->FieldByName("Pdescription")-

>AsString;

String sourcecompany=Query_kathgoria-

>FieldByName("SourceCompany")->AsString;

int vwfpa=Query_kathgoria->FieldByName("Value_WFPA")->AsInteger ; int fpa=Query_kathgoria->FieldByNeime("Fpa")->AsInteger;

int fund=Query kathgoria->FieldByName("Fund")->AsInteger;

String keno="

String desc_name=keno+code+"

"+description+" "+vwfpa+

"+fund+" "+attribute;

ListBoxl->Items->Add(desc_name);

Query_kathgoria->Next0 ;

'+sourcecompany+"

void fastcall Tkentrikh_eidhSpeedButtonSClick(TObject *Sender) // Table2->Close0 ;

Documentos relacionados