git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@151 93f398dd-4eb6-7a46-baf6-13f46f578da2
52 lines
1.2 KiB
ObjectPascal
52 lines
1.2 KiB
ObjectPascal
unit uBizContactosDirecciones;
|
|
|
|
interface
|
|
|
|
uses
|
|
uDAInterfaces, uDADataTable,
|
|
schContactosClient_Intf;
|
|
|
|
const
|
|
BIZ_CLIENT_CONTACTOS_DIRECCIONES = 'Client.ContactosDirecciones';
|
|
|
|
type
|
|
IBizContactosDirecciones = interface(IContactosDirecciones)
|
|
['{971F415B-A468-455B-BF86-1795E36858F3}']
|
|
end;
|
|
|
|
TBizContactosDirecciones = class(TContactosDireccionesDataTableRules, IBizContactosDirecciones)
|
|
protected
|
|
procedure BeforeInsert(Sender: TDADataTable); override;
|
|
public
|
|
procedure OnNewRecord(Sender: TDADataTable); override;
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
Dialogs,uDataTableUtils, DB;
|
|
|
|
{ TBizDatosBancarios }
|
|
|
|
procedure TBizContactosDirecciones.BeforeInsert(Sender: TDADataTable);
|
|
var
|
|
AMasterTable : TDADataTable;
|
|
begin
|
|
inherited;
|
|
AMasterTable := DataTable.GetMasterDataTable;
|
|
if Assigned(AMasterTable) and (AMasterTable.State in dsEditModes) then
|
|
AMasterTable.Post;
|
|
end;
|
|
|
|
procedure TBizContactosDirecciones.OnNewRecord(Sender: TDADataTable);
|
|
begin
|
|
inherited;
|
|
// ID := GetRecNo; // -1, -2, -3...
|
|
end;
|
|
|
|
initialization
|
|
RegisterDataTableRules(BIZ_CLIENT_CONTACTOS_DIRECCIONES, TBizContactosDirecciones);
|
|
|
|
|
|
end.
|