Advertisement
filhotecmail

Lista de Cheques

Feb 12th, 2018
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 3.84 KB | None | 0 0
  1. unit AlgoritmoLoteCheque;
  2.  
  3. interface
  4.  
  5. uses FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Param, Dialogs,sysutils,
  6.      FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, FireDAC.DApt.Intf, FireDAC.Stan.Async, FireDAC.DApt,
  7.      FireDAC.Comp.DataSet, FireDAC.Comp.Client,DB,RTTI,System.Generics.Collections;
  8.  
  9.  type TchequesList =  packed class
  10.   private
  11.     FValorCheque: currency;
  12.     FDataVencimento: TDate;
  13.     FDataEmissao: TDate;
  14.     FBomPara: TDate;
  15.     Fsituacao: string;
  16.     FConta: string;
  17.     FBancoNumero: integer;
  18.     FAgencia: integer;
  19.     FID: integer;
  20.  
  21.   published
  22.  
  23.       property ID: integer read FID write FID;
  24.       property Dataemissao: TDate read FDataEmissao write FDataEmissao;
  25.       property DataVencimento: TDate read FDataVencimento write FDataVencimento;
  26.       property Banconumero: integer read FBancoNumero write FBancoNumero;
  27.       property AgenciaNumero: integer read FAgencia write FAgencia;
  28.       property Conta: string read FConta write FConta;
  29.       property ValorCheque: currency read FValorCheque write FValorCheque;
  30.       property Situacao: string read Fsituacao write FSituacao;
  31.       property Bompara: TDate read FBomPara write FBompara;
  32.  
  33.       constructor Create(const ID: integer; const situacao, Conta: string; const BancoNumero,
  34.   Agencia: integer; const ValorCheque: currency; DataVencimento, DataEmissao, BomPara: TDate); overload;
  35.  
  36.  end;
  37.  
  38.  type TCriterios = packed class
  39.   private
  40.     FDataVencimento: Boolean;
  41.     FMaiorValor: Boolean;
  42.     FMenorValor: Boolean;
  43.   published
  44.       property Datadevendimento: Boolean read FDataVencimento write FDataVencimento;
  45.       property MenorValor: Boolean read FMenorValor write FMenorValor;
  46.       property MaiorValor: Boolean read FMaiorValor write FMaiorValor;
  47.  end;
  48.  
  49.  type TSelLoteCheque = class
  50.  
  51.     private
  52.     {Private declaration}
  53.     FCriteria: TCriterios;
  54.     Flista: Tlist<TchequesList>;
  55.     Obj: TchequesList;
  56.  
  57.     protected
  58.     {Protected declaration}
  59.  
  60.     public
  61.     {Public declaration declaration}
  62.       property Listadecheques: Tlist<TchequesList> read Flista write Flista;
  63.       procedure AdicionaChequesnalista( const ID: integer; const situacao,Conta: string ;
  64.       const BancoNumero,Agencia : integer; const ValorCheque: currency; DataVencimento,DataEmissao,BomPara: TDate   );
  65.  
  66.       procedure ChangeforCriteriaValuestoPayment( value: array of TCriterios );
  67.       constructor Create; (*Metodos do Constructor*)
  68.       destructor Destroy; override;
  69.  
  70.     published
  71.     {Protected declaration}
  72.     end;
  73.  
  74. implementation
  75.  
  76. { TSelLoteCheque }
  77.  
  78. procedure TSelLoteCheque.AdicionaChequesnalista(const ID: integer; const situacao, Conta: string; const BancoNumero,
  79.   Agencia: integer; const ValorCheque: currency; DataVencimento, DataEmissao, BomPara: TDate);
  80.  
  81. begin
  82.  
  83.   Obj:= TchequesList.Create(ID,situacao,Conta,BancoNumero,Agencia, ValorCheque, DataVencimento, DataEmissao, BomPara);
  84.   Flista.Add(Obj);
  85.  
  86. end;
  87.  
  88. procedure TSelLoteCheque.ChangeforCriteriaValuestoPayment(value: array of TCriterios);
  89. var i: integer;
  90. begin
  91.   for I := Low(value) to High(value) do
  92.   begin
  93.  
  94.  
  95.   end;
  96. end;
  97.  
  98. constructor TSelLoteCheque.Create;
  99. begin
  100.  inherited Create;
  101.   Flista:= Tlist<TchequesList>.create;
  102.   FCriteria:= TCriterios.Create;
  103.   Obj:= TchequesList.Create;
  104. end;
  105.  
  106. destructor TSelLoteCheque.Destroy;
  107. begin
  108.  
  109.   inherited;
  110. end;
  111.  
  112.  
  113. { TchequesList }
  114.  
  115. constructor TchequesList.Create(const ID: integer; const situacao, Conta: string; const BancoNumero, Agencia: integer;
  116.   const ValorCheque: currency; DataVencimento, DataEmissao, BomPara: TDate);
  117. begin
  118.   inherited Create;
  119.   FValorCheque := ValorCheque;
  120.   FDataVencimento := DataVencimento;
  121.   FDataEmissao := DataEmissao;
  122.   FBomPara := BomPara;
  123.   Fsituacao := situacao;
  124.   FConta := Conta;
  125.   FBancoNumero := AgenciaNumero;
  126.   FAgencia:= Agencia;
  127.   FID:= ID;
  128.  
  129. end;
  130.  
  131. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement