www.pudn.com > Source.rar > Unit17.pas, change:2007-02-04,size:1355b


unit Unit17; 
 
interface 
uses Windows,Messages, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, 
  Buttons, ExtCtrls, Grids, DBGrids, dblookup,shellApi, DBTables,Dialogs, 
  jpeg; 
 
 
type 
  TS_dossier = class(TForm) 
    Panel1: TPanel; 
    Shape1: TShape; 
    Image1: TImage; 
    Label1: TLabel; 
    Label2: TLabel; 
    Label5: TLabel; 
    Panel2: TPanel; 
    OKBtn: TButton; 
    CancelBtn: TButton; 
    GroupBox1: TGroupBox; 
    DBGrid1: TDBGrid; 
    procedure OKBtnClick(Sender: TObject); 
 
  private 
 
 
    { Private declarations } 
  public 
//  function Supprime(Dir: String): Boolean; 
    { Public declarations } 
  end; 
 
var 
  S_dossier: TS_dossier; 
 
implementation 
 
uses Unit3, Unit1, Unit77; 
 
{$R *.dfm} 
 
 
procedure TS_dossier.OKBtnClick(Sender: TObject); 
 var fos: TSHFileOpStruct; 
result:Boolean; 
 begin 
if MessageDlg('Confirmer la Suppression', 
    mtConfirmation, [mbYes, mbNo], 0) = mrYes then 
BEGIN 
Traitement_Dossier.Show; 
Traitement_Dossier.Update; 
 ZeroMemory(@fos, SizeOf(fos)); 
 
 with fos do begin 
     wFunc := FO_DELETE; 
     fFlags := FOF_SILENT or FOF_NOCONFIRMATION; 
     pFrom := PChar(Data.DossiersCible.Value + #0); 
     end; 
     Result := (0=ShFileOperation(fos)); 
     data.Dossiers.Delete; 
  END; 
Traitement_Dossier.Close; 
fACE.Fermer1Click(Sender) 
end; 
end.