This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
LuisLeon_FactuGES2/Source/Modulos/Contactos/Model/uBizClientesDescuentos.pas
2014-01-16 16:01:50 +00:00

44 lines
934 B
ObjectPascal

unit uBizClientesDescuentos;
interface
uses
uDAInterfaces, uDADataTable,
schContactosClient_Intf;
const
BIZ_CLIENT_CLIENTE_DESCUENTOS = 'Client.ClienteDescuentos';
type
IBizClienteDescuentos = interface (IClientesDescuentos)
['{41EF5532-D013-4976-BE23-6094E4C07CEF}']
end;
TBizClienteDescuentos = class(TClientesDescuentosDataTableRules, IBizClienteDescuentos)
protected
procedure BeforeInsert(Sender: TDADataTable); override;
end;
implementation
{ TBizClienteDescuentos }
uses
DB;
procedure TBizClienteDescuentos.BeforeInsert(Sender: TDADataTable);
var
AMasterTable : TDADataTable;
begin
inherited;
AMasterTable := DataTable.GetMasterDataTable;
if Assigned(AMasterTable) and (AMasterTable.State in dsEditModes) then
AMasterTable.Post;
end;
initialization
RegisterDataTableRules(BIZ_CLIENT_CLIENTE_DESCUENTOS, TBizClienteDescuentos);
end.