unit uBizEDISales;

interface

uses
  uDAInterfaces, uDADataTable, schEDISalesClient_Intf, Classes,
  DB, Controls;

const
  BIZ_SLSRPT_CAB = 'BizSlsRptCab';
  BIZ_SLSRPT_LUG = 'BizSlsRptLug';
  BIZ_SLSRPT_ART = 'BizSlsRptArt';

type
  IBizEDISls_Cab = interface(IRDX_CABVEN)
    ['{E7A9D79B-C28F-48BC-A592-EF8C28CD8DFF}']
  end;

  IBizEDISls_Lug = interface(IRDX_LUGVEN)
    ['{C3438D84-14A3-4501-879D-C24AE7847DBB}']
  end;

  IBizEDISls_Art = interface(IRDX_ARTVEN)
    ['{8A2A5662-D75D-469A-95EB-03C02D2CD1F7}']
  end;

  TBizEDISls_Cab = class(TRDX_CABVENDataTableRules, IBizEDISls_Cab)
  protected
    procedure SetCLAVE1Value(const aValue: Float); override;
    procedure SetNUMINFValue(const aValue: String); override;
    procedure SetFUNCIONValue(const aValue: String); override;

    procedure SetEANOFIValue(const aValue: String); override;
    procedure SetEANEMIValue(const aValue: String); override;
    procedure SetEANRECValue(const aValue: String); override;
    procedure SetEANVENValue(const aValue: String); override;
    procedure SetEANALMValue(const aValue: String); override;
    procedure SetEANREPValue(const aValue: String); override;
    procedure SetEANPROValue(const aValue: String); override;
    procedure SetEANADMSAValue(const aValue: String); override;
    procedure SetEANREPSRValue(const aValue: String); override;
    procedure SetADMVENSAValue(const aValue: String); override;
    procedure SetREPDEPSRValue(const aValue: String); override;
    procedure SetEMAILSAValue(const aValue: String); override;
    procedure SetNUMFAXSAValue(const aValue: String); override;
    procedure SetNUMTELSAValue(const aValue: String); override;
    procedure SetNUMTLXSAValue(const aValue: String); override;
    procedure SetX400SAValue(const aValue: String); override;
    procedure SetEMAILSRValue(const aValue: String); override;
    procedure SetNUMFAXSRValue(const aValue: String); override;
    procedure SetNUMTELSRValue(const aValue: String); override;
    procedure SetNUMTLXSRValue(const aValue: String); override;
    procedure SetX400SRValue(const aValue: String); override;
    procedure SetNUMPREValue(const aValue: String); override;
    procedure SetNUMINFSCValue(const aValue: String); override;
    procedure SetNUMCONValue(const aValue: String); override;
    procedure SetDIVPEDValue(const aValue: String); override;
    procedure SetDIVPREValue(const aValue: String); override;
    procedure SetDIVPAGValue(const aValue: String); override;
    procedure SetDIVPEDFValue(const aValue: String); override;
    procedure SetDIVPREFValue(const aValue: String); override;
    procedure SetDIVPAGFValue(const aValue: String); override;

    procedure SetTASCAMValue(const aValue: Float); override;

    procedure SetFECINIValue(const aValue: DateTime); override;
    procedure SetFECFINValue(const aValue: DateTime); override;
    procedure SetFECINFValue(const aValue: DateTime); override;
    procedure SetFECPREValue(const aValue: DateTime); override;
    procedure SetFECINFSCValue(const aValue: DateTime); override;
    procedure SetFECCONValue(const aValue: DateTime); override;
    procedure SetFECTASValue(const aValue: DateTime); override;
    procedure SetPERVENINIValue(const aValue: DateTime); override;
    procedure SetPERVENFINValue(const aValue: DateTime); override;
  end;


  TBizEDISls_Lug = class(TRDX_LUGVENDataTableRules, IBizEDISls_Lug)
  protected
    procedure SetFECINIValue(const aValue: DateTime); override;
    procedure SetFECFINValue(const aValue: DateTime); override;
    procedure SetPERVENINIValue(const aValue: DateTime); override;
    procedure SetPERVENFINValue(const aValue: DateTime); override;
  end;

  TBizEDISls_Art = class(TRDX_ARTVENDataTableRules, IBizEDISls_Art)
  protected
  end;

implementation

{ TBizEDISls_Cab }

uses
  Variants;

procedure TBizEDISls_Cab.SetADMVENSAValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENADMVENSA].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENADMVENSA].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetCLAVE1Value(const aValue: Float);
begin
  inherited;
end;

procedure TBizEDISls_Cab.SetDIVPAGFValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENDIVPAGF].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENDIVPAGF].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetDIVPAGValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENDIVPAG].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENDIVPAG].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetDIVPEDFValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENDIVPEDF].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENDIVPEDF].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetDIVPEDValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENDIVPED].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENDIVPED].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetDIVPREFValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENDIVPREF].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENDIVPREF].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetDIVPREValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENDIVPRE].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENDIVPRE].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEANADMSAValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEANADMSA].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEANADMSA].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEANALMValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEANALM].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEANALM].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEANEMIValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEANEMI].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEANEMI].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEANOFIValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEANOFI].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEANOFI].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEANPROValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEANPRO].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEANPRO].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEANRECValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEANREC].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEANREC].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEANREPSRValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEANREPSR].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEANREPSR].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEANREPValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEANREP].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEANREP].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEANVENValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEANVEN].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEANVEN].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEMAILSAValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEMAILSA].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEMAILSA].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetEMAILSRValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENEMAILSR].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENEMAILSR].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetFECCONValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_CABVENFECCON].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENFECCON].AsDateTime := aValue;
end;

procedure TBizEDISls_Cab.SetFECFINValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_CABVENFECFIN].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENFECFIN].AsDateTime := aValue;
end;

procedure TBizEDISls_Cab.SetFECINFSCValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_CABVENFECINFSC].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENFECINFSC].AsDateTime := aValue;
end;

procedure TBizEDISls_Cab.SetFECINFValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_CABVENFECINF].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENFECINF].AsDateTime := aValue;
end;

procedure TBizEDISls_Cab.SetFECINIValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_CABVENFECINI].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENFECINI].AsDateTime := aValue;
end;

procedure TBizEDISls_Cab.SetFECPREValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_CABVENFECPRE].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENFECPRE].AsDateTime := aValue;
end;

procedure TBizEDISls_Cab.SetFECTASValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_CABVENFECTAS].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENFECTAS].AsDateTime := aValue;
end;

procedure TBizEDISls_Cab.SetFUNCIONValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENFUNCION].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENFUNCION].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetNUMCONValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENNUMCON].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENNUMCON].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetNUMFAXSAValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENNUMFAXSA].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENNUMFAXSA].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetNUMFAXSRValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENNUMFAXSA].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENNUMFAXSA].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetNUMINFSCValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENNUMINFSC].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENNUMINFSC].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetNUMINFValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENNUMINF].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENNUMINF].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetNUMPREValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENNUMPRE].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENNUMPRE].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetNUMTELSAValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENNUMTELSA].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENNUMTELSA].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetNUMTELSRValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENNUMTELSR].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENNUMTELSR].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetNUMTLXSAValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENNUMTLXSA].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENNUMTLXSA].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetNUMTLXSRValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENNUMTLXSR].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENNUMTLXSR].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetPERVENFINValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_CABVENPERVENFIN].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENPERVENFIN].AsDateTime := aValue;
end;

procedure TBizEDISls_Cab.SetPERVENINIValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_CABVENPERVENINI].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENPERVENINI].AsDateTime := aValue;
end;

procedure TBizEDISls_Cab.SetREPDEPSRValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENREPDEPSR].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENREPDEPSR].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetTASCAMValue(const aValue: Float);
begin
  inherited;
end;

procedure TBizEDISls_Cab.SetX400SAValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENX400SA].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENX400SA].AsString := aValue;
end;

procedure TBizEDISls_Cab.SetX400SRValue(const aValue: String);
begin
  if Length(aValue) = 0 then
    DataTable.Fields[idx_RDX_CABVENX400SR].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_CABVENX400SR].AsString := aValue;
end;

{ TBizEDISls_Lug }

procedure TBizEDISls_Lug.SetFECFINValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_LUGVENFECFIN].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_LUGVENFECFIN].AsDateTime := aValue;
end;

procedure TBizEDISls_Lug.SetFECINIValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_LUGVENFECINI].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_LUGVENFECINI].AsDateTime := aValue;
end;

procedure TBizEDISls_Lug.SetPERVENFINValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_LUGVENPERVENFIN].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_LUGVENPERVENFIN].AsDateTime := aValue;
end;

procedure TBizEDISls_Lug.SetPERVENINIValue(const aValue: DateTime);
begin
  if aValue = 0 then
    DataTable.Fields[idx_RDX_LUGVENPERVENINI].AsVariant := NULL
  else
    DataTable.Fields[idx_RDX_LUGVENPERVENINI].AsDateTime := aValue;
end;

initialization
  RegisterDataTableRules(BIZ_SLSRPT_CAB, TBizEDISls_Cab);
  RegisterDataTableRules(BIZ_SLSRPT_LUG, TBizEDISls_Lug);
  RegisterDataTableRules(BIZ_SLSRPT_ART, TBizEDISls_Art);

finalization

end.
