unit Unit5;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Grids, DBGrids, ExtCtrls, StdCtrls;

type
  TTestare = class(TForm)
    Panel1: TPanel;
    DBGrid1: TDBGrid;
    Panel2: TPanel;
    Panel3: TPanel;
    DBGrid2: TDBGrid;
    Panel4: TPanel;
    Panel5: TPanel;
    Label1: TLabel;
    Button1: TButton;
    Button2: TButton;
    procedure DBGrid1KeyUp(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure DBGrid1ColEnter(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Testare: TTestare;

implementation

uses Unit3, Unit1, Unit6;

{$R *.DFM}

procedure TTestare.DBGrid1KeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
dm.teste.Filtered:=false;
dm.teste.Filter:='cod_lect='+inttostr(dm.lectii['cod']);
dm.teste.Filtered:=true;
end;

procedure TTestare.DBGrid1ColEnter(Sender: TObject);
begin
dm.teste.Filtered:=false;
dm.teste.Filter:='cod_lect='+inttostr(dm.lectii['cod']);
dm.teste.Filtered:=true;
end;

procedure TTestare.Button1Click(Sender: TObject);
begin
mainform.enabled:=true;
testare.close;
end;

procedure TTestare.FormShow(Sender: TObject);
begin
mainform.enabled:=false;
end;

procedure TTestare.Button2Click(Sender: TObject);
begin
dm.itemi.First;
testare.Enabled:=false;
rasp.show;
end;

procedure TTestare.FormClose(Sender: TObject; var Action: TCloseAction);
begin
mainform.enabled:=true;
end;

end.
