代码如下:
procedure TInStockForm.BizFormCreate(Sender: TObject);
begin
(DocView3.Doc as TGoodsDtlBD).OnGoodImport := DoGoodImport;
end;
procedure TInStockForm.DoGoodImport(Sender: TObject);
begin
with TInputGoodsBD.Create((DocView3.Doc as TGoodsDtlBD).Context) do
begin
try
** ShowModal;
finally
Free;
end;
end;
end;