First commit 11/07/1998
This commit is contained in:
commit
454b67044f
14
AcercaDe.cpp
Normal file
14
AcercaDe.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "AcercaDe.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
TAboutBox *AboutBox;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TAboutBox::TAboutBox(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------
|
BIN
AcercaDe.dfm
Normal file
BIN
AcercaDe.dfm
Normal file
Binary file not shown.
37
AcercaDe.h
Normal file
37
AcercaDe.h
Normal file
@ -0,0 +1,37 @@
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef AcercaDeH
|
||||
#define AcercaDeH
|
||||
//----------------------------------------------------------------------------
|
||||
#include <vcl\System.hpp>
|
||||
#include <vcl\Windows.hpp>
|
||||
#include <vcl\SysUtils.hpp>
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Graphics.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TAboutBox : public TForm
|
||||
{
|
||||
__published:
|
||||
TPanel *Panel1;
|
||||
TLabel *ProductName;
|
||||
TLabel *Version;
|
||||
TLabel *Copyright;
|
||||
TLabel *Comments;
|
||||
TButton *OKButton;
|
||||
TLabel *Label1;
|
||||
TLabel *Label2;
|
||||
TImage *ProgramIcon;
|
||||
TShape *Shape1;
|
||||
TImage *Image1;
|
||||
private:
|
||||
public:
|
||||
virtual __fastcall TAboutBox(TComponent* AOwner);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
extern TAboutBox *AboutBox;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
BIN
Clientes y Proveedores.DB
Normal file
BIN
Clientes y Proveedores.DB
Normal file
Binary file not shown.
BIN
Clientes y Proveedores.MB
Normal file
BIN
Clientes y Proveedores.MB
Normal file
Binary file not shown.
BIN
Clientes y Proveedores.PX
Normal file
BIN
Clientes y Proveedores.PX
Normal file
Binary file not shown.
BIN
Clientes y Proveedores.VAL
Normal file
BIN
Clientes y Proveedores.VAL
Normal file
Binary file not shown.
BIN
Clientes y Proveedores.XG0
Normal file
BIN
Clientes y Proveedores.XG0
Normal file
Binary file not shown.
BIN
Clientes y Proveedores.XG1
Normal file
BIN
Clientes y Proveedores.XG1
Normal file
Binary file not shown.
BIN
Clientes y Proveedores.XG2
Normal file
BIN
Clientes y Proveedores.XG2
Normal file
Binary file not shown.
BIN
Clientes y Proveedores.YG0
Normal file
BIN
Clientes y Proveedores.YG0
Normal file
Binary file not shown.
BIN
Clientes y Proveedores.YG1
Normal file
BIN
Clientes y Proveedores.YG1
Normal file
Binary file not shown.
BIN
Clientes y Proveedores.YG2
Normal file
BIN
Clientes y Proveedores.YG2
Normal file
Binary file not shown.
1
Final/144MB/DISK1/DISK1.ID
Normal file
1
Final/144MB/DISK1/DISK1.ID
Normal file
@ -0,0 +1 @@
|
||||
DML
|
BIN
Final/144MB/DISK1/SETUP.EXE
Normal file
BIN
Final/144MB/DISK1/SETUP.EXE
Normal file
Binary file not shown.
2
Final/144MB/DISK1/SETUP.INI
Normal file
2
Final/144MB/DISK1/SETUP.INI
Normal file
@ -0,0 +1,2 @@
|
||||
[Startup]
|
||||
AppName=TAlarcon
|
BIN
Final/144MB/DISK1/SETUP.INS
Normal file
BIN
Final/144MB/DISK1/SETUP.INS
Normal file
Binary file not shown.
BIN
Final/144MB/DISK1/SETUP.PKG
Normal file
BIN
Final/144MB/DISK1/SETUP.PKG
Normal file
Binary file not shown.
BIN
Final/144MB/DISK1/_INST32I.EX_
Normal file
BIN
Final/144MB/DISK1/_INST32I.EX_
Normal file
Binary file not shown.
BIN
Final/144MB/DISK1/_ISDEL.EXE
Normal file
BIN
Final/144MB/DISK1/_ISDEL.EXE
Normal file
Binary file not shown.
BIN
Final/144MB/DISK1/_SETUP.1
Normal file
BIN
Final/144MB/DISK1/_SETUP.1
Normal file
Binary file not shown.
BIN
Final/144MB/DISK1/_SETUP.DLL
Normal file
BIN
Final/144MB/DISK1/_SETUP.DLL
Normal file
Binary file not shown.
BIN
Final/144MB/DISK1/_SETUP.LIB
Normal file
BIN
Final/144MB/DISK1/_SETUP.LIB
Normal file
Binary file not shown.
1
Final/144MB/DISK2/DISK2.ID
Normal file
1
Final/144MB/DISK2/DISK2.ID
Normal file
@ -0,0 +1 @@
|
||||
DML
|
BIN
Final/144MB/DISK2/_SETUP.2
Normal file
BIN
Final/144MB/DISK2/_SETUP.2
Normal file
Binary file not shown.
1
Final/144MB/DISK3/DISK3.ID
Normal file
1
Final/144MB/DISK3/DISK3.ID
Normal file
@ -0,0 +1 @@
|
||||
DML
|
BIN
Final/144MB/DISK3/_SETUP.3
Normal file
BIN
Final/144MB/DISK3/_SETUP.3
Normal file
Binary file not shown.
BIN
Final/BD con errores.zip
Normal file
BIN
Final/BD con errores.zip
Normal file
Binary file not shown.
BIN
Final/Clientes y Proveedores.DB
Normal file
BIN
Final/Clientes y Proveedores.DB
Normal file
Binary file not shown.
BIN
Final/Clientes y Proveedores.MB
Normal file
BIN
Final/Clientes y Proveedores.MB
Normal file
Binary file not shown.
BIN
Final/Clientes y Proveedores.PX
Normal file
BIN
Final/Clientes y Proveedores.PX
Normal file
Binary file not shown.
BIN
Final/Clientes y Proveedores.VAL
Normal file
BIN
Final/Clientes y Proveedores.VAL
Normal file
Binary file not shown.
BIN
Final/Clientes y Proveedores.XG0
Normal file
BIN
Final/Clientes y Proveedores.XG0
Normal file
Binary file not shown.
BIN
Final/Clientes y Proveedores.XG1
Normal file
BIN
Final/Clientes y Proveedores.XG1
Normal file
Binary file not shown.
BIN
Final/Clientes y Proveedores.XG2
Normal file
BIN
Final/Clientes y Proveedores.XG2
Normal file
Binary file not shown.
BIN
Final/Clientes y Proveedores.YG0
Normal file
BIN
Final/Clientes y Proveedores.YG0
Normal file
Binary file not shown.
BIN
Final/Clientes y Proveedores.YG1
Normal file
BIN
Final/Clientes y Proveedores.YG1
Normal file
Binary file not shown.
BIN
Final/Clientes y Proveedores.YG2
Normal file
BIN
Final/Clientes y Proveedores.YG2
Normal file
Binary file not shown.
BIN
Final/Ndxbuild.exe
Normal file
BIN
Final/Ndxbuild.exe
Normal file
Binary file not shown.
BIN
Final/Productos.DB
Normal file
BIN
Final/Productos.DB
Normal file
Binary file not shown.
BIN
Final/Productos.PX
Normal file
BIN
Final/Productos.PX
Normal file
Binary file not shown.
BIN
Final/Productos.XG0
Normal file
BIN
Final/Productos.XG0
Normal file
Binary file not shown.
BIN
Final/Productos.XG1
Normal file
BIN
Final/Productos.XG1
Normal file
Binary file not shown.
BIN
Final/Productos.YG0
Normal file
BIN
Final/Productos.YG0
Normal file
Binary file not shown.
BIN
Final/Productos.YG1
Normal file
BIN
Final/Productos.YG1
Normal file
Binary file not shown.
BIN
Final/Productos2.PX
Normal file
BIN
Final/Productos2.PX
Normal file
Binary file not shown.
BIN
Final/Productos2.XG0
Normal file
BIN
Final/Productos2.XG0
Normal file
Binary file not shown.
BIN
Final/Productos2.XG1
Normal file
BIN
Final/Productos2.XG1
Normal file
Binary file not shown.
BIN
Final/Productos2.YG0
Normal file
BIN
Final/Productos2.YG0
Normal file
Binary file not shown.
BIN
Final/Productos2.YG1
Normal file
BIN
Final/Productos2.YG1
Normal file
Binary file not shown.
BIN
Final/Productos2.db
Normal file
BIN
Final/Productos2.db
Normal file
Binary file not shown.
BIN
Final/RegistroTlf.DB
Normal file
BIN
Final/RegistroTlf.DB
Normal file
Binary file not shown.
BIN
Final/RegistroTlf.PX
Normal file
BIN
Final/RegistroTlf.PX
Normal file
Binary file not shown.
BIN
Final/RegistroTlf.XG0
Normal file
BIN
Final/RegistroTlf.XG0
Normal file
Binary file not shown.
BIN
Final/RegistroTlf.XG1
Normal file
BIN
Final/RegistroTlf.XG1
Normal file
Binary file not shown.
BIN
Final/RegistroTlf.YG0
Normal file
BIN
Final/RegistroTlf.YG0
Normal file
Binary file not shown.
BIN
Final/RegistroTlf.YG1
Normal file
BIN
Final/RegistroTlf.YG1
Normal file
Binary file not shown.
BIN
Final/TAlarcon1.exe
Normal file
BIN
Final/TAlarcon1.exe
Normal file
Binary file not shown.
BIN
Final/VehiculosRegistrados.PX
Normal file
BIN
Final/VehiculosRegistrados.PX
Normal file
Binary file not shown.
BIN
Final/VehiculosRegistrados.XG0
Normal file
BIN
Final/VehiculosRegistrados.XG0
Normal file
Binary file not shown.
BIN
Final/VehiculosRegistrados.YG0
Normal file
BIN
Final/VehiculosRegistrados.YG0
Normal file
Binary file not shown.
BIN
Final/VehiculosRegistrados.db
Normal file
BIN
Final/VehiculosRegistrados.db
Normal file
Binary file not shown.
22
LSPrecios1.cpp
Normal file
22
LSPrecios1.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "LSPrecios1.h"
|
||||
#include "TAlarcon.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
TQRListForm2 *QRListForm2;
|
||||
//---------------------------------------------------------------------
|
||||
// QuickReport simple list
|
||||
// - Connect a datasource to the QuickReport component
|
||||
// - Put QRDBText components on the Detail band
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TQRListForm2::TQRListForm2(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
|
||||
|
BIN
LSPrecios1.dfm
Normal file
BIN
LSPrecios1.dfm
Normal file
Binary file not shown.
58
LSPrecios1.h
Normal file
58
LSPrecios1.h
Normal file
@ -0,0 +1,58 @@
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef LSPrecios1H
|
||||
#define LSPrecios1H
|
||||
//----------------------------------------------------------------------------
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
|
||||
#include <vcl\Dialogs.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\Graphics.hpp>
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\SysUtils.hpp>
|
||||
#include <vcl\Messages.hpp>
|
||||
#include <vcl\Windows.hpp>
|
||||
#include <vcl\System.hpp>
|
||||
#include <Qrctrls.hpp>
|
||||
#include <quickrpt.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TQRListForm2 : public TForm
|
||||
{
|
||||
__published:
|
||||
TQuickRep *QuickReport;
|
||||
TQRBand *TitleBand1;
|
||||
TQRLabel *QRLabel3;
|
||||
TQRBand *ColumnHeaderBand1;
|
||||
TQRLabel *QRLabel4;
|
||||
TQRLabel *QRLabel5;
|
||||
TQRLabel *QRLabel11;
|
||||
TQRLabel *QRLabel12;
|
||||
TQRLabel *QRLabel13;
|
||||
TQRBand *DetailBand1;
|
||||
TQRExpr *QRExpr1;
|
||||
TQRExpr *QRExpr2;
|
||||
TQRExpr *QRExpr3;
|
||||
TQRExpr *QRExpr4;
|
||||
TQRExpr *QRExpr5;
|
||||
TQRBand *PageFooterBand1;
|
||||
TQRSysData *QRSysData1;
|
||||
TQRDBText *QRDBText1;
|
||||
TQRDBText *QRDBText2;
|
||||
TQRDBText *QRDBText3;
|
||||
TQRLabel *QRLabel1;
|
||||
TQRLabel *QRLabel14;
|
||||
TQRDBText *QRDBText4;
|
||||
TQRDBText *QRDBText6;
|
||||
TQRDBText *QRDBText5;
|
||||
TQRDBText *QRDBText7;
|
||||
TQRShape *QRShape1;
|
||||
TQRDBText *QRDBText8;
|
||||
private:
|
||||
public:
|
||||
virtual __fastcall TQRListForm2(TComponent* AOwner);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
extern TQRListForm2 *QRListForm2;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
16
LSPrecios2.cpp
Normal file
16
LSPrecios2.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "LSPrecios2.h"
|
||||
#include "TAlarcon.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "LSPrecios1"
|
||||
#pragma resource "*.dfm"
|
||||
TQRListForm3 *QRListForm3;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TQRListForm3::TQRListForm3(TComponent* Owner)
|
||||
: TQRListForm2(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
LSPrecios2.dfm
Normal file
BIN
LSPrecios2.dfm
Normal file
Binary file not shown.
25
LSPrecios2.h
Normal file
25
LSPrecios2.h
Normal file
@ -0,0 +1,25 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef LSPrecios2H
|
||||
#define LSPrecios2H
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include "LSPrecios1.h"
|
||||
#include <Qrctrls.hpp>
|
||||
#include <quickrpt.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TQRListForm3 : public TQRListForm2
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TQRListForm3(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TQRListForm3 *QRListForm3;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
BIN
Ndxbuild.exe
Normal file
BIN
Ndxbuild.exe
Normal file
Binary file not shown.
BIN
Productos.DB
Normal file
BIN
Productos.DB
Normal file
Binary file not shown.
BIN
Productos.PX
Normal file
BIN
Productos.PX
Normal file
Binary file not shown.
BIN
Productos.XG0
Normal file
BIN
Productos.XG0
Normal file
Binary file not shown.
BIN
Productos.XG1
Normal file
BIN
Productos.XG1
Normal file
Binary file not shown.
BIN
Productos.YG0
Normal file
BIN
Productos.YG0
Normal file
Binary file not shown.
BIN
Productos.YG1
Normal file
BIN
Productos.YG1
Normal file
Binary file not shown.
BIN
Productos2.PX
Normal file
BIN
Productos2.PX
Normal file
Binary file not shown.
BIN
Productos2.XG0
Normal file
BIN
Productos2.XG0
Normal file
Binary file not shown.
BIN
Productos2.XG1
Normal file
BIN
Productos2.XG1
Normal file
Binary file not shown.
BIN
Productos2.YG0
Normal file
BIN
Productos2.YG0
Normal file
Binary file not shown.
BIN
Productos2.YG1
Normal file
BIN
Productos2.YG1
Normal file
Binary file not shown.
BIN
Productos2.db
Normal file
BIN
Productos2.db
Normal file
Binary file not shown.
9
README.md
Normal file
9
README.md
Normal file
@ -0,0 +1,9 @@
|
||||
#TAlarcon
|
||||
|
||||
|
||||
*11/07/1998*
|
||||
|
||||
ToDo: wwtcf?
|
||||
|
||||
|
||||

|
BIN
RegistroTlf.DB
Normal file
BIN
RegistroTlf.DB
Normal file
Binary file not shown.
BIN
RegistroTlf.PX
Normal file
BIN
RegistroTlf.PX
Normal file
Binary file not shown.
BIN
RegistroTlf.XG0
Normal file
BIN
RegistroTlf.XG0
Normal file
Binary file not shown.
BIN
RegistroTlf.XG1
Normal file
BIN
RegistroTlf.XG1
Normal file
Binary file not shown.
BIN
RegistroTlf.YG0
Normal file
BIN
RegistroTlf.YG0
Normal file
Binary file not shown.
BIN
RegistroTlf.YG1
Normal file
BIN
RegistroTlf.YG1
Normal file
Binary file not shown.
730
TAlarcon.cpp
Normal file
730
TAlarcon.cpp
Normal file
@ -0,0 +1,730 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#include <io.h>
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "TAlarcon.h"
|
||||
#include "AcercaDe.h"
|
||||
#include "TAlarconBusc1.h"
|
||||
#include "TAlarconFichas.h"
|
||||
#include "TAlarconProductos.h"
|
||||
#include "TAlarconRegLlamadas.h"
|
||||
#include "TAlarconProductos2.h"
|
||||
#include "TAlarconRegLlamadasSIMPLE.h"
|
||||
#include "LSPrecios1.h"
|
||||
#include "LSPrecios2.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma link "Grids"
|
||||
#pragma link "ElastFrm"
|
||||
#pragma resource "*.dfm"
|
||||
TAplicacion *Aplicacion;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TAplicacion::TAplicacion(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
/*
|
||||
TbRegVehiculos -> Active = true;
|
||||
TbVehiculos -> Active = true;
|
||||
|
||||
TbCltProv -> Active = true;
|
||||
TbClientes -> Active = true;
|
||||
TbBuscarCltProv -> Active = true;
|
||||
|
||||
TbProductos1 -> Active = true;
|
||||
TbProductos2 -> Active = true;
|
||||
*/
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::ComboBox2Change(TObject *Sender)
|
||||
{
|
||||
FechaCombosL = TDateTime( ComboBox1 -> ItemIndex == -1 ? 98 : ComboBox1 -> ItemIndex + 98,
|
||||
ComboBox2 -> ItemIndex == -1 ? 1 : ComboBox2 -> ItemIndex + 1, 1 );
|
||||
// Ajusta Filtros
|
||||
ReajustaFiltros();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::ComboBox3Change(TObject *Sender)
|
||||
{
|
||||
FechaCombosH = TDateTime( ComboBox1 -> ItemIndex == -1 ? 98 : ComboBox1 -> ItemIndex + 98,
|
||||
ComboBox3 -> ItemIndex == -1 ? 12 : ComboBox3 -> ItemIndex + 1,
|
||||
UltimoDiaPara(ComboBox1 -> ItemIndex == -1 ? 98 : ComboBox1 -> ItemIndex + 1,
|
||||
ComboBox3 -> ItemIndex == -1 ? 12 : ComboBox3 -> ItemIndex + 1) );
|
||||
// Ajusta Filtros
|
||||
ReajustaFiltros();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::ComboBox1Change(TObject *Sender)
|
||||
{
|
||||
FechaCombosL = TDateTime( ComboBox1 -> ItemIndex == -1 ? 98 : ComboBox1 -> ItemIndex + 98,
|
||||
ComboBox2 -> ItemIndex == -1 ? 1 : ComboBox2 -> ItemIndex + 1, 1 );
|
||||
FechaCombosH = TDateTime( ComboBox1 -> ItemIndex == -1 ? 98 : ComboBox1 -> ItemIndex + 98,
|
||||
ComboBox3 -> ItemIndex == -1 ? 12 : ComboBox3 -> ItemIndex + 1,
|
||||
UltimoDiaPara(ComboBox1 -> ItemIndex == -1 ? 98 : ComboBox1 -> ItemIndex + 98,
|
||||
ComboBox3 -> ItemIndex == -1 ? 12 : ComboBox3 -> ItemIndex + 1) );
|
||||
// Ajusta Filtros
|
||||
ReajustaFiltros();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::ReajustaFiltros(void)
|
||||
{
|
||||
// MessageBox( 0, AnsiString( DateToStr(FechaCombosL ) + " y " + DateToStr( FechaCombosH ) ).c_str(), "Aplicando Filtros", MB_OK );
|
||||
TbRegVehiculos->FilterOptions = TbRegVehiculos->FilterOptions << foCaseInsensitive;
|
||||
TbRegVehiculos->Filter = "([Fecha] >= '" + DateToStr(FechaCombosL) + "') AND [Fecha] < '" + DateToStr(FechaCombosH) + "'";
|
||||
if ( TbRegVehiculos -> RecordCount != 0 )
|
||||
{
|
||||
TbRegVehiculos->Filtered = true;
|
||||
/*
|
||||
} else {
|
||||
MessageBox( 0, "No existen registros\nen ese rango:\nANULANDO FILTRO", "Alerta de filtro", MB_OK );
|
||||
TbRegVehiculos->Filtered = false;
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::DBGrid4Enter(TObject *Sender)
|
||||
{
|
||||
if ( TbProductos1 -> RecordCount == 0 )
|
||||
TbProductos1 -> Insert();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TbProductos1NewRecord(TDataSet *DataSet)
|
||||
{
|
||||
TbProductos1 -> FieldByName( "Fecha" ) -> AsDateTime = TDateTime::CurrentDate();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TbProductos2NewRecord(TDataSet *DataSet)
|
||||
{
|
||||
TbProductos2 -> FieldByName( "Fecha" ) -> AsDateTime = TDateTime::CurrentDate();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::SpeedButton1Click(TObject *Sender)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::Salir1Click(TObject *Sender)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::Acercade1Click(TObject *Sender)
|
||||
{
|
||||
TAboutBox * fmAboutBox;
|
||||
|
||||
fmAboutBox = new TAboutBox(this);
|
||||
fmAboutBox->ShowModal();
|
||||
delete fmAboutBox;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TbRegVehiculosNewRecord(TDataSet *DataSet)
|
||||
{
|
||||
// El registro actual, tendrá como fecha y hora, las actuales
|
||||
TbRegVehiculos -> FieldByName( "Fecha" ) -> AsDateTime = TDateTime::CurrentDate();
|
||||
TbRegVehiculos -> FieldByName( "Hora" ) -> AsDateTime = TDateTime::CurrentTime();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::FormCreate(TObject *Sender)
|
||||
{
|
||||
unsigned short AActual, M, D;
|
||||
TDateTime FActual;
|
||||
|
||||
FActual = FActual . CurrentDate();
|
||||
FActual . DecodeDate( &AActual, &M, &D );
|
||||
|
||||
FechaCombosL = TDateTime( ComboBox1 -> ItemIndex == -1 ? AActual : ComboBox1 -> ItemIndex + 98,
|
||||
ComboBox2 -> ItemIndex == -1 ? 1 : ComboBox2 -> ItemIndex + 1, 1 );
|
||||
FechaCombosH = TDateTime( ComboBox1 -> ItemIndex == -1 ? AActual : ComboBox1 -> ItemIndex + 98,
|
||||
ComboBox3 -> ItemIndex == -1 ? 12 : ComboBox3 -> ItemIndex + 1,
|
||||
UltimoDiaPara(ComboBox1 -> ItemIndex == -1 ? AActual : ComboBox1 -> ItemIndex + 98,
|
||||
ComboBox3 -> ItemIndex == -1 ? 12 : ComboBox3 -> ItemIndex + 1) );
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
/**************************************************************************\
|
||||
|* *|
|
||||
|* CalculaAjusteDia *|
|
||||
|* *|
|
||||
|* Descripci¢n: *|
|
||||
|* Calcula el ajuste necesario para el comienzo de los dias *|
|
||||
|* y el n£mero de dias que tiene el mes en curso. *|
|
||||
|* *|
|
||||
|* Entradas: Retorno del Ajuste, y Dias del Mes *|
|
||||
|* Mes para iniciar c lculos *|
|
||||
|* *|
|
||||
|* Salidas: OK Todo ha ido bien *|
|
||||
|* ERROR *|
|
||||
|* *|
|
||||
\**************************************************************************/
|
||||
//int CalculaAjusteDias( char *Ajuste, char *DiasMes, char Mes, int Anyo )
|
||||
short int __fastcall TAplicacion::UltimoDiaPara( int Anyo, int Mes )
|
||||
{
|
||||
short int Ajuste, DiasMes;
|
||||
|
||||
int dev, n, b, dsem, dia;
|
||||
|
||||
|
||||
// Dias de los meses, si el a¤o no es bisiesto
|
||||
char DiasMeses[12] = { 31, 00, 31, 30, 31, 30,
|
||||
31, 31, 30, 31, 30, 31 };
|
||||
|
||||
// Ajusta febrero si es bisiesto el a¤o
|
||||
DiasMeses[1] = (Anyo%4 == 0) ? 29 : 28;
|
||||
|
||||
|
||||
// dev = ERROR;
|
||||
// Solo si la entrada es correcta
|
||||
if ( Mes >= 1 && Mes <=12 )
|
||||
{
|
||||
// dev = OK;
|
||||
// Obtenemos que dia, ( 0 - 365 ), es el 1§ del mes
|
||||
dia = 0;
|
||||
for ( n = 0; n < 12 && n < (Mes-1); n++ )
|
||||
dia += DiasMeses[n];
|
||||
|
||||
n = Anyo-1988; // a¤os para bisiesto
|
||||
b = (n+3)/4; // a¤os bisies. pasados
|
||||
dsem = 4; // 1o. Ene 1988: Viernes
|
||||
dsem += (n*365+b); // 1o. Ene actual
|
||||
dsem = (dsem+dia)%7; // d¡a seleccionado
|
||||
|
||||
/***/Ajuste = dsem;
|
||||
/***/DiasMes = DiasMeses[ Mes - 1 ];
|
||||
}
|
||||
|
||||
// return dev;
|
||||
return DiasMes;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::BusqAntClick(TObject *Sender)
|
||||
{
|
||||
TbCltProv->Filtered = false;
|
||||
|
||||
if ( TbBuscarCltProv -> FindPrior() == true )
|
||||
{
|
||||
TbCltProv -> GotoCurrent(TbBuscarCltProv);
|
||||
BusqSig -> Enabled = true;
|
||||
} else {
|
||||
BusqAnt -> Enabled = false;
|
||||
MessageBox( 0, "Coincidencia no hayada", "¡ Buscar Anterior !", MB_OK );
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::BusqSigClick(TObject *Sender)
|
||||
{
|
||||
TbCltProv->Filtered = false;
|
||||
|
||||
if ( TbBuscarCltProv -> FindNext() == true )
|
||||
{
|
||||
TbCltProv -> GotoCurrent(TbBuscarCltProv);
|
||||
BusqAnt -> Enabled = true;
|
||||
} else {
|
||||
BusqSig -> Enabled = false;
|
||||
MessageBox( 0, "Coincidencia no hayada", "¡ Buscar Anterior !", MB_OK );
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::BuscarFichaClick(TObject *Sender)
|
||||
{
|
||||
TDlgBuscProd *DlgBuscProd;
|
||||
|
||||
TbCltProv->Filtered = false;
|
||||
|
||||
DlgBuscProd = new TDlgBuscProd(this);
|
||||
|
||||
DlgBuscProd -> ShowModal();
|
||||
|
||||
if ( DlgBuscProd -> ModalResult == mrOk )
|
||||
{
|
||||
BusqSig -> Enabled = true;
|
||||
BusqAnt -> Enabled = true;
|
||||
TbCltProv -> GotoCurrent(TbBuscarCltProv);
|
||||
}
|
||||
|
||||
delete DlgBuscProd;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TbCltProvBeforeDelete(TDataSet *DataSet)
|
||||
{
|
||||
switch( MessageDlg( "Atención, está apunto de eliminar\na un cliente...\n¿Realmente desea continuar?", mtWarning, TMsgDlgButtons() << mbNo << mbYes, 0 ) )
|
||||
{
|
||||
case mrNo:
|
||||
Abort();
|
||||
break;
|
||||
default:
|
||||
// Borramos todos los registros asociados...
|
||||
if ( TbCltProv -> FieldByName( "CltProv" ) -> AsInteger == 1 )
|
||||
{
|
||||
TbClientes -> GotoCurrent(TbCltProv);
|
||||
while( TbProductos1 -> RecordCount != 0 )
|
||||
TbProductos1 -> Delete();
|
||||
while( TbProductos2 -> RecordCount != 0 )
|
||||
TbProductos2 -> Delete();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TabSheet1Enter(TObject *Sender)
|
||||
{
|
||||
TbClientes -> Refresh();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::BitBtn2Click(TObject *Sender)
|
||||
{
|
||||
TbVehiculos -> Delete();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TbVehiculosBeforeDelete(TDataSet *DataSet)
|
||||
{
|
||||
switch( MessageDlg( "Atención, está apunto de eliminar\nel registro completo para: " + TbVehiculos->FieldByName("MatriculaVehiculo")->AsString + "\n¿Realmente desea continuar?", mtWarning, TMsgDlgButtons() << mbNo << mbYes, 0 ) )
|
||||
{
|
||||
case mrNo:
|
||||
Abort();
|
||||
break;
|
||||
default:
|
||||
// Borramos todos los registros asociados...
|
||||
while( TbRegVehiculos -> RecordCount != 0 )
|
||||
TbRegVehiculos -> Delete();
|
||||
break;
|
||||
};
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::FichadeClientes1Click(TObject *Sender)
|
||||
{
|
||||
TLAgendaCltProv *QRListForm;
|
||||
|
||||
// Creamos una ficha del tipo TProductos
|
||||
// Guardando la referencia en la variable TProductos
|
||||
QRListForm = new TLAgendaCltProv(this);
|
||||
|
||||
// Mostrarla como modal y según el valor devuelto
|
||||
//InformeProductosS->ShowModal();
|
||||
QRListForm -> QuickReport -> Print();//Preview();//;//-> Print();
|
||||
|
||||
// Destruimos la ficha
|
||||
delete QRListForm;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::BitBtn3Click(TObject *Sender)
|
||||
{
|
||||
PageControl1 -> ActivePage = TabSheet1;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::BitBtn5Click(TObject *Sender)
|
||||
{
|
||||
PageControl1 -> ActivePage = TabSheet2;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::BitBtn6Click(TObject *Sender)
|
||||
{
|
||||
PageControl1 -> ActivePage = TabSheet3;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::BitBtn4Click(TObject *Sender)
|
||||
{
|
||||
PageControl1 -> ActivePage = TabSheet4;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::ListadodePrecios11Click(TObject *Sender)
|
||||
{
|
||||
PageControl1 -> ActivePage = TabSheet1;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::ListadodePrecios21Click(TObject *Sender)
|
||||
{
|
||||
PageControl1 -> ActivePage = TabSheet4;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::AgendadeTelfono1Click(TObject *Sender)
|
||||
{
|
||||
PageControl1 -> ActivePage = TabSheet2;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::Controldellamadas1Click(TObject *Sender)
|
||||
{
|
||||
PageControl1 -> ActivePage = TabSheet3;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::Button2Click(TObject *Sender)
|
||||
{
|
||||
TDateTime FechaL, FechaH;
|
||||
|
||||
try {
|
||||
FechaL = DpFechaL2 -> Date;
|
||||
FechaH = DpFechaH2 -> Date;
|
||||
/*
|
||||
FechaL = TDateTime( Edit1 -> Text . ToInt(), 1, 1 );
|
||||
FechaH = TDateTime( Edit2 -> Text . ToInt(), 12, 31 );
|
||||
*/
|
||||
TbProductos2->FilterOptions = TbProductos2->FilterOptions << foCaseInsensitive;
|
||||
TbProductos2->Filter = "([Fecha] >= '" + DateToStr(FechaL) + "') AND [Fecha] <= '" + DateToStr(FechaH) + "'";
|
||||
if ( TbProductos2 -> RecordCount != 0 )
|
||||
TbProductos2->Filtered = true;
|
||||
} catch(...)
|
||||
{
|
||||
// Nothing...
|
||||
MessageBox( 0, "Imposible aplicar filtro en ese rango.", "¡ Alerta !", MB_OK );
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::Button1Click(TObject *Sender)
|
||||
{
|
||||
TDateTime FechaL, FechaH;
|
||||
|
||||
try {
|
||||
FechaL = DpFechaL1 -> Date;
|
||||
FechaH = DpFechaH1 -> Date;
|
||||
/*
|
||||
FechaL = TDateTime( Edit3 -> Text . ToInt(), 1, 1 );
|
||||
FechaH = TDateTime( Edit4 -> Text . ToInt(), 12, 31 );
|
||||
*/
|
||||
TbProductos1->FilterOptions = TbProductos1->FilterOptions << foCaseInsensitive;
|
||||
TbProductos1->Filter = "([Fecha] >= '" + FechaL + "') AND [Fecha] <= '" + FechaH + "'";
|
||||
if ( TbProductos1 -> RecordCount != 0 )
|
||||
TbProductos1->Filtered = true;
|
||||
} catch(...)
|
||||
{
|
||||
// Nothing...
|
||||
MessageBox( 0, "Imposible aplicar filtro en ese rango.", "¡ Alerta !", MB_OK );
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::FormShow(TObject *Sender)
|
||||
{
|
||||
unsigned short AActual, M, D;
|
||||
|
||||
DpFechaL1 -> Date = TDateTime::CurrentDate();
|
||||
DpFechaL2 -> Date = TDateTime::CurrentDate();
|
||||
DpFechaH1 -> Date = TDateTime::CurrentDate();
|
||||
DpFechaH2 -> Date = TDateTime::CurrentDate();
|
||||
// TDateTime FActual;
|
||||
|
||||
// FActual = FActual . CurrentDate();
|
||||
// FActual . DecodeDate( &AActual, &M, &D );
|
||||
|
||||
PageControl1 -> ActivePage = TabSheet1;
|
||||
// Edit1 -> Text = AnsiString( AActual );
|
||||
// Edit2 -> Text = AnsiString( AActual );
|
||||
|
||||
PageControl1 -> ActivePage = TabSheet2;
|
||||
PageControl1 -> ActivePage = TabSheet3;
|
||||
PageControl1 -> ActivePage = TabSheet4;
|
||||
// Edit3 -> Text = AnsiString( AActual );
|
||||
// Edit4 -> Text = AnsiString( AActual );
|
||||
|
||||
PageControl1 -> ActivePage = TabSheet2;
|
||||
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::BitBtn1Click(TObject *Sender)
|
||||
{
|
||||
TbVehiculos -> Insert();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TbVehiculosNewRecord(TDataSet *DataSet)
|
||||
{
|
||||
// Pedimos el nº de matricula, el cual no puede ser modificado mas tarde...
|
||||
try {
|
||||
TbVehiculos -> FieldByName( "MatriculaVehiculo" ) -> AsString = InputBox( "Generando nuevo vehiculo", "Introduzca la nueva matricula:", "" );
|
||||
} catch(...) {
|
||||
Abort();
|
||||
}
|
||||
if ( TbVehiculos -> FieldByName( "MatriculaVehiculo" ) -> AsString . IsEmpty() )
|
||||
Abort();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TbCltProvNewRecord(TDataSet *DataSet)
|
||||
{
|
||||
/*
|
||||
try {
|
||||
TbCltProv -> FieldByName( "EnlacePrecios" ) -> AsDateTime = TDateTime::CurrentDateTime();
|
||||
} catch(...)
|
||||
{
|
||||
Abort();
|
||||
}
|
||||
*/
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::Button3Click(TObject *Sender)
|
||||
{
|
||||
if ( Edit5 -> Text . IsEmpty() )
|
||||
{
|
||||
TbCltProv->Filtered = false;
|
||||
} else {
|
||||
TbCltProv->FilterOptions = TbCltProv->FilterOptions << foCaseInsensitive;
|
||||
TbCltProv->Filter = "([Empresa] >= '" + Edit5 -> Text + "') AND [Empresa] <= '" + Edit6 -> Text + "'";
|
||||
if ( TbCltProv -> RecordCount != 0 )
|
||||
TbCltProv->Filtered = true;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::MatriculaSeleccionada1Click(TObject *Sender)
|
||||
{
|
||||
TQRListForm1 *QRListForm;
|
||||
|
||||
// Creamos una ficha del tipo TProductos
|
||||
// Guardando la referencia en la variable TProductos
|
||||
QRListForm = new TQRListForm1(this);
|
||||
|
||||
// Mostrarla como modal y según el valor devuelto
|
||||
//InformeProductosS->ShowModal();
|
||||
QRListForm -> QuickReport1 -> Print();//Preview();//;//-> Print();
|
||||
|
||||
// Destruimos la ficha
|
||||
delete QRListForm;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::Completo1Click(TObject *Sender)
|
||||
{
|
||||
TQRMDForm *QRListForm;
|
||||
|
||||
// Creamos una ficha del tipo TProductos
|
||||
// Guardando la referencia en la variable TProductos
|
||||
QRListForm = new TQRMDForm(this);
|
||||
|
||||
// Mostrarla como modal y según el valor devuelto
|
||||
//InformeProductosS->ShowModal();
|
||||
QRListForm -> QuickRep1 -> Print();//Preview();//;//-> Print();
|
||||
|
||||
// Destruimos la ficha
|
||||
delete QRListForm;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::ListadoCompleto1Click(TObject *Sender)
|
||||
{
|
||||
TQRMDForm2 *QRListForm;
|
||||
|
||||
// Creamos una ficha del tipo TProductos
|
||||
// Guardando la referencia en la variable TProductos
|
||||
QRListForm = new TQRMDForm2(this);
|
||||
|
||||
// Mostrarla como modal y según el valor devuelto
|
||||
//InformeProductosS->ShowModal();
|
||||
QRListForm -> QuickRep1 -> Print();//Preview();//;//-> Print();
|
||||
|
||||
// Destruimos la ficha
|
||||
delete QRListForm;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TODASlasllamadas1Click(TObject *Sender)
|
||||
{
|
||||
TQRMDForm1 *QRListForm;
|
||||
|
||||
// Creamos una ficha del tipo TProductos
|
||||
// Guardando la referencia en la variable TProductos
|
||||
QRListForm = new TQRMDForm1(this);
|
||||
|
||||
// Mostrarla como modal y según el valor devuelto
|
||||
//InformeProductosS->ShowModal();
|
||||
QRListForm -> QuickReport -> Print();//Preview();//;//-> Print();
|
||||
|
||||
// Destruimos la ficha
|
||||
delete QRListForm;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::FichaActual1Click(TObject *Sender)
|
||||
{
|
||||
TQRListForm2 *QRListForm;
|
||||
|
||||
// Creamos una ficha del tipo TProductos
|
||||
// Guardando la referencia en la variable TProductos
|
||||
QRListForm = new TQRListForm2(this);
|
||||
|
||||
// Mostrarla como modal y según el valor devuelto
|
||||
//InformeProductosS->ShowModal();
|
||||
QRListForm -> QuickReport -> Print();//Preview();//;//-> Print();
|
||||
|
||||
// Destruimos la ficha
|
||||
delete QRListForm;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::ClienteSeleccionado1Click(TObject *Sender)
|
||||
{
|
||||
TQRListForm3 *QRListForm;
|
||||
|
||||
// Creamos una ficha del tipo TProductos
|
||||
// Guardando la referencia en la variable TProductos
|
||||
QRListForm = new TQRListForm3(this);
|
||||
|
||||
// Mostrarla como modal y según el valor devuelto
|
||||
//InformeProductosS->ShowModal();
|
||||
QRListForm -> QuickReport -> Print();//Preview();//;//-> Print();
|
||||
|
||||
// Destruimos la ficha
|
||||
delete QRListForm;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TbProductos1BeforeInsert(TDataSet *DataSet)
|
||||
{
|
||||
if ( !( TbClientes -> RecNo > 0 && TbClientes -> RecordCount > 0 ) )
|
||||
{
|
||||
MessageBox( 0, "¿ No cree que debería crear,\no seleccionar un cliente,\nantes de agregar datos a NADIE?.", "¡ Atención !", MB_OK );
|
||||
Abort();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TAplicacion::TbProductos2BeforeInsert(TDataSet *DataSet)
|
||||
{
|
||||
if ( !( TbClientes -> RecNo > 0 && TbClientes -> RecordCount > 0 ) )
|
||||
{
|
||||
MessageBox( 0, "¿ No cree que debería crear,\no seleccionar un cliente,\nantes de agregar datos a NADIE?.", "¡ Atención !", MB_OK );
|
||||
Abort();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
void __fastcall TAplicacion::TbVehiculosBeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( access(TbVehiculos->TableName.c_str(),0) != 0 )
|
||||
TbVehiculos -> CreateTable();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::TbRegVehiculosBeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( access(TbRegVehiculos->TableName.c_str(),0) != 0 )
|
||||
TbRegVehiculos -> CreateTable();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::TbBuscarCltProvBeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( access(TbCltProv->TableName.c_str(),0) != 0 )
|
||||
{
|
||||
TbCltProv -> Active = false;
|
||||
TbCltProv -> CreateTable();
|
||||
TbCltProv -> Active = true;
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::TbClientesBeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( access(TbClientes->TableName.c_str(),0) != 0 )
|
||||
{
|
||||
TbCltProv -> Active = false;
|
||||
TbCltProv -> CreateTable();
|
||||
TbCltProv -> Active = true;
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::TbCltProvBeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( access(TbCltProv->TableName.c_str(),0) != 0 )
|
||||
TbCltProv -> CreateTable();
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::TbProductos1BeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( access(TbProductos1->TableName.c_str(),0) != 0 )
|
||||
TbProductos1 -> CreateTable();
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::TbProductos2BeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( access(TbProductos2->TableName.c_str(),0) != 0 )
|
||||
TbProductos2 -> CreateTable();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
void __fastcall TAplicacion::DBGrid3TitleClick(TColumn *Column)
|
||||
{
|
||||
switch( Column->ID )
|
||||
{
|
||||
case 1:
|
||||
TbCltProv -> IndexFieldNames = "CodCliente";
|
||||
break;
|
||||
case 3:
|
||||
TbCltProv -> IndexFieldNames = "Localidad;Empresa;PersonaContacto";
|
||||
break;
|
||||
case 4:
|
||||
TbCltProv -> IndexFieldNames = "PersonaContacto;Localidad;Empresa";
|
||||
break;
|
||||
default:
|
||||
TbCltProv -> IndexFieldNames = "Empresa;PersonaContacto";
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::DBGrid6TitleClick(TColumn *Column)
|
||||
{
|
||||
switch( Column->ID )
|
||||
{
|
||||
case 0:
|
||||
TbClientes -> IndexFieldNames = "CodCliente";
|
||||
break;
|
||||
/*
|
||||
case 2:
|
||||
TbClientes -> IndexFieldNames = "Localidad;Empresa;PersonaContacto";
|
||||
break;
|
||||
*/
|
||||
case 2:
|
||||
TbClientes -> IndexFieldNames = "PersonaContacto;Localidad;Empresa";
|
||||
break;
|
||||
default:
|
||||
TbClientes -> IndexFieldNames = "Empresa;PersonaContacto";
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::DBGrid5TitleClick(TColumn *Column)
|
||||
{
|
||||
switch( Column->ID )
|
||||
{
|
||||
case 0:
|
||||
TbClientes -> IndexFieldNames = "CodCliente";
|
||||
break;
|
||||
/*
|
||||
case 1:
|
||||
TbClientes -> IndexFieldNames = "Localidad;Empresa;PersonaContacto";
|
||||
break;
|
||||
*/
|
||||
case 2:
|
||||
TbClientes -> IndexFieldNames = "PersonaContacto;Localidad;Empresa";
|
||||
break;
|
||||
default:
|
||||
TbClientes -> IndexFieldNames = "Empresa;PersonaContacto";
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TAplicacion::FormClose(TObject *Sender,
|
||||
TCloseAction &Action)
|
||||
{
|
||||
if ( TbVehiculos -> State == dsEdit ||
|
||||
TbVehiculos -> State == dsInsert )
|
||||
TbVehiculos -> Post();
|
||||
if ( TbRegVehiculos -> State == dsEdit ||
|
||||
TbRegVehiculos -> State == dsInsert )
|
||||
TbRegVehiculos -> Post();
|
||||
if ( TbClientes -> State == dsEdit ||
|
||||
TbClientes -> State == dsInsert )
|
||||
TbClientes -> Post();
|
||||
if ( TbCltProv -> State == dsEdit ||
|
||||
TbCltProv -> State == dsInsert )
|
||||
TbCltProv -> Post();
|
||||
if ( TbProductos1 -> State == dsEdit ||
|
||||
TbProductos1 -> State == dsInsert )
|
||||
TbProductos1 -> Post();
|
||||
if ( TbProductos2 -> State == dsEdit ||
|
||||
TbProductos2 -> State == dsInsert )
|
||||
TbProductos2 -> Post();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
BIN
TAlarcon.dfm
Normal file
BIN
TAlarcon.dfm
Normal file
Binary file not shown.
202
TAlarcon.h
Normal file
202
TAlarcon.h
Normal file
@ -0,0 +1,202 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef TAlarconH
|
||||
#define TAlarconH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include <vcl\ComCtrls.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\Menus.hpp>
|
||||
#include <vcl\DBCtrls.hpp>
|
||||
#include <vcl\DBGrids.hpp>
|
||||
#include "Grids.hpp"
|
||||
#include <vcl\DB.hpp>
|
||||
#include <vcl\DBTables.hpp>
|
||||
#include <Db.hpp>
|
||||
#include "ElastFrm.hpp"
|
||||
//---------------------------------------------------------------------------
|
||||
class TAplicacion : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TPanel *Panel1;
|
||||
TStatusBar *StatusBar1;
|
||||
TPageControl *PageControl1;
|
||||
TTabSheet *TabSheet1;
|
||||
TTabSheet *TabSheet3;
|
||||
TSpeedButton *SpeedButton1;
|
||||
TMainMenu *MainMenu1;
|
||||
TMenuItem *Archivo1;
|
||||
TMenuItem *Salir1;
|
||||
TMenuItem *Ayuda1;
|
||||
TMenuItem *Acercade1;
|
||||
TMenuItem *Imprimir1;
|
||||
TMenuItem *FichadeClientes1;
|
||||
TMenuItem *ListadordeProductosClt1;
|
||||
TMenuItem *Ctrldellamadas1;
|
||||
|
||||
|
||||
TSpeedButton *BuscarFicha;
|
||||
TComboBox *ComboBox1;
|
||||
TDBGrid *DBGrid1;
|
||||
TLabel *Label2;
|
||||
TComboBox *ComboBox2;
|
||||
TComboBox *ComboBox3;
|
||||
TLabel *Label3;
|
||||
TLabel *Label1;
|
||||
TBevel *Bevel1;
|
||||
TBevel *Bevel2;
|
||||
TBitBtn *BitBtn1;
|
||||
TBitBtn *BitBtn2;
|
||||
TDataSource *DsVehiculos;
|
||||
TTable *TbVehiculos;
|
||||
TDataSource *DsRegVehiculos;
|
||||
TTable *TbRegVehiculos;
|
||||
TDBGrid *DBGrid2;
|
||||
TDataSource *DsCltProv;
|
||||
TTable *TbCltProv;
|
||||
TTabSheet *TabSheet2;
|
||||
TLabel *Label4;
|
||||
TDBGrid *DBGrid3;
|
||||
TDBMemo *DBMemo1;
|
||||
TDBRadioGroup *DBRadioGroup1;
|
||||
TDBGrid *DBGrid4;
|
||||
TDBGrid *DBGrid5;
|
||||
TDataSource *DsProductos1;
|
||||
TTable *TbProductos1;
|
||||
TDataSource *DsClientes;
|
||||
TTable *TbClientes;
|
||||
TSpeedButton *BusqAnt;
|
||||
TSpeedButton *BusqSig;
|
||||
TDataSource *DsBuscarCltProv;
|
||||
TTable *TbBuscarCltProv;
|
||||
TImage *Image1;
|
||||
TBitBtn *BitBtn3;
|
||||
TBitBtn *BitBtn4;
|
||||
TBitBtn *BitBtn5;
|
||||
TBitBtn *BitBtn6;
|
||||
TMenuItem *N1;
|
||||
TMenuItem *ListadodePrecios11;
|
||||
TMenuItem *ListadodePrecios21;
|
||||
TMenuItem *AgendadeTelfono1;
|
||||
TMenuItem *Controldellamadas1;
|
||||
TTabSheet *TabSheet4;
|
||||
TDBGrid *DBGrid6;
|
||||
TDBGrid *DBGrid7;
|
||||
TDataSource *DsProductos2;
|
||||
TTable *TbProductos2;
|
||||
TLabel *Label5;
|
||||
TLabel *Label6;
|
||||
TMenuItem *ListadodeProductosClt21;
|
||||
TButton *Button1;
|
||||
TButton *Button2;
|
||||
TMenuItem *Completo1;
|
||||
TMenuItem *FichaActual1;
|
||||
TMenuItem *ListadoCompleto1;
|
||||
TMenuItem *ClienteSeleccionado1;
|
||||
TMenuItem *TODASlasllamadas1;
|
||||
TMenuItem *MatriculaSeleccionada1;
|
||||
TBitBtn *BitBtn7;
|
||||
TBitBtn *BitBtn8;
|
||||
TBitBtn *BitBtn9;
|
||||
TLabel *Label9;
|
||||
TLabel *Label10;
|
||||
TEdit *Edit5;
|
||||
TEdit *Edit6;
|
||||
TButton *Button3;
|
||||
TLabel *Label11;
|
||||
TBitBtn *BitBtn10;
|
||||
TDateTimePicker *DpFechaL2;
|
||||
TDateTimePicker *DpFechaH2;
|
||||
TLabel *Label12;
|
||||
TLabel *Label13;
|
||||
TDateTimePicker *DpFechaL1;
|
||||
TDateTimePicker *DpFechaH1;
|
||||
TElasticForm *ElasticForm1;
|
||||
void __fastcall ComboBox2Change(TObject *Sender);
|
||||
void __fastcall ComboBox3Change(TObject *Sender);
|
||||
void __fastcall ComboBox1Change(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
void __fastcall DBGrid4Enter(TObject *Sender);
|
||||
|
||||
void __fastcall TbProductos1NewRecord(TDataSet *DataSet);
|
||||
void __fastcall SpeedButton1Click(TObject *Sender);
|
||||
void __fastcall Salir1Click(TObject *Sender);
|
||||
void __fastcall Acercade1Click(TObject *Sender);
|
||||
void __fastcall TbRegVehiculosNewRecord(TDataSet *DataSet);
|
||||
void __fastcall FormCreate(TObject *Sender);
|
||||
void __fastcall BusqAntClick(TObject *Sender);
|
||||
void __fastcall BusqSigClick(TObject *Sender);
|
||||
void __fastcall BuscarFichaClick(TObject *Sender);
|
||||
void __fastcall TbCltProvBeforeDelete(TDataSet *DataSet);
|
||||
void __fastcall TabSheet1Enter(TObject *Sender);
|
||||
void __fastcall BitBtn2Click(TObject *Sender);
|
||||
void __fastcall TbVehiculosBeforeDelete(TDataSet *DataSet);
|
||||
|
||||
|
||||
void __fastcall FichadeClientes1Click(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall BitBtn3Click(TObject *Sender);
|
||||
void __fastcall BitBtn5Click(TObject *Sender);
|
||||
void __fastcall BitBtn6Click(TObject *Sender);
|
||||
void __fastcall BitBtn4Click(TObject *Sender);
|
||||
void __fastcall ListadodePrecios11Click(TObject *Sender);
|
||||
void __fastcall ListadodePrecios21Click(TObject *Sender);
|
||||
void __fastcall AgendadeTelfono1Click(TObject *Sender);
|
||||
void __fastcall Controldellamadas1Click(TObject *Sender);
|
||||
|
||||
void __fastcall Button2Click(TObject *Sender);
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
void __fastcall FormShow(TObject *Sender);
|
||||
void __fastcall BitBtn1Click(TObject *Sender);
|
||||
void __fastcall TbVehiculosNewRecord(TDataSet *DataSet);
|
||||
void __fastcall TbCltProvNewRecord(TDataSet *DataSet);
|
||||
|
||||
|
||||
void __fastcall TbProductos2NewRecord(TDataSet *DataSet);
|
||||
void __fastcall Button3Click(TObject *Sender);
|
||||
|
||||
void __fastcall MatriculaSeleccionada1Click(TObject *Sender);
|
||||
void __fastcall Completo1Click(TObject *Sender);
|
||||
void __fastcall ListadoCompleto1Click(TObject *Sender);
|
||||
void __fastcall TODASlasllamadas1Click(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall FichaActual1Click(TObject *Sender);
|
||||
|
||||
void __fastcall ClienteSeleccionado1Click(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall TbProductos1BeforeInsert(TDataSet *DataSet);
|
||||
void __fastcall TbProductos2BeforeInsert(TDataSet *DataSet);
|
||||
|
||||
void __fastcall TbVehiculosBeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall TbRegVehiculosBeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall TbBuscarCltProvBeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall TbClientesBeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall TbCltProvBeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall TbProductos1BeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall TbProductos2BeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall DBGrid3TitleClick(TColumn *Column);
|
||||
void __fastcall DBGrid6TitleClick(TColumn *Column);
|
||||
void __fastcall DBGrid5TitleClick(TColumn *Column);
|
||||
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
||||
private: // User declarations
|
||||
void __fastcall ReajustaFiltros(void);
|
||||
short int __fastcall TAplicacion::UltimoDiaPara( int Anyo, int Mes );
|
||||
public: // User declarations
|
||||
TDateTime FechaCombosL, FechaCombosH;
|
||||
__fastcall TAplicacion(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TAplicacion *Aplicacion;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
BIN
TAlarcon.ico
Normal file
BIN
TAlarcon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
32
TAlarcon1.cpp
Normal file
32
TAlarcon1.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl\vcl.h>
|
||||
#pragma hdrstop
|
||||
//---------------------------------------------------------------------------
|
||||
USEFORM("TAlarcon.cpp", Aplicacion);
|
||||
USERES("TAlarcon1.res");
|
||||
USEFORM("AcercaDe.cpp", AboutBox);
|
||||
USEFORM("TAlarconBusc1.cpp", DlgBuscProd);
|
||||
USEFORM("TAlarconFichas.cpp", LAgendaCltProv);
|
||||
USEFORM("TAlarconProductos.cpp", QRMDForm);
|
||||
USEFORM("TAlarconRegLlamadas.cpp", QRMDForm1);
|
||||
USEFORM("TAlarconProductos2.cpp", QRMDForm2);
|
||||
USEFORM("TAlarconRegLlamadasSIMPLE.cpp", QRListForm1);
|
||||
USEFORM("LSPrecios1.cpp", QRListForm2);
|
||||
USEFORM("LSPrecios2.cpp", QRListForm3);
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->Title = "Listín Tlf // Control de llamadas // Gestión de Precios";
|
||||
Application->CreateForm(__classid(TAplicacion), &Aplicacion);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
TAlarcon1.exe
Normal file
BIN
TAlarcon1.exe
Normal file
Binary file not shown.
123
TAlarcon1.mak
Normal file
123
TAlarcon1.mak
Normal file
@ -0,0 +1,123 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
VERSION = BCB.03
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = TAlarcon1.exe
|
||||
OBJFILES = TAlarcon1.obj TAlarcon.obj AcercaDe.obj TAlarconBusc1.obj TAlarconFichas.obj \
|
||||
TAlarconProductos.obj TAlarconRegLlamadas.obj TAlarconProductos2.obj \
|
||||
TAlarconRegLlamadasSIMPLE.obj LSPrecios1.obj LSPrecios2.obj
|
||||
RESFILES = TAlarcon1.res
|
||||
RESDEPEN = $(RESFILES) TAlarcon.dfm AcercaDe.dfm TAlarconBusc1.dfm TAlarconFichas.dfm \
|
||||
TAlarconProductos.dfm TAlarconRegLlamadas.dfm TAlarconProductos2.dfm \
|
||||
TAlarconRegLlamadasSIMPLE.dfm LSPrecios1.dfm LSPrecios2.dfm
|
||||
LIBFILES =
|
||||
LIBRARIES = QSElFrm.lib QRPT35.lib vcldbx35.lib vcldb35.lib vclx35.lib vcl35.lib
|
||||
SPARELIBS = vcl35.lib vclx35.lib vcldb35.lib vcldbx35.lib QRPT35.lib QSElFrm.lib
|
||||
PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \
|
||||
QRPT35.bpi TEEUI35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi NMFAST35.bpi \
|
||||
INETDB35.bpi INET35.bpi JDsoft.bpi
|
||||
PATHASM = .;
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -O2 -O-S -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
|
||||
CFLAG2 = -I$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl -H=$(BCB)\lib\vcld.csm
|
||||
CFLAG3 = -4
|
||||
PFLAGS = -U..\componentes\cdopping;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
|
||||
-I$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl -$Y -$W -$O- -v -JPHNV -M
|
||||
RFLAGS = -i$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl
|
||||
AFLAGS = /i$(BCB)\projects /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zd
|
||||
LFLAGS = -L..\componentes\cdopping;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \
|
||||
-aa -Tpe -x -v
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=1
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=1
|
||||
Build=0
|
||||
Debug=1
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=3082
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=JD soft.
|
||||
FileDescription=Listín Tlf. // Control llamadas // Gestion de Precios
|
||||
FileVersion=1.0.1.0
|
||||
InternalName=TAlarcon
|
||||
LegalCopyright=JD soft 1994-1998
|
||||
LegalTrademarks=JD soft
|
||||
OriginalFilename=TAlarcon1
|
||||
ProductName=Transportes Alarcon (Gestión Varios)
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=e-mail: Jose-David.Guillen@cs.us.es
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=1
|
||||
Item0=$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlUnitAliases]
|
||||
Count=1
|
||||
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
BIN
TAlarcon1.res
Normal file
BIN
TAlarcon1.res
Normal file
Binary file not shown.
86
TAlarconBusc1.cpp
Normal file
86
TAlarconBusc1.cpp
Normal file
@ -0,0 +1,86 @@
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "TAlarconBusc1.h"
|
||||
#include "TAlarcon.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma link "Grids"
|
||||
#pragma resource "*.dfm"
|
||||
TDlgBuscProd *DlgBuscProd;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TDlgBuscProd::TDlgBuscProd(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TDlgBuscProd::ComboBox1Change(TObject *Sender)
|
||||
{
|
||||
// Make the field we're locating in the leftmost field.
|
||||
Aplicacion -> TbBuscarCltProv->FieldByName(ComboBox1->Text)->Index = 0;
|
||||
/*
|
||||
// In order to use FindNearest, we have to be indexed based on the field
|
||||
// we're doing the find in. If we're using Locate, it doesn't matter what
|
||||
// the current index is, so we will set it to company, which is the default
|
||||
// in the Customer form.
|
||||
|
||||
if (ComboBox1->Text == "CustNo")
|
||||
*/
|
||||
Aplicacion -> TbBuscarCltProv->IndexName = "";
|
||||
|
||||
/*
|
||||
else
|
||||
DM2->CustLookup->IndexName = "ByCompany";
|
||||
*/
|
||||
|
||||
Edit1->SetFocus();
|
||||
Edit1->Text = "";
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TDlgBuscProd::Edit1Change(TObject *Sender)
|
||||
{
|
||||
AnsiString BuscarEsto;
|
||||
|
||||
BuscarEsto = Edit1->Text;
|
||||
|
||||
{ // Some non-indexed field.
|
||||
if ( //ComboBox1->Text != "Nombre del Producto" &&
|
||||
BuscarEsto == "" )
|
||||
BuscarEsto = "0";
|
||||
|
||||
Set<TLocateOption,0,1> flags;
|
||||
flags << loCaseInsensitive << loPartialKey;
|
||||
// Possibly apply the filter so we see only records matching this value.
|
||||
bool found;
|
||||
found = Aplicacion -> TbBuscarCltProv->Locate(ComboBox1->Text,
|
||||
BuscarEsto,
|
||||
flags);
|
||||
|
||||
if ( found )
|
||||
{
|
||||
AnsiString BuscarCota;
|
||||
BuscarCota = BuscarEsto + "Z";
|
||||
|
||||
Aplicacion -> TbBuscarCltProv->FilterOptions = Aplicacion -> TbBuscarCltProv->FilterOptions << foCaseInsensitive;
|
||||
|
||||
Aplicacion -> TbBuscarCltProv->Filtered = true;
|
||||
Aplicacion -> TbBuscarCltProv->Filter = "([" + ComboBox1->Text + "] >= '" + BuscarEsto + "') AND [" + ComboBox1->Text + "] < '" + BuscarCota + "'";
|
||||
}
|
||||
else
|
||||
Aplicacion -> TbBuscarCltProv->Filtered = false;
|
||||
}
|
||||
|
||||
Aplicacion -> TbBuscarCltProv->Refresh();
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TDlgBuscProd::DBGrid1DblClick(TObject *Sender)
|
||||
{
|
||||
ModalResult = mrOk;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
BIN
TAlarconBusc1.dfm
Normal file
BIN
TAlarconBusc1.dfm
Normal file
Binary file not shown.
43
TAlarconBusc1.h
Normal file
43
TAlarconBusc1.h
Normal file
@ -0,0 +1,43 @@
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef TAlarconBusc1H
|
||||
#define TAlarconBusc1H
|
||||
//----------------------------------------------------------------------------
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Graphics.hpp>
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\SysUtils.hpp>
|
||||
#include <vcl\Windows.hpp>
|
||||
#include <vcl\System.hpp>
|
||||
#include <vcl\DBGrids.hpp>
|
||||
#include "Grids.hpp"
|
||||
#include <vcl\DBTables.hpp>
|
||||
#include <vcl\DB.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TDlgBuscProd : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TBevel *Bevel1;
|
||||
TDBGrid *DBGrid1;
|
||||
TComboBox *ComboBox1;
|
||||
TEdit *Edit1;
|
||||
TLabel *Label1;
|
||||
TLabel *Label2;
|
||||
void __fastcall ComboBox1Change(TObject *Sender);
|
||||
void __fastcall Edit1Change(TObject *Sender);
|
||||
|
||||
void __fastcall DBGrid1DblClick(TObject *Sender);
|
||||
|
||||
private:
|
||||
public:
|
||||
virtual __fastcall TDlgBuscProd(TComponent* AOwner);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
extern TDlgBuscProd *DlgBuscProd;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
21
TAlarconFichas.cpp
Normal file
21
TAlarconFichas.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "TAlarconFichas.h"
|
||||
#include "TAlarcon.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
TLAgendaCltProv *LAgendaCltProv;
|
||||
//---------------------------------------------------------------------
|
||||
// QuickReport simple list
|
||||
// - Connect a datasource to the QuickReport component
|
||||
// - Put QRDBText components on the Detail band
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TLAgendaCltProv::TLAgendaCltProv(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user