unit uBizCobrosMontaje; interface uses Classes, uDAInterfaces, schCobrosClienteClient_Intf, uDADataTable, uBizCobrosCliente, uBizMontajesDetalles; const BIZ_CLIENT_COBRO_MONTAJE = 'Client.CobroMontaje'; type IBizCobroMontaje = interface(IBizCobroCliente) ['{154485F8-211B-4316-B4B5-7B21182C7CC2}'] procedure SetMontaje(AValue : IBizMontajeDetalles); function GetMontaje : IBizMontajeDetalles; property Montaje : IBizMontajeDetalles read GetMontaje write SetMontaje; end; TBizCobroMontaje = class(TBizCobroCliente, IBizCobroMontaje) protected FMontaje : IBizMontajeDetalles; procedure SetMontaje(AValue : IBizMontajeDetalles); function GetMontaje : IBizMontajeDetalles; public property Montaje : IBizMontajeDetalles read GetMontaje write SetMontaje; constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; implementation //uses // SysUtils, uDataTableUtils, DB, uDateUtils, DateUtils, uDataModuleUsuarios, // Variants, cxDateUtils; { TBizCobroMontaje } { TBizCobroMontaje } constructor TBizCobroMontaje.Create(aDataTable: TDADataTable); begin inherited; FMontaje := Nil; end; destructor TBizCobroMontaje.Destroy; begin FMontaje := NIL; inherited; end; function TBizCobroMontaje.GetMontaje: IBizMontajeDetalles; begin Result := FMontaje; end; procedure TBizCobroMontaje.SetMontaje(AValue: IBizMontajeDetalles); begin FMontaje := AValue; if Assigned(FMontaje) then begin if not FMontaje.DataTable.Active then FMontaje.DataTable.Active := True; if ID_MONTAJE <> FMontaje.ID then begin DataTable.Edit; ID_MONTAJE := FMontaje.ID; REFERENCIA := FMontaje.REFERENCIA; end; end; end; initialization RegisterDataTableRules(BIZ_CLIENT_COBRO_MONTAJE, TBizCobroMontaje); finalization end.