unit Unit3;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, HTMLHelpViewer;
type
TFAuth = class(TForm)
Edit1: TEdit;
Label1: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FAuth: TFAuth;
implementation
{$R *.dfm}
uses Unit2;
procedure TFAuth.Button1Click(Sender: TObject);
begin
with FStart.ADOQTest do
begin
SQL.Clear;
SQL.Add('SELECT * FROM Code');
Active := TRUE;
if (Edit1.Text = FieldByName('Parol').AsString) then
begin
FStart.BNew.Visible := TRUE;
FStart.BDel.Visible := TRUE;
FStart.BRes.Visible := TRUE;
FAuth.Close;
end
else
ShowMessage('Неверный пароль!');
end;
end;
end.
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, HTMLHelpViewer;
type
TFAuth = class(TForm)
Edit1: TEdit;
Label1: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FAuth: TFAuth;
implementation
{$R *.dfm}
uses Unit2;
procedure TFAuth.Button1Click(Sender: TObject);
begin
with FStart.ADOQTest do
begin
SQL.Clear;
SQL.Add('SELECT * FROM Code');
Active := TRUE;
if (Edit1.Text = FieldByName('Parol').AsString) then
begin
FStart.BNew.Visible := TRUE;
FStart.BDel.Visible := TRUE;
FStart.BRes.Visible := TRUE;
FAuth.Close;
end
else
ShowMessage('Неверный пароль!');
end;
end;
end.
Соседние файлы в папке Курсовая ( Мюнсберга и Когана )