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/Facturas proforma/Model/uBizDetallesFacturaProforma.pas

51 lines
1.2 KiB
ObjectPascal

unit uBizDetallesFacturaProforma;
interface
uses
uDAInterfaces, uDADataTable, schFacturasProformaClient_Intf;
const
BIZ_CLIENT_DETALLES_FACTURA_PROFORMA = 'Client.DetallesFactura.Proforma';
type
IBizDetallesFacturaProforma = interface(IFacturasProforma_Detalles)
['{BCE8EA27-9108-482A-BEFA-104FD6921531}']
end;
TBizDetallesFacturaProforma = class(TFacturasProforma_DetallesDataTableRules, IBizDetallesFacturaProforma)
protected
procedure OnNewRecord(Sender: TDADataTable); override;
procedure BeforeInsert(Sender: TDADataTable); override;
end;
implementation
uses
DB;
{ TBizDetallesFacturaProforma }
procedure TBizDetallesFacturaProforma.BeforeInsert(Sender: TDADataTable);
var
AMasterTable : TDADataTable;
begin
inherited;
AMasterTable := DataTable.GetMasterDataTable;
if Assigned(AMasterTable) and (AMasterTable.State = dsInsert) then
begin
AMasterTable.Post;
end;
end;
procedure TBizDetallesFacturaProforma.OnNewRecord(Sender: TDADataTable);
begin
inherited;
VISIBLE := 1;
end;
initialization
RegisterDataTableRules(BIZ_CLIENT_DETALLES_FACTURA_PROFORMA, TBizDetallesFacturaProforma);
end.