Курсовой проект по дисциплине: Основы алгоритмизации и программирования
Пояснительная записка
ВГПК.2- 400101.К11.024-ПЗ
Исполнитель:
Учащаяся группы 11 – ПЗз18
Вишнякова А.А.
Руководитель проекта:
Тыбербай С.Г.
«»
Нормоконтролер:
Тыбербай С.Г.
«»
Г.
Министерство образования Республики Беларусь УО «Витебский государственный политехнический колледж учреждения образования Витебский государственный технологический университет»
Специальность 2 - 400101
УТВЕРЖДЕНО
ВГПК.2-400101.К11.024-ПЗ
ПРОГРАММА
Информационно – поисковая система «Базы отдыха Беларуси»
Курсовой проект по дисциплине: Основы алгоритмизации и программирования
Пояснительная записка
ВГПК.2- 400101.К11.024-ПЗ
Листов 25
2017 г.
ВГПК.400101.К11.024-ПЗ
Приложение А
Текст программы
Form1
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls;
type
TForm1 = class(TForm)
img1: TImage;
pb1: TProgressBar;
tmr1: TTimer;
btn1: TButton;
procedure btn1Click(Sender: TObject);
procedure tmr1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
begin
tmr1.Enabled:=True;
end;
ВГПК.400101.К11.024-ПЗ
procedure TForm1.tmr1Timer(Sender: TObject);
begin
pb1.Position:=pb1.Position+1;
if pb1.Position=pb1.Max then
begin
tmr1.Enabled:=False;
form2.show;
end;
end;
end.
Form 2
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DBCtrls, DB, ADODB, ExtCtrls, Grids, DBGrids, StdCtrls, Menus, Unit4, Unit5;
type
TForm2 = class(TForm)
pnl1: TPanel;
pnl2: TPanel;
btnizmenit: TButton;
btndobavit: TButton;
lbl1: TLabel;
edt1: TEdit;
btnnaidi: TButton;
bvl1: TBevel;
bvl2: TBevel;
lbl2: TLabel;
dbgrd1: TDBGrid;
img1: TImage;
con1: TADOConnection;
bookname: TADOTable;
ds1: TDataSource;
dbnvgr1: TDBNavigator;
|
booknameDSDesigner: TWideStringField;
booknameDSDesigner2: TWideStringField;
ВГПК.400101.К11.024-ПЗ
booknameDSDesigner3: TWideStringField;
booknameEmail: TWideStringField;
booknameDSDesigner4: TWideStringField;
booknameDSDesigner5: TWideStringField;
booknameDSDesigner6: TMemoField;
booknameDSDesigner7: TMemoField;
booknameDSDesigner8: TMemoField;
booknameDSDesigner9: TBlobField;
booknameDSDesigner10: TIntegerField;
btn1: TButton;
edt2: TEdit;
procedure N4Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure btndobavitClick(Sender: TObject);
procedure btnizmenitClick(Sender: TObject);
procedure btnydaliClick(Sender: TObject);
procedure btn1Click(Sender: TObject);
procedure lbl2Click(Sender: TObject);
procedure btnnaidiClick(Sender: TObject);
procedure edt2Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses
Unit3;
{$R *.dfm}
procedure TForm2.N4Click(Sender: TObject);
begin
feditor.Show;
end;
ВГПК.400101.К11.024-ПЗ
procedure TForm2.N3Click(Sender: TObject);
begin
Form2.bookname.Append;
feditor.Show;
end;
procedure TForm2.btndobavitClick(Sender: TObject);
begin
Form2.bookname.Append;
feditor.Show;
end;
procedure TForm2.btnizmenitClick(Sender: TObject);
begin
feditor.Show;
end;
procedure TForm2.btnydaliClick(Sender: TObject);
begin
Form4.Show;
end;
procedure TForm2.btn1Click(Sender: TObject);
begin
Form4.Show;
end;
procedure TForm2.lbl2Click(Sender: TObject);
begin
Form5.Show;
end;
procedure TForm2.btnnaidiClick(Sender: TObject);
begin
if not bookname.Locate('Город',edt1.Text,[loCaseInsensitive,loPartialKey])then
ShowMessage('Запись не найдена');
end;
procedure TForm2.edt2Change(Sender: TObject);
ВГПК.400101.К11.024-ПЗ
begin
if edt2.Text<>''then
begin
bookname.Filtered:=False;
bookname.Filter:='[Город]'+ #39 + '%'+ edt2.Text + '%'+ #39;
bookname.Filtered:=true;
end
else
bookname.Filtered:=False;
end;
end.
Form 3
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DBCtrls, Mask;
type
Tfeditor = class(TForm)
grp1: TGroupBox;
lbl1: TLabel;
lbl2: TLabel;
lbl3: TLabel;
lbl4: TLabel;
lbl5: TLabel;
lbl6: TLabel;
lbl7: TLabel;
dbedt1: TDBEdit;
dbedt2: TDBEdit;
dbedt3: TDBEdit;
dbedt4: TDBEdit;
dbedt5: TDBEdit;
dbmmo1: TDBMemo;
dbimg1: TDBImage;
btnotmena: TButton;
|
btnsohr: TButton;
ВГПК.400101.К11.024-ПЗ
procedure btnotmenaClick(Sender: TObject);
procedure btnsohrClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
feditor: Tfeditor;
implementation
uses
Unit2;
{$R *.dfm}
procedure Tfeditor.btnotmenaClick(Sender: TObject);
begin
feditor.Close;
end;
procedure Tfeditor.btnsohrClick(Sender: TObject);
begin
if Form2.bookname.Modified then
Form2.bookname.Post;
feditor.Close;
end;
end.
Form 4
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
ВГПК.400101.К11.024-ПЗ
type
TForm4 = class(TForm)
lbl1: TLabel;
btn1: TButton;
btn2: TButton;
procedure btn2Click(Sender: TObject);
procedure btn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
uses
Unit2;
{$R *.dfm}
procedure TForm4.btn2Click(Sender: TObject);
begin
Form4.Close;
end;
procedure TForm4.btn1Click(Sender: TObject);
begin
Form2.bookname.Delete;
Form4.Close;
end;
end.
Form 5
unit Unit5;
interface
uses
ВГПК.400101.К11.024-ПЗ
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DBCtrls, Mask, ExtCtrls;
type
TForm5 = class(TForm)
lbl1: TLabel;
lbl2: TLabel;
lbl3: TLabel;
dbedt1: TDBEdit;
dbmmo1: TDBMemo;
btn1: TButton;
dbimg1: TDBImage;
procedure btn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form5: TForm5;
implementation
uses
Unit2;
{$R *.dfm}
procedure TForm5.btn1Click(Sender: TObject);
begin
Form5.Close;
end;
end.