Контрольная работа: Інформаційна система будівельної організації
then Memo1.Lines.LoadFromFile(OpenDialog1.FileName);
end;
procedure TForm3.N2Click(Sender: TObject);
begin
close();
end;
procedure TForm3.FormCreate(Sender: TObject);
begin
ShowMessage('Anisimov Andriy');
end;
end.
unit Unit4;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Menus, DB, ADODB, Grids, DBGrids;
type
TForm4 = 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; Button3: TButton; procedure Button3Click(Sender: TObject); procedure Button1Click(Sender: TObject); procedure N2Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form4: TForm4;
implementation
{$R *.dfm}
procedure TForm4.Button3Click(Sender: TObject);
begin
Memo1.ReadOnly:=true;
openDialog1.Filter:='Текстові файли|*.txt';
if OpenDialog1.Execute and FileExists (OpenDialog1.FileName)
then Memo1.Lines.LoadFromFile(OpenDialog1.FileName);
end;
procedure TForm4.Button1Click(Sender: TObject);
begin
ADOQuery1.close; {Деактивируем запрос в качестве одной из мер предосторожности }