first commit (2000-01-12)

This commit is contained in:
2021-09-01 17:33:51 +02:00
commit 063d414ec4
138 changed files with 8878 additions and 0 deletions

49
src/Unit2.cpp Normal file
View File

@ -0,0 +1,49 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
TbPrecios->Active = true;
TbHistorial ->Active = true;
Timer1->Enabled = true;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Timer1Timer(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::TbHistorialAfterOpen(TDataSet *DataSet)
{
TbHistorial->First();
while ( !TbHistorial->Eof )
{
if ( TbHistorial->FieldByName("idtc")->AsInteger < 900 )
{
// Buscamos en la tabla de precios, al 1<> que tenga un tiempo superior o igual
// al que nos pide el cliente...
TbPrecios->First();
while( !TbPrecios->Eof && (double)TbPrecios->FieldByName("Tiempo")->AsDateTime < (double)TbHistorial->FieldByName("Tiempo")->AsDateTime )//->Time )
TbPrecios->Next();
TbHistorial->Edit();
TbHistorial->FieldByName("Precio")->AsCurrency = TbPrecios->FieldByName("Precio")->AsCurrency;
TbHistorial->Post();
}
TbHistorial->Next();
}
}
//---------------------------------------------------------------------------