unit Ufichebusdetail;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DBCtrls, StdCtrls, Mask,db, ExtCtrls;

type
  TFfichebusdetail = class(TForm)
    Label1: TLabel;
    DBEdit1: TDBEdit;
    Label2: TLabel;
    DBEdit2: TDBEdit;
    Label3: TLabel;
    DBEdit3: TDBEdit;
    Label4: TLabel;
    DBEdit4: TDBEdit;
    Label5: TLabel;
    DBEdit5: TDBEdit;
    Label8: TLabel;
    DBLookupComboBox1: TDBLookupComboBox;
    Label9: TLabel;
    DBLookupComboBox2: TDBLookupComboBox;
    Panel1: TPanel;
    btnok: TButton;
    btannuler: TButton;
    procedure btnokClick(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure btannulerClick(Sender: TObject);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;

var
  Ffichebusdetail: TFfichebusdetail;

implementation

uses Udata, Uprinc;

{$R *.dfm}

procedure TFfichebusdetail.btnokClick(Sender: TObject);
begin
data.Tbus.Filtered := false;
data.Tbus.IndexName := 'ibus_pk';
If (Data.Tbus.State = DsEdit) or (Data.Tbus.State = DsInsert) then Data.Tbus.Post;
close;

end;

procedure TFfichebusdetail.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
Fprinc.CalculEntretienControle(Sender);
end;

procedure TFfichebusdetail.btannulerClick(Sender: TObject);
begin
data.tbus.cancel;
close;
end;

end.
