unit Unit4;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm4 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Button1: TButton;
    Button2: TButton;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form4: TForm4;

implementation

uses Unit3, Unit1;

{$R *.dfm}

procedure TForm4.FormClose(Sender: TObject; var Action: TCloseAction);
begin
form3.close;
halt;
end;

procedure TForm4.Button2Click(Sender: TObject);
begin
halt;
end;

procedure TForm4.Button1Click(Sender: TObject);
begin
//Form3.Hide;
//Form4.Hide;


Form1.ADOTable3.Insert;
  With Form1.ADOTable3 do
    Begin
      Insert;
      FieldByName('FIO').AsString:= form1.Memo1.Text;
//      FieldByName('Spec').AsString:= TmpUser.Spec;
  //    FieldByName('Kurs').AsInteger:= TmpUser.Kurs;
      FieldByName('Prav').AsInteger:= b;
      FieldByName('NePrav').AsInteger:= 50-b;
      FieldByName('Ocenka').AsInteger:=oc;
      FieldByName('data').AsString:= DateToStr(Date);
      Post;
    end;
Close;

//Form2.Show;
end;

end.
