1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, StdCtrls, Buttons, Mask, DBCtrls, DB, DBTables,
ExtCtrls;
type
TForm2 = class(TForm)
GroupBox1: TGroupBox;
DBGrid1: TDBGrid;
Query1: TQuery;
GroupBox2: TGroupBox;
BitBtn1: TBitBtn;
emodeles: TLabeledEdit;
edmarques: TLabeledEdit;
GroupBox3: TGroupBox;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
Label1: TLabel;
Label2: TLabel;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form2: TForm2;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm2.BitBtn1Click(Sender: TObject);
begin
query1.Active:=false;
query1.ParamByName('pmarques').AsString:=edmarques.Text;
query1.ParamByName('pmodeles').AsString:=emodeles.Text;
query1.ExecSQL;
form1.ttyportable.Active:=false;
form1.ttyportable.Active:=true
end;
procedure TForm2.BitBtn2Click(Sender: TObject);
begin
form1.ttyportable.Active:=false;
form1.ttyportable.Active:=true
end;
end. |
Partager