Контрольная работа: Інформаційна система будівельної організації
form4.ShowModal;
end;
end.
unit Unit2;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, jpeg;
type TForm2 = class(TForm) Image1: TImage; Timer1: TTimer; procedure Image1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Image1Click(Sender: TObject);
begin
close;
end;
end.
unit Unit3;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Menus, DB, ADODB, Grids, DBGrids;
type TForm3 = class(TForm) Label1: TLabel; DBGrid2: TDBGrid; ADOConnection1: TADOConnection; ADOConnection2: TADOConnection;
ADOTable1: TADOTable; ADOQuery1: TADOQuery; DataSource1: TDataSource; DataSource2: TDataSource; MainMenu1: TMainMenu; File1: TMenuItem; N1: TMenuItem; N2: TMenuItem; OpenDialog1: TOpenDialog; SaveDialog1: TSaveDialog; Label2: TLabel; Button1: TButton; Memo1: TMemo; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; procedure Button1Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure N2Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form3: TForm3;
implementation
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject);
begin
ADOQuery1.close; {Деактивируем запрос в качестве одной из мер предосторожности }
ADOQuery1.SQL.Clear; {Стираем любой предыдущий запрос}
If Memo1.Lines[0] <> '' {Проверяем на предмет пустого ввода} then
ADOQuery1.SQL.Add(Memo1.Text) {Назначаем свойству SQL текст Memo}