git-svn-id: https://192.168.0.254/svn/Proyectos.AbetoDesign_FactuGES/trunk@2 93f398dd-4eb6-7a46-baf6-13f46f578da2
54 lines
1.1 KiB
ObjectPascal
54 lines
1.1 KiB
ObjectPascal
unit uBizEmpresasTiendas;
|
|
|
|
interface
|
|
|
|
uses
|
|
uDAInterfaces, uDADataTable,
|
|
schEmpresasClient_Intf;
|
|
|
|
const
|
|
BIZ_CLIENT_EMPRESAS_TIENDAS = 'Client.EmpresaTienda';
|
|
CTE_ID_TODAS = 0;
|
|
CTE_TODAS = 'Todas';
|
|
|
|
type
|
|
IBizEmpresaTienda = interface(IEmpresasTiendas)
|
|
['{564205A6-82A6-45E1-9523-6751BB5A8708}']
|
|
function EsNuevo : Boolean;
|
|
end;
|
|
|
|
TBizEmpresaTienda = class(TEmpresasTiendasDataTableRules, IBizEmpresaTienda)
|
|
protected
|
|
procedure BeforeInsert(Sender: TDADataTable); override;
|
|
public
|
|
function EsNuevo : Boolean;
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
Dialogs,uDataTableUtils, DB;
|
|
|
|
{ TBizEmpresasTiendas }
|
|
|
|
procedure TBizEmpresaTienda.BeforeInsert(Sender: TDADataTable);
|
|
var
|
|
AMasterTable : TDADataTable;
|
|
begin
|
|
inherited;
|
|
AMasterTable := DataTable.GetMasterDataTable;
|
|
if Assigned(AMasterTable) and (AMasterTable.State = dsInsert) then
|
|
AMasterTable.Post;
|
|
end;
|
|
|
|
function TBizEmpresaTienda.EsNuevo: Boolean;
|
|
begin
|
|
Result := (ID < 0);
|
|
end;
|
|
|
|
initialization
|
|
RegisterDataTableRules(BIZ_CLIENT_EMPRESAS_TIENDAS, TBizEmpresaTienda);
|
|
|
|
|
|
end.
|