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
| unit Unit42;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, FireDAC.Stan.Intf, FireDAC.Stan.Option,
FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def,
FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.FB,
FireDAC.Phys.FBDef, FireDAC.VCLUI.Wait, FireDAC.Stan.Param, FireDAC.DatS,
FireDAC.DApt.Intf, FireDAC.DApt, Data.DB, FireDAC.Comp.DataSet,
FireDAC.Comp.Client, Vcl.DBCtrls, Vcl.ExtCtrls;
type
TForm42 = class(TForm)
DataSource1: TDataSource;
DBNavigator1: TDBNavigator;
DBLookupComboBox1: TDBLookupComboBox;
FDConnection1: TFDConnection;
FDTable1: TFDTable;
procedure DBNavigator1Click(Sender: TObject; Button: TNavigateBtn);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form42: TForm42;
implementation
{$R *.dfm}
procedure TForm42.DBNavigator1Click(Sender: TObject; Button: TNavigateBtn);
begin
case Button of
nbFirst,
nbPrior,
nbNext ,
nbLast: DBLookupComboBox1.KeyValue:=FDTable1.FieldByName(DBLookupComboBox1.KeyField).Value;
else FDTable1.Cancel;
end;
end;
end. |
Partager