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


unit Unit23; 
 
interface 
 
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, 
  Buttons, ExtCtrls, Grids, DBGrids; 
 
type 
  TList_Clients = class(TForm) 
    OKBtn: TButton; 
    CancelBtn: TButton; 
    DBGrid1: TDBGrid; 
    Edit1: TEdit; 
    Label1: TLabel; 
    Button1: TButton; 
    Button2: TButton; 
    Image2: TImage; 
    procedure NouveauClick(Sender: TObject); 
    procedure Button2Click(Sender: TObject); 
    procedure Edit1Change(Sender: TObject); 
    procedure FormClose(Sender: TObject; var Action: TCloseAction); 
    procedure OKBtnClick(Sender: TObject); 
  private 
    { Private declarations } 
  public 
  CodeClient:Variant; 
    { Public declarations } 
  end; 
 
var 
  List_Clients: TList_Clients; 
 
implementation 
 
uses Unit3, Unit5; 
 
{$R *.dfm} 
 
procedure TList_Clients.NouveauClick(Sender: TObject); 
begin 
data.Clients.Edit; 
Sai_Clients.ShowModal; 
end; 
 
procedure TList_Clients.Button2Click(Sender: TObject); 
begin 
data.Clients.Append; 
Sai_Clients.ShowModal; 
 
end; 
 
procedure TList_Clients.Edit1Change(Sender: TObject); 
begin 
IF edit1.GetTextLen<> 0 then 
begin 
Data.Clients.Filter:='Raison='''+Edit1.Text+'*'''; 
Data.Clients.Filtered:=true; 
end 
else 
Data.Clients.Filtered:=false; 
 
 
end; 
 
procedure TList_Clients.FormClose(Sender: TObject; 
  var Action: TCloseAction); 
begin 
Data.Clients.Filtered:=false; 
edit1.Text:='' 
end; 
 
procedure TList_Clients.OKBtnClick(Sender: TObject); 
begin 
codeClient:=Data.Clientscode_cli.Value; 
end; 
 
end.