//---------------------------------------------------------------------------
#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
