unit Udetailcommande;

interface

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

type
  TFdetailcommande = class(TForm)
    DBGrid1: TDBGrid;
    Label1: TLabel;
    DBEdit1: TDBEdit;
    Label2: TLabel;
    Label3: TLabel;
    DBMemo1: TDBMemo;
    Label4: TLabel;
    DBEdit3: TDBEdit;
    DBCheckBox1: TDBCheckBox;
    DateTimePicker1: TDateTimePicker;
    btok: TButton;
    btannuler: TButton;
    btsupprimer: TButton;
    btimprimer: TButton;
    procedure DateTimePicker1Change(Sender: TObject);
    procedure btokClick(Sender: TObject);
    procedure btannulerClick(Sender: TObject);
    procedure btsupprimerClick(Sender: TObject);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;

var
  Fdetailcommande: TFdetailcommande;

implementation
      uses uprinc,udata;
{$R *.dfm}

procedure TFdetailcommande.DateTimePicker1Change(Sender: TObject);
begin
data.TheaderHEA_DATE.Value:=datetimepicker1.DateTime;
end;

procedure TFdetailcommande.btokClick(Sender: TObject);
begin
If (Data.Tdetailcommande.State = DsEdit) or (Data.Tdetailcommande.State = DsInsert)
 then Data.Tdetailcommande.Post;
close;
end;

procedure TFdetailcommande.btannulerClick(Sender: TObject);
begin
data.Tdetailcommande.Cancel;
close;
end;

procedure TFdetailcommande.btsupprimerClick(Sender: TObject);
begin
data.Tdetailcommande.Delete;
end;

end.
