Skip to content

Instantly share code, notes, and snippets.

@diego-aslz
Last active April 9, 2016 16:32
Show Gist options
  • Save diego-aslz/768470edc12ace194f0091fe679b72cc to your computer and use it in GitHub Desktop.
Save diego-aslz/768470edc12ace194f0091fe679b72cc to your computer and use it in GitHub Desktop.
procedure TFComissoesPgto.BTOkClick(Sender: TObject);
begin
inherited;
QConsulta.First;
if not QConsulta.Eof then
begin
try
while not QConsulta.Eof do
begin
DMSistema.AtualizaBanco('COMISSOES', 'DT_PAGAMENTO', QuotedStr(FormatDateTime('YYYY.MM.DD', Date)), 'ID = ' + QConsultaID.Text);
QConsulta.Next;
end;
DMSistema.TSistema.CommitRetaining;
if FRReciboComissao = nil then
FRReciboComissao := TFRReciboComissao.Create(Application);
QConsulta.First;
FRReciboComissao.QRRelatorio.Dataset := QConsulta;
FRReciboComissao.QRRelatorio.Preview;
except
DMSistema.TSistema.RollbackRetaining;
raise;
end;
Buscar;
end;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment