home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1996 August
/
VPR9608A.BIN
/
del20try
/
install
/
data.z
/
CUSTDATA.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-05-08
|
933b
|
46 lines
unit CustData;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids, DBGrids;
type
TfmCustomer = class(TForm)
DBGrid1: TDBGrid;
procedure FormActivate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
end;
var
fmCustomer: TfmCustomer;
implementation
uses DM, Toolbar, CustOrds;
{$R *.DFM}
procedure TfmCustomer.FormActivate(Sender: TObject);
begin
{ fmToolBar.SetNavigatorToCustomer. }
fmToolBar.SetNavigator(dm1.CustomerSource);
end;
procedure TfmCustomer.FormClose(Sender: TObject; var Action: TCloseAction);
var
I: Integer;
bl : Boolean;
begin
bl := False;
for I := Application.ComponentCount downto 1 do
if Application.Components[I] is TfmCustOrd then
bl := True;
if not bl then
fmToolBar.dbNavigator1.Datasource := nil;
Action := caFree;
end;
end.