Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit AlgoritmoLoteCheque;
- interface
- uses FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Param, Dialogs,sysutils,
- FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, FireDAC.DApt.Intf, FireDAC.Stan.Async, FireDAC.DApt,
- FireDAC.Comp.DataSet, FireDAC.Comp.Client,DB,RTTI,System.Generics.Collections;
- type TchequesList = packed class
- private
- FValorCheque: currency;
- FDataVencimento: TDate;
- FDataEmissao: TDate;
- FBomPara: TDate;
- Fsituacao: string;
- FConta: string;
- FBancoNumero: integer;
- FAgencia: integer;
- FID: integer;
- published
- property ID: integer read FID write FID;
- property Dataemissao: TDate read FDataEmissao write FDataEmissao;
- property DataVencimento: TDate read FDataVencimento write FDataVencimento;
- property Banconumero: integer read FBancoNumero write FBancoNumero;
- property AgenciaNumero: integer read FAgencia write FAgencia;
- property Conta: string read FConta write FConta;
- property ValorCheque: currency read FValorCheque write FValorCheque;
- property Situacao: string read Fsituacao write FSituacao;
- property Bompara: TDate read FBomPara write FBompara;
- constructor Create(const ID: integer; const situacao, Conta: string; const BancoNumero,
- Agencia: integer; const ValorCheque: currency; DataVencimento, DataEmissao, BomPara: TDate); overload;
- end;
- type TCriterios = packed class
- private
- FDataVencimento: Boolean;
- FMaiorValor: Boolean;
- FMenorValor: Boolean;
- published
- property Datadevendimento: Boolean read FDataVencimento write FDataVencimento;
- property MenorValor: Boolean read FMenorValor write FMenorValor;
- property MaiorValor: Boolean read FMaiorValor write FMaiorValor;
- end;
- type TSelLoteCheque = class
- private
- {Private declaration}
- FCriteria: TCriterios;
- Flista: Tlist<TchequesList>;
- Obj: TchequesList;
- protected
- {Protected declaration}
- public
- {Public declaration declaration}
- property Listadecheques: Tlist<TchequesList> read Flista write Flista;
- procedure AdicionaChequesnalista( const ID: integer; const situacao,Conta: string ;
- const BancoNumero,Agencia : integer; const ValorCheque: currency; DataVencimento,DataEmissao,BomPara: TDate );
- procedure ChangeforCriteriaValuestoPayment( value: array of TCriterios );
- constructor Create; (*Metodos do Constructor*)
- destructor Destroy; override;
- published
- {Protected declaration}
- end;
- implementation
- { TSelLoteCheque }
- procedure TSelLoteCheque.AdicionaChequesnalista(const ID: integer; const situacao, Conta: string; const BancoNumero,
- Agencia: integer; const ValorCheque: currency; DataVencimento, DataEmissao, BomPara: TDate);
- begin
- Obj:= TchequesList.Create(ID,situacao,Conta,BancoNumero,Agencia, ValorCheque, DataVencimento, DataEmissao, BomPara);
- Flista.Add(Obj);
- end;
- procedure TSelLoteCheque.ChangeforCriteriaValuestoPayment(value: array of TCriterios);
- var i: integer;
- begin
- for I := Low(value) to High(value) do
- begin
- end;
- end;
- constructor TSelLoteCheque.Create;
- begin
- inherited Create;
- Flista:= Tlist<TchequesList>.create;
- FCriteria:= TCriterios.Create;
- Obj:= TchequesList.Create;
- end;
- destructor TSelLoteCheque.Destroy;
- begin
- inherited;
- end;
- { TchequesList }
- constructor TchequesList.Create(const ID: integer; const situacao, Conta: string; const BancoNumero, Agencia: integer;
- const ValorCheque: currency; DataVencimento, DataEmissao, BomPara: TDate);
- begin
- inherited Create;
- FValorCheque := ValorCheque;
- FDataVencimento := DataVencimento;
- FDataEmissao := DataEmissao;
- FBomPara := BomPara;
- Fsituacao := situacao;
- FConta := Conta;
- FBancoNumero := AgenciaNumero;
- FAgencia:= Agencia;
- FID:= ID;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement