home *** CD-ROM | disk | FTP | other *** search
- 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.