Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
7_Prilozhenie_a.docx
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
43.19 Кб
Скачать

Interface

uses

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

Dialogs, StdCtrls, DB, ADODB, DBCtrls, ExtCtrls, Grids, DBGrids;

type

TForm16 = class(TForm)

DBGrid1: TDBGrid;

DBNavigator1: TDBNavigator;

DBMemo1: TDBMemo;

DBMemo2: TDBMemo;

DBMemo3: TDBMemo;

DBMemo4: TDBMemo;

DataSource1: TDataSource;

ADOConnection1: TADOConnection;

ADODataSet1: TADODataSet;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

procedure FormClose(Sender: TObject; var Action: TCloseAction);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form16: TForm16;

Implementation

uses Unit1;

{$R *.dfm}

procedure TForm16.FormClose(Sender: TObject; var Action: TCloseAction);

begin

form1.show;

end;

end.

unit Unit17;

Interface

uses

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

Dialogs, StdCtrls, ADODB, DB, Grids, DBGrids, Mask;

type

TForm17 = class(TForm)

ADOTable1: TADOTable;

ADOConnection1: TADOConnection;

ADODataSet1: TADODataSet;

Button1: TButton;

Button2: TButton;

Edit1: TEdit;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

DataSource1: TDataSource;

DBGrid1: TDBGrid;

Button3: TButton;

Edit2: TEdit;

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form17: TForm17;

Implementation

uses Unit18, Unit1, Unit13, Unit3, Unit10;

{$R *.dfm}

procedure TForm17.Button1Click(Sender: TObject);

begin

adotable1.First;

while not (adotable1.Eof) do

begin

if (adotable1.FieldByName('login').AsString = edit1.Text)

and (adotable1.FieldByName('parol').AsString = edit2.Text)

then

begin

Label1.Caption := inttostr(adotable1.FieldByName('urov').AsInteger);

break;

end;

adotable1.Next;

form1.show;

form17.Hide;

end;

if Form17.label1.Caption = '2'

then

begin

Form1.N9.visible := false;

end;

if Form17.label1.Caption = '1'

then

begin

Form1.N3.visible := false;

end;

if Form17.label1.Caption = '1'

then

begin

Form1.N4.visible := false;

end;

if Form17.label1.Caption = '2'

then

begin

Form1.N4.visible := false;

end;

if Form17.label1.Caption = '1'

then

begin

Form1.N8.visible := false;

end;

if Form17.label1.Caption = '1'

then

begin

Form1.N8.visible := false;

end;

if Form17.label1.Caption = '1'

then

begin

Form1.N9.visible := false;

end;

if Form17.label1.Caption = '3'

then

begin

Form1.N9.visible := true;

end;

if Form17.label1.Caption = '3'

then

begin

Form1.N10.visible := true;

end;

if Form17.label1.Caption = '2'

then

begin

Form1.N10.visible := true;

end;

if Form17.label1.Caption = '3'

then

begin

Form1.button3.visible := true;

end;

if Form17.label1.Caption = '2'

then

begin

Form1.button3.visible := true;

end;

if Form17.label1.Caption = '2'

then

begin

Form13.button2.visible := true;

end;

if Form17.label1.Caption = '2'

then

begin

Form3.button3.visible := false;

end;

if Form17.label1.Caption = '3'

then

begin

Form13.button3.visible := true;

end;

if Form17.label1.Caption = '3'

then

begin

Form13.button2.visible := true;

end;

if Form17.label1.Caption = '3'

then

begin

Form10.button2.visible := true;

end;

end;

procedure TForm17.Button2Click(Sender: TObject);

begin

form18.show;

form18.adodataset1.append;

end;

procedure TForm17.Button3Click(Sender: TObject);

begin

label1.Caption := '1';

form1.Show;

form17.Hide;

if Form17.label1.Caption = '1'

then

begin

Form1.N3.visible := false;

end;

if Form17.label1.Caption = '1'

then

begin

Form1.N4.visible := false;

if Form17.label1.Caption = '1'

then

begin

Form1.N8.visible := false;

end;

if Form17.label1.Caption = '1'

then

begin

Form1.N8.visible := false;

end;

if Form17.label1.Caption = '1'

then

begin

Form1.N9.visible := false;

end;

if Form17.label1.Caption = '1' then

begin

Form3.Button2.Visible := false ;

end;

if Form17.Label1.caption = '1' then

begin

form3.Button3.Visible := false;

end;

if Form17.label1.Caption = '2' then

begin

Form10.Button3.Visible := false ;

end;

end;

end;

end.

unit Unit18;

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]