unit Unit13;

interface

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

type
  TForm13 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Button1: TButton;
    Button2: TButton;
    ADOConnection1: TADOConnection;
    DataSource2: TDataSource;
    DataSource1: TDataSource;
    ADOTable3: TADOTable;
    ADOTable3FIO: TWideStringField;
    ADOTable3Spec: TWideStringField;
    ADOTable3Kurs: TSmallintField;
    ADOTable3Prav: TSmallintField;
    ADOTable3NePrav: TSmallintField;
    ADOTable3Ocenka: TSmallintField;
    ADOTable3Data: TDateTimeField;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form13: TForm13;
  s:String;
b:Integer;
oc:Integer;
kurs:integer;
implementation

uses Unit1, Unit6, Unit12, Unit11;

{$R *.dfm}

procedure TForm13.Button1Click(Sender: TObject);
begin
{kurs:=StrToInt(AddUser.MaskEdit3.Text);
b:=StrToInt(Label1.Caption);
oc:=StrToInt(Label2.Caption);}


ADOTable3.Insert;
  With ADOTable3 do
    Begin
      Insert;
      FieldByName('FIO').AsString:= AddUser.Edit1.Text+' '+AddUser.Edit3.Text;
     // FieldByName('Spec').AsString:= AddUser.Edit2.Text;
      //FieldByName('Kurs').AsInteger:= kurs;
     // FieldByName('Prav').AsInteger:= b;
     // FieldByName('NePrav').AsInteger:= 50-b;
     // FieldByName('Ocenka').AsInteger:=oc;
      FieldByName('data').AsString:= DateToStr(Date);
      Post;
    end;
Close;
end;

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

procedure TForm13.FormClose(Sender: TObject; var Action: TCloseAction);
begin
form13.close;
end;

procedure TForm13.FormCreate(Sender: TObject);
begin
AddUser.MaskEdit3.Text:=IntToStr(kurs);
Label1.Caption:=IntToStr(b);
Label2.Caption:=IntToStr(oc);

end;

procedure TForm13.FormActivate(Sender: TObject);
begin
//ADOConnection1.Connected:=False;
ADOConnection1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Учебник\Data\Base.mdb;Persist Security Info=False';
ADOConnection1.Connected:=True;
//ADOTable1.Active:=True;
//ADOTable2.Active:=True;
ADOTable3.Active:=True;
end;

end.
 