Смекни!
smekni.com

Автоматизация работы агентства по продаже авиабилетов (стр. 9 из 10)

Ïðèëîæåíèå áûëî âûïîëíåíî íà äàííûõ êîíòðîëüíîãî ïðèìåðà. Ïîëó÷åííûå ðåçóëüòàòû ïîëíîñòüþ ñîâïàëè ñ ïîëó÷åííûìè äàííûìè êîíòðîëüíîãî ïðèìåðà.

ÏÐÈËÎÆÅÍÈß

Íàèìåíîâàíèå ïðîãðàììíîãî ïðîäóêòà – «Àâòîìàòèçàöèÿ àãåíòñòâà ïî ïðîäàæå àâèàáèëåòîâ» («Agentstvo.exe»)

Ïîñòàâùèê – Êîíêèí Ä. È.

Äàòà ðàçðàáîòêè – 30.05.07ã.

Äàòà âûïóñêà – 30.05.07 ã.

Äàííàÿ ïðîãðàììà çàíèìàåò íà äèñêå 2,3 Ìá

Àäðåñ ïîñòàâùèêà – ã. Óôà, Ëåâ÷åíêî, 8 - 100

Îñíîâíîé çàäà÷åé ïðîãðàììíîãî ïðîäóêòà ÿâëÿåòñÿ – îáëåã÷åíèå ðàáîòû êàññèðà â àãåíòñòâå.

Àâòîðîì ïðîãðàììû ÿâëÿåòñÿ Êîíêèí Äìèòðèé Èãîðåâè÷, êîòîðûé îáó÷àåòñÿ â ÃÎÓ ÓÊÑÈÂÒ ïî ñïåöèàëüíîñòè "Ïðîãðàììíîå îáåñïå÷åíèå ÂÒ è ÀÑ", â ãðóïïå 3Ï-4

unit Unit13;

interface

uses

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

Dialogs, jpeg, ExtCtrls, StdCtrls, Menus, DB, DBTables;

type

TForm13 = class(TForm)

TableReis: TTable;

Tablerasp: TTable;

MainMenu1: TMainMenu;

N1: TMenuItem;

N2: TMenuItem;

N3: TMenuItem;

N4: TMenuItem;

N5: TMenuItem;

N6: TMenuItem;

procedure N1Click(Sender: TObject);

procedure N4Click(Sender: TObject);

procedure N3Click(Sender: TObject);

procedure N5Click(Sender: TObject);

procedure N6Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form13: TForm13;

implementation

uses Unit1, Unit10, Unit3, Unit7;

{$R *.dfm}

procedure TForm13.N1Click(Sender: TObject);

begin

form1.show;

end;

procedure TForm13.N4Click(Sender: TObject);

begin

form10.show

end;

procedure TForm13.N3Click(Sender: TObject);

begin

form3.show;

end;

procedure TForm13.N5Click(Sender: TObject);

begin

Form7.show;

end;

procedure TForm13.N6Click(Sender: TObject);

begin

if MessageDlg('Âû äåéñòâèòåëüíî õîòèòå âûéòè?',mtWarning,mbOKCancel,1)=1

then Close;

end;

end.

unit Unit1;

interface

uses Unit2, Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,

Dialogs, Grids, DBGrids, Db, DBTables, ExtCtrls, DBCtrls, StdCtrls,

Menus, jpeg;

type

TForm1 = class(TForm)

DBGrid1: TDBGrid;

DBNavigator1: TDBNavigator;

MainMenu1: TMainMenu;

N1: TMenuItem;

N3: TMenuItem;

N4: TMenuItem;

N8: TMenuItem;

DBNavigator3: TDBNavigator;

DBGrid2: TDBGrid;

N6: TMenuItem;

Button1: TButton;

Button2: TButton;

Table1: TTable;

GroupBox1: TGroupBox;

GroupBox2: TGroupBox;

procedure N8Click(Sender: TObject);

procedure N3Click(Sender: TObject);

procedure N4Click(Sender: TObject);

procedure Image1Click(Sender: TObject);

procedure Label3Click(Sender: TObject);

procedure N9Click(Sender: TObject);

procedure N10Click(Sender: TObject);

procedure N6Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

implementation

uses Unit13, Unit10, Unit3, Unit7, Unit9, Unit8;

{uses Unit1, Unit3, Unit4, Unit7, DBTables, Unit8, Unit9, Unit5, Unit6, Unit10,

Unit13;

}

{$R *.dfm}

procedure TForm1.N8Click(Sender: TObject);

begin

form13.close;

end;

procedure TForm1.N3Click(Sender: TObject);

begin

form10.show;

end;

procedure TForm1.N4Click(Sender: TObject);

begin

form3.Show;

end;

procedure TForm1.Image1Click(Sender: TObject);

begin

Form7.Show;

end;

procedure TForm1.Label3Click(Sender: TObject);

begin

Form7.Show;

end;

procedure TForm1.N9Click(Sender: TObject);

begin

Form9.show;

end;

procedure TForm1.N10Click(Sender: TObject);

Var Krit:string;

begin

Krit:=InputBox('Ôèëüòðàöèÿ','Ôèëüòðîâàòü ïî ïóíêòó îòïðàâëåíèÿ:','') ;

With DataModule2.TableReis do

begin

Filter:='punkt_naznach='''+Krit+'*''';

filtered:=true;

end;

end;

procedure TForm1.N6Click(Sender: TObject);

begin

Form8.show;

end;

procedure TForm1.Button2Click(Sender: TObject);

begin

DataModule2.TableRasp.MasterFields:='';

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

with DataModule2 do

begin

TableRasp.MasterSource:=DSReis;

TableRasp.IndexName:='ind_nomer';

TableRasp.MasterFields:='Nomer_reisa';

end;

end;

end.

unit Unit2;

interface

uses

SysUtils, Classes, DB, DBTables;

type

TDataModule2 = class(TDataModule)

TableReis: TTable;

TableRasp: TTable;

TableSamol: TTable;

TablePassagiry: TTable;

DSReis: TDataSource;

DSRasp: TDataSource;

DSsamol: TDataSource;

DSPassagiry: TDataSource;

TableSamPasPromeg: TTable;

TableSamRaspPromeg: TTable;

DSSamPasProm: TDataSource;

DSSamRaspPromeg: TDataSource;

TableSamolKod_samoleta: TAutoIncField;

TableSamolTip_samoleta: TStringField;

TableSamolKol_vo_mest: TSmallintField;

TableSamPasPromegKod_samoleta: TSmallintField;

TableSamPasPromegKod_passagira: TFloatField;

TableRaspKod_reisa: TSmallintField;

TableRaspNomer_reisa: TFloatField;

TableRaspKod_samoleta: TSmallintField;

TableRaspData_otpravleniya: TDateField;

TableRaspDen_otpravleniya: TStringField;

TableRaspVremya_otpravleniya: TTimeField;

TableRaspData_pribytiya: TDateField;

TableRaspDen_pribytiya: TStringField;

TableRaspVremya_pributiya: TTimeField;

TableReisNomer_reisa: TAutoIncField;

TableReisPunkt_otpravl: TStringField;

TableReisPunkt_naznach: TStringField;

TableReisCena_bileta: TCurrencyField;

TableReisVremya_poleta: TTimeField;

TableDocument: TTable;

DSDocum: TDataSource;

TablePassagiryKod_passagira: TAutoIncField;

TablePassagiryFIO: TStringField;

TablePassagiryDocument: TStringField;

TablePassagirySeriyanomer: TStringField;

TablePassagiryMesto: TSmallintField;

TablePassagiryKlass: TStringField;

TablePassagiryKod_reisa: TFloatField;

procedure TableRaspCalcFields(DataSet: TDataSet);

private

{ Private declarations }

public

{ Public declarations }

end;

var

DataModule2: TDataModule2;

implementation

{$R *.dfm}

procedure TDataModule2.TableRaspCalcFields(DataSet: TDataSet);

Var Kol:integer;

begin

DataModule2.TableRasp.FieldByName('').AsString:='';

end;

end.

unit Unit3;

interface

uses

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

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

type

TForm3 = class(TForm)

Button1: TButton;

Button2: TButton;

LabeledEdit1: TLabeledEdit;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form3: TForm3;

implementation

uses Unit5, Unit6, Unit1;

{$R *.dfm}

procedure TForm3.Button1Click(Sender: TObject);

begin

if LabeledEdit1.Text='1' then Form6.show

else begin ShowMessage('Ïàðîëü íåâåðíûé');

LabeledEdit1.Text:='';

Form3.Hide;

form1.show;

end;

Form3.Hide;

end;

procedure TForm3.Button2Click(Sender: TObject);

begin

Form3.Hide;

end;

end.

unit Unit5;

interface

uses

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

Dialogs,Unit2, ExtCtrls, DBCtrls, Grids, DBGrids, Menus, StdCtrls;

type

TForm5 = class(TForm)

DBGrid1: TDBGrid;

DBNavigator1: TDBNavigator;

DBGrid2: TDBGrid;

DBNavigator2: TDBNavigator;

DBGrid4: TDBGrid;

DBNavigator4: TDBNavigator;

MainMenu1: TMainMenu;

N3: TMenuItem;

RadioGroup1: TRadioGroup;

RadioGroup2: TRadioGroup;

Edit1: TEdit;

Label5: TLabel;

N2: TMenuItem;

N7: TMenuItem;

Button1: TButton;

Button2: TButton;

Button3: TButton;

Button4: TButton;

N1: TMenuItem;

N4: TMenuItem;

N5: TMenuItem;

N6: TMenuItem;

N8: TMenuItem;

N9: TMenuItem;

N10: TMenuItem;

procedure N3Click(Sender: TObject);

procedure N4Click(Sender: TObject);

procedure Label4Click(Sender: TObject);

procedure N5Click(Sender: TObject);

procedure RadioGroup1Click(Sender: TObject);

procedure RadioGroup2Click(Sender: TObject);

procedure N2Click(Sender: TObject);

procedure N6Click(Sender: TObject);

procedure N7Click(Sender: TObject);

procedure CheckBox2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

procedure Button4Click(Sender: TObject);

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form5: TForm5;

implementation

uses Unit10, Unit1, DBTables, DateUtils, Unit11;

{$R *.dfm}

procedure TForm5.N3Click(Sender: TObject);

begin

Form1.Close;

end;

procedure TForm5.N4Click(Sender: TObject);

begin

RadioGroup2.Visible:=True;

end;

procedure TForm5.Label4Click(Sender: TObject);

begin

Form5.Hide;

Form1.Show;

end;

procedure TForm5.N5Click(Sender: TObject);

begin

RadioGroup1.Visible:=True;

end;

procedure TForm5.RadioGroup1Click(Sender: TObject);

Var Fam,Klass:string;

begin

case RadioGroup1.ItemIndex of

0:with DataModule2.TablePassagiry do

begin

Fam:=InputBox('Àãåíòñòâî ïî ïðîäàæå àâèàáèëåòîâ','Ôèëüòðîâàòü ïî ÔÈÎ:','') ;

begin

Filter:='fio='''+Fam+'*''';

filtered:=true;

end;

end;

1: with DataModule2.TablePassagiry do

begin

KLass:=InputBox('Àãåíòñòâî ïî ïðîäàæå àâèàáèëåòîâ','Ôèëüòðîâàòü ïî êëàññó:','') ;

begin

Filter:='klass='''+KLass+'*''';

filtered:=true;

end;

end;

2:DataModule2.TablePassagiry.Filtered:=False;

end;

end;

procedure TForm5.RadioGroup2Click(Sender: TObject);

begin

With DataModule2.TablePassagiry do

Case RadioGroup2.ItemIndex of

0:IndexName:='';

1:IndexName:='ind_fio';

2:IndexName:='ind_kodReisa';

end;

end;

procedure TForm5.N2Click(Sender: TObject);

begin

Edit1.Visible:=true;

Label5.Visible:=true;

With DataModule2.TablePassagiry do

begin

IndexName:='Ind_nomer';

FindNearest([Edit1.Text]);

end;

end;

procedure TForm5.N6Click(Sender: TObject);

Var fio:string;

begin

Fio:=InputBox('Àãåíòñòâî ïî ïðîäàæå àâèàáèëåòîâ','Ïîèñê ïî ôàìèëèè:','');

DataModule2.TablePassagiry.Locate('fio',fio,[{loPartiaiKey}]);

end;

procedure TForm5.N7Click(Sender: TObject);

begin

DataModule2.TablePassagiry.Append;

form11.show;

end;

procedure TForm5.CheckBox2Click(Sender: TObject);

begin

with DataModule2 do

begin

TablePassagiry.MasterSource:=DSRasp;

TableRasp.IndexName:='ind_kod';

TableRasp.MasterFields:='kod_reisa';

end

end;

procedure TForm5.Button3Click(Sender: TObject);

begin

with DataModule2 do begin

TablePassagiry.MasterSource:=DSRasp;

TablePassagiry.IndexName:='ind_kodReisa';

TablePassagiry.MasterFields:='kod_reisa';

end;

end;

procedure TForm5.Button4Click(Sender: TObject);

begin

DataModule2.TablePassagiry.MasterFields:='';

end;

procedure TForm5.Button1Click(Sender: TObject);