First commit 27/10/2000
This commit is contained in:
commit
7733370334
953
Agenda.cpp
Normal file
953
Agenda.cpp
Normal file
@ -0,0 +1,953 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "Agenda.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "DlgQueImprimir.h"
|
||||
|
||||
#define Digito(Num, Dig) ( (Num-( (Num/(int)pow10(Dig)) * (int)pow10(Dig) )) / ( Dig==1 ? 1 : (int)pow10(Dig-1) ) )
|
||||
|
||||
// Comprobamos que la CC sea correcta
|
||||
bool CorrectaCC( int Banco, int Oficina, int DC, AnsiString NumCuenta )
|
||||
{
|
||||
int Suma1, Suma2, R1, R2;
|
||||
bool dev;
|
||||
char *NumCC;
|
||||
|
||||
dev = false;
|
||||
if ( NumCuenta.Length() == 10 )
|
||||
{
|
||||
NumCC = NumCuenta.c_str();
|
||||
Suma1 = Digito(Oficina, 1)* 6 +
|
||||
Digito(Oficina, 2)* 3 +
|
||||
Digito(Oficina, 3)* 7 +
|
||||
Digito(Oficina, 4)* 9 +
|
||||
Digito(Banco, 1)*10 +
|
||||
Digito(Banco, 2)* 5 +
|
||||
Digito(Banco, 3)* 8 +
|
||||
Digito(Banco, 4)* 4 ;
|
||||
Suma2 = (NumCC[9]-'0')*6 +
|
||||
(NumCC[8]-'0')*3 +
|
||||
(NumCC[7]-'0')*7 +
|
||||
(NumCC[6]-'0')*9 +
|
||||
(NumCC[5]-'0')*10 +
|
||||
(NumCC[4]-'0')*5 +
|
||||
(NumCC[3]-'0')*8 +
|
||||
(NumCC[2]-'0')*4 +
|
||||
(NumCC[1]-'0')*2 +
|
||||
(NumCC[0]-'0')*1 ;
|
||||
|
||||
R1 = 11-(Suma1%11); if ( R1==11 ) R1 = 0; if ( R1==10 ) R1 = 1;
|
||||
R2 = 11-(Suma2%11); if ( R2==11 ) R2 = 0; if ( R2==10 ) R2 = 1;
|
||||
|
||||
if ( Digito(DC,2)== R1 && Digito(DC,1)== R2 )
|
||||
dev = true;
|
||||
}
|
||||
return dev;
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
#pragma link "ElastFrm"
|
||||
#pragma link "ElastFrm"
|
||||
#pragma resource "*.dfm"
|
||||
TListadoClientes *ListadoClientes;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TListadoClientes::TListadoClientes(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
DB_Path = "datos\\";
|
||||
|
||||
Session1->Active = true;
|
||||
// Cargamos el DB_Path...
|
||||
{
|
||||
FILE *iFileHandle;
|
||||
int iFileLength;
|
||||
|
||||
char pszBuffer[180];
|
||||
if ( (iFileHandle = fopen( "Path.cfg", "r" )) != NULL )
|
||||
{
|
||||
fgets( pszBuffer, 180, iFileHandle );
|
||||
DB_Path = pszBuffer;
|
||||
fclose( iFileHandle );
|
||||
try {
|
||||
Image1->Picture->LoadFromFile( "logo.bmp" );
|
||||
} catch(...) {
|
||||
Image1->Visible = false;
|
||||
}
|
||||
} else {
|
||||
ShowMessage( "TRABAJANDO EN MODO PRIVADO" );
|
||||
}
|
||||
}
|
||||
|
||||
InfoBar->SimpleText = "Inicializando programa..." ;
|
||||
|
||||
MinFecha->Date = TDateTime::CurrentDate();
|
||||
MaxFecha->Date = TDateTime::CurrentDate();
|
||||
|
||||
OnDataChanged = false;
|
||||
SelIndex->ItemIndex = 0;
|
||||
|
||||
if ( FileExists( DB_Path + "correos\\poblacion.db" ) )
|
||||
{
|
||||
DBcorreos = true;
|
||||
TbCorreos->ReadOnly = true;
|
||||
TbCorreos->TableType = ttParadox;
|
||||
TbCorreos->TableName = DB_Path + "correos\\poblacion.db";
|
||||
TbCorreos->Active = true;
|
||||
} else {
|
||||
DBcorreos = false;
|
||||
}
|
||||
|
||||
|
||||
TbCarpetas->TableName = DB_Path + "carpetas.DB";
|
||||
TbLlamadas->TableName = DB_Path + "llamadas.DB";
|
||||
TbListado->TableName = DB_Path + "personas.DB";
|
||||
TbNotas->TableName = DB_Path + "misnotas.DB";
|
||||
TbListado->Active = true;
|
||||
TbLlamadas->Active = true;
|
||||
TbCarpetas->Active = true;
|
||||
TbNotas->Active = true;
|
||||
|
||||
InfoBar->SimpleText = "www.infdj.com" ;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::TbCarpetasBeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( !FileExists( TbCarpetas->TableName ) )
|
||||
{
|
||||
InfoBar->SimpleText= "Creando carpetas..." ;
|
||||
TbCarpetas -> TableType = ttParadox;
|
||||
|
||||
TbCarpetas -> FieldDefs -> Clear();
|
||||
|
||||
/********************\
|
||||
|* Datos Básicos *|
|
||||
\********************/
|
||||
TbCarpetas -> FieldDefs -> Add("IDcarpeta", ftAutoInc, 0, false );
|
||||
TbCarpetas -> FieldDefs -> Add("carpeta", ftString, 15, false );
|
||||
|
||||
TbCarpetas -> IndexDefs-> Clear();
|
||||
|
||||
// Creamos la base...
|
||||
TbCarpetas -> CreateTable();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::TbListadoBeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( !FileExists( TbListado->TableName ) )
|
||||
{
|
||||
InfoBar->SimpleText= "Creando personas..." ;
|
||||
TbListado -> TableType = ttParadox;
|
||||
|
||||
TbListado -> FieldDefs -> Clear();
|
||||
|
||||
/********************\
|
||||
|* Datos Básicos *|
|
||||
\********************/
|
||||
TbListado -> FieldDefs -> Add("CodCliente1", ftAutoInc, 0, false );
|
||||
TbListado -> FieldDefs -> Add("CodCliente2", ftString, 15, false );
|
||||
|
||||
TbListado -> FieldDefs -> Add("FAlta", ftDateTime, 0, false );
|
||||
TbListado -> FieldDefs -> Add("FModif", ftDateTime, 0, false );
|
||||
|
||||
TbListado -> FieldDefs -> Add("Empresa", ftString, 30, false );
|
||||
TbListado -> FieldDefs -> Add("Actividad", ftString, 25, false );
|
||||
TbListado -> FieldDefs -> Add("Nombre", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Apellidos", ftString, 30, false );
|
||||
TbListado -> FieldDefs -> Add("Dni Nif Pasaporte", ftSmallint, 0, false );
|
||||
TbListado -> FieldDefs -> Add("DocumentoDNP", ftString, 20, false );
|
||||
|
||||
TbListado -> FieldDefs -> Add("Telefono 1", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Telefono 2", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Telefono 3", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Telefono 4", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("e-Mail", ftString, 30, false );
|
||||
TbListado -> FieldDefs -> Add("url", ftString, 50, false );
|
||||
TbListado -> FieldDefs -> Add("Calle", ftString, 25, false );
|
||||
TbListado -> FieldDefs -> Add("Calle2", ftString, 25, false );
|
||||
TbListado -> FieldDefs -> Add("Num", ftString, 4, false );
|
||||
TbListado -> FieldDefs -> Add("Piso", ftString, 2, false );
|
||||
TbListado -> FieldDefs -> Add("Letra", ftString, 2, false );
|
||||
TbListado -> FieldDefs -> Add("Población", ftString, 20, false );
|
||||
TbListado -> FieldDefs -> Add("Provincia", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("CP", ftInteger, 0, false );
|
||||
|
||||
TbListado -> FieldDefs -> Add("Deposito", ftCurrency, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Credito", ftCurrency, 0, false );
|
||||
TbListado -> FieldDefs -> Add("TiempoH", ftInteger, 0, false );
|
||||
TbListado -> FieldDefs -> Add("TiempoM", ftInteger, 0, false );
|
||||
|
||||
/************************\
|
||||
|* Domiciliación Bancaria *|
|
||||
\************************/
|
||||
|
||||
TbListado -> FieldDefs -> Add("Titular de la cuenta", ftString, 30, false );
|
||||
TbListado -> FieldDefs -> Add("Nif del Titular", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Entidad Bancaria", ftString, 30, false );
|
||||
TbListado -> FieldDefs -> Add("Banco_Calle", ftString, 20, false );
|
||||
TbListado -> FieldDefs -> Add("Banco_Num", ftString, 4, false );
|
||||
TbListado -> FieldDefs -> Add("Banco_Población", ftString, 20, false );
|
||||
TbListado -> FieldDefs -> Add("Banco_Provincia", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Banco_CP", ftInteger, 0, false );
|
||||
|
||||
TbListado -> FieldDefs -> Add("Banco_Entidad", ftSmallint, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Banco_Sucursal", ftSmallint, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Banco_DC", ftSmallint, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Banco_NumCuenta", ftString, 10, false );
|
||||
|
||||
/************************\
|
||||
|* Información Extra *|
|
||||
\************************/
|
||||
|
||||
TbListado -> FieldDefs -> Add("Estado Civil", ftSmallint, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Fecha de Nacimiento", ftDate, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Profesión", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Años en la empresa",ftSmallint, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Personas en la familia", ftSmallint, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Estudios", ftSmallint, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Tipo vivienda", ftSmallint, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Años vivienda", ftSmallint, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Extras1", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Extras2", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Extras3", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Extras4", ftString, 15, false );
|
||||
TbListado -> FieldDefs -> Add("Notas", ftMemo, 200, false );
|
||||
|
||||
|
||||
TbListado -> FieldDefs -> Add("Imagen", ftString, 80, false );
|
||||
|
||||
TbListado -> FieldDefs -> Add("Proveedor", ftInteger, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Empleado", ftInteger, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Cliente", ftInteger, 0, false );
|
||||
TbListado -> FieldDefs -> Add("Amigo", ftInteger, 0, false );
|
||||
|
||||
TbListado -> FieldDefs -> Add("IDcarpeta", ftInteger, 0, false );
|
||||
|
||||
TbListado -> IndexDefs-> Clear();
|
||||
|
||||
TIndexOptions MyIndexOptions;
|
||||
MyIndexOptions << ixPrimary << ixUnique;
|
||||
TbListado->IndexDefs->Add("Primary", "CodCliente1", MyIndexOptions);
|
||||
|
||||
TbListado->IndexDefs->Add("Nombre", "Nombre", TIndexOptions() << ixCaseInsensitive);
|
||||
TbListado->IndexDefs->Add("Apellidos", "Apellidos", TIndexOptions() << ixCaseInsensitive);
|
||||
TbListado->IndexDefs->Add("Empresa", "Empresa", TIndexOptions() << ixCaseInsensitive);
|
||||
TbListado->IndexDefs->Add("Actividad", "Actividad", TIndexOptions() << ixCaseInsensitive);
|
||||
TbListado->IndexDefs->Add("Telefono 1", "Telefono 1", TIndexOptions() << ixCaseInsensitive);
|
||||
TbListado->IndexDefs->Add("Telefono 2", "Telefono 2", TIndexOptions() << ixCaseInsensitive);
|
||||
// Creamos la base...
|
||||
TbListado -> CreateTable();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::TbLlamadasBeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( !FileExists( TbLlamadas->TableName ) )
|
||||
{
|
||||
InfoBar->SimpleText= "Creando control de llamadas..." ;
|
||||
TbLlamadas -> TableType = ttParadox;
|
||||
|
||||
TbLlamadas -> FieldDefs -> Clear();
|
||||
|
||||
/********************\
|
||||
|* Datos Básicos *|
|
||||
\********************/
|
||||
TbLlamadas -> FieldDefs -> Add("IDllamada", ftAutoInc, 0, false );
|
||||
TbLlamadas -> FieldDefs -> Add("IDcliente", ftInteger, 0, false );
|
||||
TbLlamadas -> FieldDefs -> Add("fecha", ftDate, 0, false );
|
||||
TbLlamadas -> FieldDefs -> Add("hora", ftTime, 0, false );
|
||||
TbLlamadas -> FieldDefs -> Add("asunto", ftString, 30, false );
|
||||
TbLlamadas -> FieldDefs -> Add("notas", ftMemo, 160, false );
|
||||
|
||||
TbLlamadas -> IndexDefs-> Clear();
|
||||
|
||||
TbLlamadas->IndexDefs->Add("Primary", "IDllamada", TIndexOptions() << ixPrimary << ixUnique);
|
||||
TbLlamadas->IndexDefs->Add("EnlaceCliente", "IDcliente", TIndexOptions() << ixCaseInsensitive);
|
||||
|
||||
// Creamos la base...
|
||||
TbLlamadas -> CreateTable();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::FiltrarCategoriasClick(TObject *Sender)
|
||||
{
|
||||
FiltraCriterios();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::FiltrarCarpetasClick(TObject *Sender)
|
||||
{
|
||||
FiltraCriterios();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::FiltraCriterios(void)
|
||||
{
|
||||
AnsiString CadenaFiltro;
|
||||
|
||||
TbListado->FilterOptions = TbListado->FilterOptions << foCaseInsensitive;
|
||||
|
||||
if ( FiltrarCarpetas->Checked && !TbCarpetas->FieldByName( "IDcarpeta" )->AsString.IsEmpty() )
|
||||
CadenaFiltro = "( [IDcarpeta] = '" + TbCarpetas->FieldByName( "IDcarpeta" )->AsString + "') ";
|
||||
|
||||
switch( FiltrarCategorias->ItemIndex )
|
||||
{
|
||||
// Proveedores
|
||||
case 0:
|
||||
if ( FiltrarCarpetas->Checked ) CadenaFiltro += " AND ";
|
||||
CadenaFiltro += "[Proveedor] >= 1";
|
||||
break;
|
||||
// Empleados
|
||||
case 1:
|
||||
if ( FiltrarCarpetas->Checked ) CadenaFiltro += " AND ";
|
||||
CadenaFiltro += "[Empleado] >= 1";
|
||||
break;
|
||||
// Clientes
|
||||
case 2:
|
||||
if ( FiltrarCarpetas->Checked ) CadenaFiltro += " AND ";
|
||||
CadenaFiltro += "[Cliente] >= 1";
|
||||
break;
|
||||
// Amigos
|
||||
case 3:
|
||||
if ( FiltrarCarpetas->Checked ) CadenaFiltro += " AND ";
|
||||
CadenaFiltro += "[Amigo] >= 1";
|
||||
break;
|
||||
}
|
||||
|
||||
if ( CadenaFiltro.IsEmpty() )
|
||||
{
|
||||
TbListado->Filtered = false;
|
||||
} else {
|
||||
TbListado->Filter = CadenaFiltro;
|
||||
TbListado->Filtered = true;
|
||||
}
|
||||
|
||||
// AlfabetoChange(0);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::BitBtn1Click(TObject *Sender)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::AlfabetoChange(TObject *Sender)
|
||||
{
|
||||
// Posición dentro de la lista...
|
||||
switch ( Alfabeto->TabIndex )
|
||||
{
|
||||
case 0:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "a", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "b", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
case 1:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "c", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "d", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
case 2:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "e", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "f", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
case 3:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "g", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "h", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
case 4:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "i", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
if ( ! ( TbListado->Locate( "Nombre", "j", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "k", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
case 5:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "l", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "m", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
case 6:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "n", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "o", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
case 7:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "p", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
if ( ! ( TbListado->Locate( "Nombre", "q", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "r", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
case 8:
|
||||
TbListado->Locate( "Nombre", "s", TLocateOptions() << loCaseInsensitive << loPartialKey );
|
||||
break;
|
||||
case 9:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "t", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "u", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
case 10:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "v", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "w", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
case 11:
|
||||
if ( ! ( TbListado->Locate( "Nombre", "x", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
if ( ! ( TbListado->Locate( "Nombre", "y", TLocateOptions() << loCaseInsensitive << loPartialKey ) ) )
|
||||
TbListado->Locate( "Nombre", "z", TLocateOptions() << loCaseInsensitive << loPartialKey ) ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
void __fastcall TListadoClientes::DsCarpetasDataChange(TObject *Sender,
|
||||
TField *Field)
|
||||
{
|
||||
if ( !( TbCarpetas->State == dsEdit || TbCarpetas->State == dsInsert) )
|
||||
FiltraCriterios();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::DsListadoDataChange(TObject *Sender,
|
||||
TField *Field)
|
||||
{
|
||||
OnDataChanged = true;
|
||||
|
||||
if ( TbListado->State == dsEdit || TbListado->State == dsInsert )
|
||||
return;
|
||||
|
||||
// Cargamos la imagen
|
||||
|
||||
AnsiString PathToImage = DB_Path + "pictures\\"+ TbListado->FieldByName( "Imagen" )->AsString;
|
||||
SetCurrentDir( ExtractFilePath( Application->ExeName ) );
|
||||
try {
|
||||
Foto->Picture->LoadFromFile( PathToImage );
|
||||
} catch(...) {
|
||||
try {
|
||||
Foto->Picture->LoadFromFile( DB_Path + "pictures\\iError.bmp" );
|
||||
} catch(...) {
|
||||
// nothing
|
||||
};
|
||||
};
|
||||
|
||||
if ( CorrectaCC( TbListado->FieldByName("Banco_Entidad")->AsInteger,
|
||||
TbListado->FieldByName("Banco_Sucursal")->AsInteger,
|
||||
TbListado->FieldByName("Banco_DC")->AsInteger,
|
||||
TbListado->FieldByName("Banco_NumCuenta")->AsString )
|
||||
)
|
||||
{
|
||||
DBEdit28->Color = clWindow;
|
||||
DBEdit29->Color = clWindow;
|
||||
DBEdit30->Color = clWindow;
|
||||
DBEdit31->Color = clWindow;
|
||||
}else{
|
||||
DBEdit28->Color = clRed;
|
||||
DBEdit29->Color = clRed;
|
||||
DBEdit30->Color = clRed;
|
||||
DBEdit31->Color = clRed;
|
||||
}
|
||||
|
||||
CheckBox1->Checked = TbListado->FieldByName( "Proveedor" ) ->AsInteger;
|
||||
CheckBox3->Checked = TbListado->FieldByName( "Empleado" ) ->AsInteger;
|
||||
CheckBox2->Checked = TbListado->FieldByName( "Cliente" ) ->AsInteger;
|
||||
CheckBox4->Checked = TbListado->FieldByName( "Amigo" ) ->AsInteger;
|
||||
|
||||
OnDataChanged = false;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::FotoDblClick(TObject *Sender)
|
||||
{
|
||||
OpenPictureDialog1->InitialDir = DB_Path + "pictures\\";
|
||||
if (OpenPictureDialog1->Execute())
|
||||
{
|
||||
TbListado -> Edit();
|
||||
TbListado -> FieldByName( "Imagen" ) -> AsString = ExtractFileName(OpenPictureDialog1->FileName);
|
||||
TbListado -> Post();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton6Click(TObject *Sender)
|
||||
{
|
||||
ShowMessage( "No se puede validar la cuenta bancaria\nListado de bancos no accesible..." );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton5Click(TObject *Sender)
|
||||
{
|
||||
InfoBar->SimpleText = "Localizando Código Postal..." ;
|
||||
|
||||
if ( !DBcorreos )
|
||||
{
|
||||
ShowMessage( "No se puede validar el código postal.\nBase Postal no disponible..." );
|
||||
} else {
|
||||
if ( TbCorreos->Locate( "CODIGO", TbListado->FieldByName("CP")->AsString, TLocateOptions() << loCaseInsensitive ) )
|
||||
{
|
||||
AnsiString Provincias[] = { "###desconocido###",
|
||||
"Alava",
|
||||
"Albacete",
|
||||
"Alicante",
|
||||
"Almeria",
|
||||
"Avila",
|
||||
"Badajoz",
|
||||
"Illes Balears",
|
||||
"Barcelona",
|
||||
"Burgos",
|
||||
"Caceres",
|
||||
"Cadiz",
|
||||
"Castellon de la Plana",
|
||||
"Ciudad Real",
|
||||
"Cordoba",
|
||||
"Coruña, A",
|
||||
"Cuenca",
|
||||
"Girona",
|
||||
"Granada",
|
||||
"Guadalajara",
|
||||
"Guippuzcoa",
|
||||
"Huelva",
|
||||
"Huesca",
|
||||
"Jaen",
|
||||
"Leon",
|
||||
"Lleida",
|
||||
"Rioja, La",
|
||||
"Lugo",
|
||||
"Madrid",
|
||||
"Malaga",
|
||||
"Murcia",
|
||||
"Navarra",
|
||||
"Ourense",
|
||||
"Asturias",
|
||||
"Palencia",
|
||||
"Palmas, Las",
|
||||
"Pontevedra",
|
||||
"Salamanca",
|
||||
"Santa Cruz de Tenerife",
|
||||
"Cantabria",
|
||||
"Segovia",
|
||||
"Sevilla",
|
||||
"Soria",
|
||||
"Tarragona",
|
||||
"Teruel",
|
||||
"Toledo",
|
||||
"Valencia",
|
||||
"Valladolid",
|
||||
"Vizcaya",
|
||||
"Vizcaya",
|
||||
"Zamora",
|
||||
"Zaragoza",
|
||||
"Ceuta",
|
||||
"Melilla" };
|
||||
|
||||
|
||||
|
||||
TbListado->Edit();
|
||||
TbListado->FieldByName("Población")->AsString = TbCorreos->FieldByName("Descripcion")->AsString;
|
||||
|
||||
if ( TbCorreos->FieldByName("ID_Provincia")->AsInteger <= 50 &&
|
||||
TbCorreos->FieldByName("ID_Provincia")->AsInteger > 0
|
||||
)
|
||||
TbListado->FieldByName("Provincia")->AsString = Provincias[TbCorreos->FieldByName("ID_Provincia")->AsInteger];
|
||||
TbListado->Post();
|
||||
}
|
||||
}
|
||||
|
||||
InfoBar->SimpleText = "www.infdj.com";
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton1Click(TObject *Sender)
|
||||
{
|
||||
InfoBar->SimpleText = "Inicializando marcador Telefónico" ;
|
||||
// Marcar teléfono 1...
|
||||
PageControl1->ActivePage = TabSheet2;
|
||||
PageControl2->ActivePage = TabSheet6;
|
||||
TbLlamadas->Insert();
|
||||
InfoBar->SimpleText = "www.infdj.com" ;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton2Click(TObject *Sender)
|
||||
{
|
||||
InfoBar->SimpleText = "Inicializando marcador Telefónico" ;
|
||||
// Marcar teléfono 2
|
||||
PageControl1->ActivePage = TabSheet2;
|
||||
PageControl2->ActivePage = TabSheet6;
|
||||
TbLlamadas->Insert();
|
||||
InfoBar->SimpleText = "www.infdj.com" ;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton4Click(TObject *Sender)
|
||||
{
|
||||
InfoBar->SimpleText = "Enganchando con el Explorador" ;
|
||||
|
||||
char zFileName[80], zParams[80], zDir[80];
|
||||
AnsiString URL = "http://" + TbListado->FieldByName("url")->AsString;
|
||||
ShellExecute(Application->MainForm->Handle, 0, StrPCopy(zFileName, URL),
|
||||
StrPCopy(zParams, ""), StrPCopy(zDir, ""), SW_SHOWNOACTIVATE > 32);
|
||||
/*
|
||||
URL1->URL = TbListado->FieldByName("url")->AsString;
|
||||
URL1->URLType = utHttp;
|
||||
URL1->Execute();
|
||||
*/
|
||||
// Abrir i-explorer con esta página
|
||||
InfoBar->SimpleText = "www.infdj.com" ;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton3Click(TObject *Sender)
|
||||
{
|
||||
InfoBar->SimpleText = "Preparando nuevo correo..." ;
|
||||
|
||||
char zFileName[80], zParams[80], zDir[80];
|
||||
AnsiString URL = "mailto:" + TbListado->FieldByName("e-Mail")->AsString;
|
||||
ShellExecute(Application->MainForm->Handle, 0, StrPCopy(zFileName, URL),
|
||||
StrPCopy(zParams, ""), StrPCopy(zDir, ""), SW_SHOWNOACTIVATE > 32);
|
||||
|
||||
/*
|
||||
URL1->URL = TbListado->FieldByName("e-Mail")->AsString;
|
||||
URL1->URLType = utMailto;
|
||||
URL1->Execute();
|
||||
*/
|
||||
// Abrir outlook express con este correo...
|
||||
InfoBar->SimpleText = "www.infdj.com" ;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton8Click(TObject *Sender)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton7Click(TObject *Sender)
|
||||
{
|
||||
if ( PageControl1->ActivePage == TabSheet7 )
|
||||
{
|
||||
PageControl1->ActivePage = TabSheet7;
|
||||
PageControl3->ActivePage = TabSheet9;
|
||||
DBEdit32->SetFocus();
|
||||
TbNotas->Insert();
|
||||
} else {
|
||||
PageControl1->ActivePage = TabSheet2;
|
||||
PageControl2->ActivePage = TabSheet3;
|
||||
DBEdit1->SetFocus();
|
||||
TbListado->Insert();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton11Click(TObject *Sender)
|
||||
{
|
||||
TDlgImprimir *DlgImp;
|
||||
DlgImp = new TDlgImprimir(this);
|
||||
DlgImp->ShowModal();
|
||||
delete DlgImp;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::BuscarFichaClick(TObject *Sender)
|
||||
{
|
||||
PageControl1->ActivePage = TabSheet7;
|
||||
PageControl3->ActivePage = TabSheet9;
|
||||
DBEdit32->SetFocus();
|
||||
TbNotas->Insert();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton9Click(TObject *Sender)
|
||||
{
|
||||
if ( PageControl1->ActivePage == TabSheet7 )
|
||||
{
|
||||
TbNotas -> Delete();
|
||||
} else {
|
||||
if ( PageControl2->ActivePage == TabSheet6 )
|
||||
TbLlamadas -> Delete();
|
||||
else
|
||||
TbListado -> Delete();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::TbListadoBeforeDelete(TDataSet *DataSet)
|
||||
{
|
||||
if ( MessageDlg( "¿Esta seguro que desea eliminar el REGISTRO actual?", mtWarning, TMsgDlgButtons() << mbNo << mbYes, 0 ) == mrNo )
|
||||
Abort();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SelIndexChange(TObject *Sender)
|
||||
{
|
||||
TbListado->IndexFieldNames = SelIndex->Items->Strings[SelIndex->ItemIndex];
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::BuscadorKeyUp(TObject *Sender, WORD &Key,
|
||||
TShiftState Shift)
|
||||
{
|
||||
TbListado->Locate( SelIndex->Items->Strings[SelIndex->ItemIndex], Buscador->Text, TLocateOptions() << loCaseInsensitive << loPartialKey );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::TbLlamadasNewRecord(TDataSet *DataSet)
|
||||
{
|
||||
TbLlamadas->FieldByName( "fecha" )->AsDateTime = TDateTime::CurrentDate();
|
||||
TbLlamadas->FieldByName( "hora" )->AsDateTime = TDateTime::CurrentTime();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::FormClose(TObject *Sender,
|
||||
TCloseAction &Action)
|
||||
{
|
||||
if ( TbListado->State == dsEdit || TbListado->State == dsInsert )
|
||||
TbListado->Post();
|
||||
if ( TbLlamadas->State == dsEdit || TbLlamadas->State == dsInsert )
|
||||
TbLlamadas->Post();
|
||||
if ( TbCarpetas->State == dsEdit || TbCarpetas->State == dsInsert )
|
||||
TbCarpetas->Post();
|
||||
if ( TbNotas->State == dsEdit || TbNotas->State == dsInsert )
|
||||
TbNotas->Post();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::MinFechaChange(TObject *Sender)
|
||||
{
|
||||
FiltraLlamadas();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::FiltraLlamadas( void )
|
||||
{
|
||||
if ( FiltroLlamadas->Checked )
|
||||
{
|
||||
TbLlamadas->FilterOptions = TbLlamadas->FilterOptions << foCaseInsensitive;
|
||||
TbLlamadas->Filter = "([fecha] >= '" + MinFecha->Date + "' AND [fecha] <= '" + MaxFecha->Date +"')";
|
||||
TbLlamadas->Filtered = true;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::FiltroLlamadasClick(TObject *Sender)
|
||||
{
|
||||
if ( FiltroLlamadas->Checked )
|
||||
{
|
||||
FiltraLlamadas();
|
||||
} else {
|
||||
TbLlamadas->Filtered = false;
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::DBText1DblClick(TObject *Sender)
|
||||
{
|
||||
PageControl1->ActivePage = TabSheet2;
|
||||
PageControl2->ActivePage = TabSheet3;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::TbListadoNewRecord(TDataSet *DataSet)
|
||||
{
|
||||
TbListado->FieldByName( "FAlta" ) -> AsDateTime = TDateTime::CurrentDateTime();
|
||||
TbListado->FieldByName( "Proveedor" ) -> AsInteger = 0;
|
||||
TbListado->FieldByName( "Empleado" ) -> AsInteger = 0;
|
||||
TbListado->FieldByName( "Cliente" ) -> AsInteger = 1;
|
||||
TbListado->FieldByName( "Amigo" ) -> AsInteger = 0;
|
||||
|
||||
CheckBox1->Checked = false;
|
||||
CheckBox3->Checked = false;
|
||||
CheckBox2->Checked = true;
|
||||
CheckBox4->Checked = false;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::SpeedButton10Click(TObject *Sender)
|
||||
{
|
||||
// Traemos esta ficha a la carpeta seleccionada...
|
||||
TbListado->Edit();
|
||||
try {
|
||||
TbListado->FieldByName( "IDcarpeta" )->AsInteger = TbCarpetas->FieldByName( "IDcarpeta" )->AsInteger;
|
||||
TbListado->Post();
|
||||
}catch (...) {
|
||||
ShowMessage( "No hay carpetas disponibles o señaladas.\nPruebe a seleccionar o crear una nueva...");
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::CheckBox1Click(TObject *Sender)
|
||||
{
|
||||
try {
|
||||
if ( OnDataChanged ) return;
|
||||
TbListado->Edit();
|
||||
TbListado->FieldByName( "Proveedor" ) ->AsInteger = (int)( CheckBox1->Checked );
|
||||
TbListado->Post();
|
||||
} catch(...) {
|
||||
// nothing
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::CheckBox3Click(TObject *Sender)
|
||||
{
|
||||
try {
|
||||
if ( OnDataChanged ) return;
|
||||
TbListado->Edit();
|
||||
TbListado->FieldByName( "Empleado" ) ->AsInteger = (int)( CheckBox3->Checked );
|
||||
TbListado->Post();
|
||||
} catch(...) {
|
||||
// nothing
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::CheckBox2Click(TObject *Sender)
|
||||
{
|
||||
try {
|
||||
if ( OnDataChanged ) return;
|
||||
TbListado->Edit();
|
||||
TbListado->FieldByName( "Cliente" ) ->AsInteger = (int)( CheckBox2->Checked );
|
||||
TbListado->Post();
|
||||
} catch(...) {
|
||||
// nothing
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TListadoClientes::CheckBox4Click(TObject *Sender)
|
||||
{
|
||||
try {
|
||||
if ( OnDataChanged ) return;
|
||||
TbListado->Edit();
|
||||
TbListado->FieldByName( "Amigo" ) ->AsInteger = (int)( CheckBox4->Checked );
|
||||
TbListado->Post();
|
||||
} catch(...) {
|
||||
// nothing
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::TbNotasBeforeOpen(TDataSet *DataSet)
|
||||
{
|
||||
if ( !FileExists( TbNotas->TableName ) )
|
||||
{
|
||||
InfoBar->SimpleText= "Creando << mis notas >>..." ;
|
||||
TbNotas -> TableType = ttParadox;
|
||||
|
||||
TbNotas -> FieldDefs -> Clear();
|
||||
|
||||
/********************\
|
||||
|* Datos Básicos *|
|
||||
\********************/
|
||||
TbNotas -> FieldDefs -> Add("IDnota", ftAutoInc, 0, false );
|
||||
TbNotas -> FieldDefs -> Add("fecha", ftDate, 0, false );
|
||||
TbNotas -> FieldDefs -> Add("hora", ftTime, 0, false );
|
||||
TbNotas -> FieldDefs -> Add("asunto", ftString, 30, false );
|
||||
TbNotas -> FieldDefs -> Add("notas", ftMemo, 160, false );
|
||||
|
||||
TbNotas -> IndexDefs-> Clear();
|
||||
|
||||
TbNotas->IndexDefs->Add("Primary", "IDnota", TIndexOptions() << ixPrimary << ixUnique);
|
||||
|
||||
// Creamos la base...
|
||||
TbNotas -> CreateTable();
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::TbNotasNewRecord(TDataSet *DataSet)
|
||||
{
|
||||
TbNotas->FieldByName( "fecha" )->AsDateTime = TDateTime::CurrentDate();
|
||||
TbNotas->FieldByName( "hora" )->AsDateTime = TDateTime::CurrentTime();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::DBMemo3DblClick(TObject *Sender)
|
||||
{
|
||||
PageControl1->ActivePage = TabSheet7;
|
||||
PageControl3->ActivePage = TabSheet9;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::PageControl1Change(TObject *Sender)
|
||||
{
|
||||
if ( PageControl1->ActivePage == TabSheet7 )
|
||||
{
|
||||
DBNavigator1->DataSource = DsNotas;
|
||||
} else {
|
||||
DBNavigator1->DataSource = DsListado;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::DBEdit32KeyUp(TObject *Sender, WORD &Key,
|
||||
TShiftState Shift)
|
||||
{
|
||||
if ( Key == VK_RETURN )
|
||||
TbNotas->Post();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::TbNotasBeforeDelete(TDataSet *DataSet)
|
||||
{
|
||||
if ( MessageDlg( "¿Confirma que desea eliminar la ANOTACION actual?", mtWarning, TMsgDlgButtons() << mbNo << mbYes, 0 ) == mrNo )
|
||||
Abort();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::NextField(TObject *Sender, char &Key)
|
||||
{
|
||||
if ( Key == VK_RETURN )
|
||||
{
|
||||
TDBEdit *Siguiente[] = { DBEdit1, DBEdit2, DBEdit3, DBEdit4, DBEdit5,
|
||||
DBEdit6, DBEdit7, DBEdit17, DBEdit18, DBEdit8,
|
||||
DBEdit9, DBEdit10, DBEdit11, DBEdit12, DBEdit13,
|
||||
DBEdit19, DBEdit14, DBEdit15, DBEdit16, DBEdit1 };
|
||||
|
||||
for ( int i=0; i < 20; i++ )
|
||||
{
|
||||
if ( Sender == Siguiente[i] )
|
||||
{
|
||||
if ( TbListado->State == dsEdit || TbListado->State == dsInsert )
|
||||
TbListado->Post();
|
||||
Siguiente[i+1]->SetFocus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::NextField2(TObject *Sender, char &Key)
|
||||
{
|
||||
if ( Key == VK_RETURN )
|
||||
{
|
||||
TDBEdit *Siguiente[] = { DBEdit20, DBEdit21, DBEdit22, DBEdit23, DBEdit24,
|
||||
DBEdit25, DBEdit26, DBEdit27, DBEdit28, DBEdit29,
|
||||
DBEdit30, DBEdit31, DBEdit20 };
|
||||
|
||||
for ( int i=0; i < 12; i++ )
|
||||
{
|
||||
if ( Sender == Siguiente[i] )
|
||||
{
|
||||
if ( TbListado->State == dsEdit || TbListado->State == dsInsert )
|
||||
TbListado->Post();
|
||||
Siguiente[i+1]->SetFocus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TListadoClientes::TbListadoBeforePost(TDataSet *DataSet)
|
||||
{
|
||||
TbListado->FieldByName( "FModif" ) -> AsDateTime = TDateTime::CurrentDateTime();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
void __fastcall TListadoClientes::DBMemo1Exit(TObject *Sender)
|
||||
{
|
||||
if ( TbLlamadas->State == dsEdit || TbLlamadas->State == dsInsert )
|
||||
TbLlamadas->Post();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
void __fastcall TListadoClientes::TbLlamadasBeforeDelete(TDataSet *DataSet)
|
||||
{
|
||||
if ( MessageDlg( "¿Esta seguro que desea eliminar la LLAMADA actual?", mtWarning, TMsgDlgButtons() << mbNo << mbYes, 0 ) == mrNo )
|
||||
Abort();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
BIN
Agenda.dfm
Normal file
BIN
Agenda.dfm
Normal file
Binary file not shown.
325
Agenda.h
Normal file
325
Agenda.h
Normal file
@ -0,0 +1,325 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef AgendaH
|
||||
#define AgendaH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ComCtrls.hpp>
|
||||
#include <Db.hpp>
|
||||
#include <DBGrids.hpp>
|
||||
#include <DBTables.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <Grids.hpp>
|
||||
#include <DBCGrids.hpp>
|
||||
#include <DBCtrls.hpp>
|
||||
#include <Mask.hpp>
|
||||
#include <Dialogs.hpp>
|
||||
#include <ExtDlgs.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include "elastfrm.hpp"
|
||||
#include "ElastFrm.hpp"
|
||||
#include <ImgList.hpp>
|
||||
#include <jpeg.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TListadoClientes : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TPanel *Panel1;
|
||||
TPageControl *PageControl1;
|
||||
TStatusBar *InfoBar;
|
||||
TTable *TbCarpetas;
|
||||
TDataSource *DsCarpetas;
|
||||
TTabSheet *TabSheet1;
|
||||
TTabSheet *TabSheet2;
|
||||
TPageControl *PageControl2;
|
||||
TTabSheet *TabSheet3;
|
||||
TTabSheet *TabSheet4;
|
||||
TTabSheet *TabSheet5;
|
||||
TTabControl *Alfabeto;
|
||||
TTabSheet *TabSheet6;
|
||||
TCheckBox *FiltrarCarpetas;
|
||||
TRadioGroup *FiltrarCategorias;
|
||||
TGroupBox *GroupBox1;
|
||||
TTable *TbListado;
|
||||
TDataSource *DsListado;
|
||||
TDBMemo *DBMemo1;
|
||||
TDBGrid *DBGrid2;
|
||||
TTable *TbLlamadas;
|
||||
TDataSource *DsLlamadas;
|
||||
TLabel *Label1;
|
||||
TDBEdit *DBEdit1;
|
||||
TDBEdit *DBEdit2;
|
||||
TLabel *Label5;
|
||||
TDBEdit *DBEdit3;
|
||||
TLabel *Label6;
|
||||
TDBEdit *DBEdit4;
|
||||
TDBEdit *DBEdit5;
|
||||
TLabel *Label7;
|
||||
TLabel *Label8;
|
||||
TDBEdit *DBEdit6;
|
||||
TDBEdit *DBEdit7;
|
||||
TSpeedButton *SpeedButton1;
|
||||
TSpeedButton *SpeedButton2;
|
||||
TSpeedButton *SpeedButton3;
|
||||
TLabel *Label9;
|
||||
TDBEdit *DBEdit8;
|
||||
TLabel *Label10;
|
||||
TDBEdit *DBEdit9;
|
||||
TSpeedButton *SpeedButton4;
|
||||
TLabel *Label11;
|
||||
TLabel *Label12;
|
||||
TBevel *Bevel9;
|
||||
TDBEdit *DBEdit10;
|
||||
TDBEdit *DBEdit11;
|
||||
TDBEdit *DBEdit12;
|
||||
TDBEdit *DBEdit13;
|
||||
TLabel *Label13;
|
||||
TLabel *Label14;
|
||||
TLabel *Label15;
|
||||
TDBEdit *DBEdit14;
|
||||
TLabel *Label16;
|
||||
TDBEdit *DBEdit15;
|
||||
TLabel *Label17;
|
||||
TDBEdit *DBEdit16;
|
||||
TSpeedButton *SpeedButton5;
|
||||
TImage *Foto;
|
||||
TOpenPictureDialog *OpenPictureDialog1;
|
||||
TLabel *Label31;
|
||||
TBevel *Bevel11;
|
||||
TLabel *Label18;
|
||||
TLabel *Label24;
|
||||
TLabel *Label25;
|
||||
TLabel *Label26;
|
||||
TLabel *Label27;
|
||||
TLabel *Label28;
|
||||
TLabel *Label29;
|
||||
TLabel *Label30;
|
||||
TLabel *Label32;
|
||||
TLabel *Label33;
|
||||
TLabel *Label34;
|
||||
TLabel *Label35;
|
||||
TDBEdit *DBEdit20;
|
||||
TDBEdit *DBEdit21;
|
||||
TDBEdit *DBEdit22;
|
||||
TDBEdit *DBEdit23;
|
||||
TDBEdit *DBEdit24;
|
||||
TDBEdit *DBEdit25;
|
||||
TDBEdit *DBEdit26;
|
||||
TDBEdit *DBEdit27;
|
||||
TDBEdit *DBEdit28;
|
||||
TDBEdit *DBEdit29;
|
||||
TDBEdit *DBEdit30;
|
||||
TDBEdit *DBEdit31;
|
||||
TBevel *Bevel12;
|
||||
TBevel *Bevel13;
|
||||
TBevel *Bevel14;
|
||||
TSpeedButton *SpeedButton6;
|
||||
TBevel *Bevel15;
|
||||
TBevel *Bevel16;
|
||||
TBevel *Bevel17;
|
||||
TBevel *Bevel18;
|
||||
TBevel *Bevel19;
|
||||
TBevel *Bevel20;
|
||||
TPanel *Panel2;
|
||||
TSpeedButton *SpeedButton7;
|
||||
TSpeedButton *SpeedButton8;
|
||||
TSpeedButton *SpeedButton9;
|
||||
TSpeedButton *BuscarFicha;
|
||||
TSpeedButton *SpeedButton11;
|
||||
TDBNavigator *DBNavigator1;
|
||||
TPanel *Panel3;
|
||||
TLabel *Label19;
|
||||
TComboBox *SelIndex;
|
||||
TEdit *Buscador;
|
||||
TDBMemo *DBMemo2;
|
||||
TDBCtrlGrid *DBCtrlGrid1;
|
||||
TLabel *Label2;
|
||||
TLabel *Label4;
|
||||
TLabel *Label3;
|
||||
TDBText *DBText1;
|
||||
TDBText *DBText9;
|
||||
TDBText *DBText8;
|
||||
TDBText *DBText6;
|
||||
TDBText *DBText7;
|
||||
TDBText *DBText5;
|
||||
TDBText *DBText4;
|
||||
TDBText *DBText3;
|
||||
TDBText *DBText2;
|
||||
TPanel *Panel4;
|
||||
TDateTimePicker *MinFecha;
|
||||
TLabel *Label21;
|
||||
TDateTimePicker *MaxFecha;
|
||||
TCheckBox *FiltroLlamadas;
|
||||
TTable *TbCorreos;
|
||||
TImage *Image1;
|
||||
TBevel *Bevel1;
|
||||
TDBText *DBText10;
|
||||
TSpeedButton *SpeedButton10;
|
||||
TAutoIncField *TbListadoCodCliente1;
|
||||
TStringField *TbListadoCodCliente2;
|
||||
TStringField *TbListadoEmpresa;
|
||||
TStringField *TbListadoActividad;
|
||||
TStringField *TbListadoNombre;
|
||||
TStringField *TbListadoApellidos;
|
||||
TSmallintField *TbListadoDniNifPasaporte;
|
||||
TStringField *TbListadoDocumentoDNP;
|
||||
TStringField *TbListadoTelefono1;
|
||||
TStringField *TbListadoTelefono2;
|
||||
TStringField *TbListadoeMail;
|
||||
TStringField *TbListadourl;
|
||||
TStringField *TbListadoCalle;
|
||||
TStringField *TbListadoNum;
|
||||
TStringField *TbListadoPiso;
|
||||
TStringField *TbListadoLetra;
|
||||
TStringField *TbListadoPoblacin;
|
||||
TStringField *TbListadoProvincia;
|
||||
TIntegerField *TbListadoCP;
|
||||
TCurrencyField *TbListadoDeposito;
|
||||
TCurrencyField *TbListadoCredito;
|
||||
TStringField *TbListadoTitulardelacuenta;
|
||||
TStringField *TbListadoNifdelTitular;
|
||||
TStringField *TbListadoEntidadBancaria;
|
||||
TStringField *TbListadoBanco_Calle;
|
||||
TStringField *TbListadoBanco_Num;
|
||||
TStringField *TbListadoBanco_Poblacin;
|
||||
TStringField *TbListadoBanco_Provincia;
|
||||
TIntegerField *TbListadoBanco_CP;
|
||||
TSmallintField *TbListadoBanco_Entidad;
|
||||
TSmallintField *TbListadoBanco_Sucursal;
|
||||
TSmallintField *TbListadoBanco_DC;
|
||||
TStringField *TbListadoBanco_NumCuenta;
|
||||
TSmallintField *TbListadoEstadoCivil;
|
||||
TDateField *TbListadoFechadeNacimiento;
|
||||
TStringField *TbListadoProfesin;
|
||||
TSmallintField *TbListadoAosenlaempresa;
|
||||
TSmallintField *TbListadoPersonasenlafamilia;
|
||||
TSmallintField *TbListadoEstudios;
|
||||
TSmallintField *TbListadoTipovivienda;
|
||||
TSmallintField *TbListadoAosvivienda;
|
||||
TStringField *TbListadoExtras1;
|
||||
TStringField *TbListadoExtras2;
|
||||
TStringField *TbListadoExtras3;
|
||||
TStringField *TbListadoExtras4;
|
||||
TMemoField *TbListadoNotas;
|
||||
TStringField *TbListadoImagen;
|
||||
TIntegerField *TbListadoIDcarpeta;
|
||||
TStringField *TbListadoCarpeta;
|
||||
TDBEdit *DBEdit17;
|
||||
TDBEdit *DBEdit18;
|
||||
TSpeedButton *SpeedButton12;
|
||||
TSpeedButton *SpeedButton13;
|
||||
TStringField *TbListadoTelefono3;
|
||||
TStringField *TbListadoTelefono4;
|
||||
TDBGrid *DBGrid3;
|
||||
TIntegerField *TbListadoProveedor;
|
||||
TIntegerField *TbListadoEmpleado;
|
||||
TIntegerField *TbListadoCliente;
|
||||
TIntegerField *TbListadoAmigo;
|
||||
TCheckBox *CheckBox1;
|
||||
TCheckBox *CheckBox2;
|
||||
TCheckBox *CheckBox3;
|
||||
TCheckBox *CheckBox4;
|
||||
TDBEdit *DBEdit19;
|
||||
TStringField *TbListadoCalle2;
|
||||
TTabSheet *TabSheet7;
|
||||
TPageControl *PageControl3;
|
||||
TTabSheet *TabSheet8;
|
||||
TTable *TbNotas;
|
||||
TDataSource *DsNotas;
|
||||
TDBCtrlGrid *DBCtrlGrid2;
|
||||
TDBMemo *DBMemo3;
|
||||
TDBText *DBText11;
|
||||
TDBText *DBText12;
|
||||
TDBText *DBText13;
|
||||
TLabel *Label20;
|
||||
TLabel *Label22;
|
||||
TLabel *Label23;
|
||||
TTabSheet *TabSheet9;
|
||||
TLabel *Label36;
|
||||
TDBText *DBText14;
|
||||
TLabel *Label37;
|
||||
TDBMemo *DBMemo4;
|
||||
TLabel *Label38;
|
||||
TDBText *DBText16;
|
||||
TDBEdit *DBEdit32;
|
||||
TElasticForm *ElasticForm1;
|
||||
TLabel *Label39;
|
||||
TLabel *Label40;
|
||||
TDBText *DBText15;
|
||||
TLabel *Label41;
|
||||
TDBText *DBText17;
|
||||
TDBEdit *DBEdit33;
|
||||
TSplitter *Splitter1;
|
||||
TDateTimeField *TbListadoFAlta;
|
||||
TDateTimeField *TbListadoFModif;
|
||||
TSession *Session1;
|
||||
TImageList *FichaGeneral;
|
||||
TImageList *Completa;
|
||||
void __fastcall TbCarpetasBeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall TbListadoBeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall TbLlamadasBeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall FiltrarCategoriasClick(TObject *Sender);
|
||||
void __fastcall FiltrarCarpetasClick(TObject *Sender);
|
||||
void __fastcall BitBtn1Click(TObject *Sender);
|
||||
void __fastcall AlfabetoChange(TObject *Sender);
|
||||
void __fastcall DsCarpetasDataChange(TObject *Sender, TField *Field);
|
||||
void __fastcall DsListadoDataChange(TObject *Sender, TField *Field);
|
||||
void __fastcall FotoDblClick(TObject *Sender);
|
||||
void __fastcall SpeedButton6Click(TObject *Sender);
|
||||
void __fastcall SpeedButton5Click(TObject *Sender);
|
||||
void __fastcall SpeedButton1Click(TObject *Sender);
|
||||
void __fastcall SpeedButton2Click(TObject *Sender);
|
||||
void __fastcall SpeedButton4Click(TObject *Sender);
|
||||
void __fastcall SpeedButton3Click(TObject *Sender);
|
||||
void __fastcall SpeedButton8Click(TObject *Sender);
|
||||
void __fastcall SpeedButton7Click(TObject *Sender);
|
||||
void __fastcall SpeedButton11Click(TObject *Sender);
|
||||
void __fastcall BuscarFichaClick(TObject *Sender);
|
||||
void __fastcall SpeedButton9Click(TObject *Sender);
|
||||
void __fastcall TbListadoBeforeDelete(TDataSet *DataSet);
|
||||
void __fastcall SelIndexChange(TObject *Sender);
|
||||
void __fastcall BuscadorKeyUp(TObject *Sender, WORD &Key,
|
||||
TShiftState Shift);
|
||||
void __fastcall TbLlamadasNewRecord(TDataSet *DataSet);
|
||||
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
||||
void __fastcall MinFechaChange(TObject *Sender);
|
||||
void __fastcall FiltroLlamadasClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall DBText1DblClick(TObject *Sender);
|
||||
void __fastcall TbListadoNewRecord(TDataSet *DataSet);
|
||||
void __fastcall SpeedButton10Click(TObject *Sender);
|
||||
void __fastcall CheckBox1Click(TObject *Sender);
|
||||
void __fastcall CheckBox3Click(TObject *Sender);
|
||||
void __fastcall CheckBox2Click(TObject *Sender);
|
||||
void __fastcall CheckBox4Click(TObject *Sender);
|
||||
void __fastcall TbNotasBeforeOpen(TDataSet *DataSet);
|
||||
void __fastcall TbNotasNewRecord(TDataSet *DataSet);
|
||||
void __fastcall DBMemo3DblClick(TObject *Sender);
|
||||
void __fastcall PageControl1Change(TObject *Sender);
|
||||
void __fastcall DBEdit32KeyUp(TObject *Sender, WORD &Key,
|
||||
TShiftState Shift);
|
||||
void __fastcall TbNotasBeforeDelete(TDataSet *DataSet);
|
||||
void __fastcall NextField(TObject *Sender, char &Key);
|
||||
void __fastcall NextField2(TObject *Sender, char &Key);
|
||||
void __fastcall TbListadoBeforePost(TDataSet *DataSet);
|
||||
void __fastcall DBMemo1Exit(TObject *Sender);
|
||||
void __fastcall TbLlamadasBeforeDelete(TDataSet *DataSet);
|
||||
|
||||
private: // User declarations
|
||||
bool DBcorreos;
|
||||
void __fastcall FiltraLlamadas( void );
|
||||
public: // User declarations
|
||||
void __fastcall FiltraCriterios(void);
|
||||
__fastcall TListadoClientes(TComponent* Owner);
|
||||
bool OnDataChanged;
|
||||
AnsiString DB_Path;
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TListadoClientes *ListadoClientes;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
||||
|
108
AgendaLlamadas.bpr
Normal file
108
AgendaLlamadas.bpr
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!-- C++Builder XML Project -->
|
||||
<PROJECT>
|
||||
<MACROS>
|
||||
<VERSION value="BCB.05.03"/>
|
||||
<PROJECT value="AgendaLlamadas.exe"/>
|
||||
<OBJFILES value="AgendaLlamadas.obj Agenda.obj DlgQueImprimir.obj QR_ListadoGeneral.obj
|
||||
QR_Mailing.obj QR_FichaCompleta.obj"/>
|
||||
<RESFILES value="AgendaLlamadas.res"/>
|
||||
<IDLFILES value=""/>
|
||||
<IDLGENFILES value=""/>
|
||||
<DEFFILE value=""/>
|
||||
<RESDEPEN value="$(RESFILES) Agenda.dfm DlgQueImprimir.dfm QR_ListadoGeneral.dfm
|
||||
QR_Mailing.dfm QR_FichaCompleta.dfm"/>
|
||||
<LIBFILES value=""/>
|
||||
<LIBRARIES value="qrpt50.lib vclbde50.lib vcldb50.lib vcl50.lib vclx50.lib"/>
|
||||
<SPARELIBS value="vclx50.lib vcl50.lib vcldb50.lib vclbde50.lib qrpt50.lib"/>
|
||||
<PACKAGES value="vclx50.bpi vcl50.bpi vcldb50.bpi vclbde50.bpi vcldbx50.bpi bcbsmp50.bpi
|
||||
dclocx50.bpi qrpt50.bpi teeui50.bpi vclsmp50.bpi teedb50.bpi tee50.bpi
|
||||
ibsmp50.bpi nmfast50.bpi inetdb50.bpi inet50.bpi"/>
|
||||
<PATHCPP value=".;"/>
|
||||
<PATHPAS value=".;"/>
|
||||
<PATHRC value=".;"/>
|
||||
<PATHASM value=".;"/>
|
||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||
<LINKER value="ilink32"/>
|
||||
<USERDEFINES value=""/>
|
||||
<SYSDEFINES value="NO_STRICT"/>
|
||||
<MAINSOURCE value="AgendaLlamadas.cpp"/>
|
||||
<INCLUDEPATH value="..\vcls\include;$(BCB)\include;$(BCB)\include\vcl"/>
|
||||
<LIBPATH value="..\vcls\include;$(BCB)\lib\obj;$(BCB)\lib;..\vcls\lib"/>
|
||||
<WARNINGS value="-w-par -w-8027 -w-8026"/>
|
||||
<WARNOPTSTR value=""/>
|
||||
</MACROS>
|
||||
<OPTIONS>
|
||||
<IDLCFLAGS value="-I..\vcls\include -I$(BCB)\include -I$(BCB)\include\vcl -src_suffix cpp -boa"/>
|
||||
<CFLAG1 value="-Od -H=c:\PROGRAM\CBUILDER\CBUILD~1\lib\vcl35.csm -Hc -Vx -Ve -Tkh30000
|
||||
-X- -r- -a8 -b- -k -y -v -vi- -c -tW -tWM"/>
|
||||
<CFLAG2 value=""/>
|
||||
<CFLAG3 value=""/>
|
||||
<PFLAGS value="-$YD -$W -$O- -v -M -JPHNE"/>
|
||||
<RFLAGS value=""/>
|
||||
<AFLAGS value="/mx /w2 /zd"/>
|
||||
<LFLAGS value="-D"" -aa -Tpe -x -Gn -v"/>
|
||||
<IFLAGS value=""/>
|
||||
</OPTIONS>
|
||||
<LINKER>
|
||||
<ALLOBJ value="c0w32.obj sysinit.obj $(OBJFILES)"/>
|
||||
<ALLRES value="$(RESFILES)"/>
|
||||
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
|
||||
</LINKER>
|
||||
<IDEOPTIONS>
|
||||
[Version Info]
|
||||
IncludeVerInfo=1
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=3082
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=JD Soft
|
||||
FileDescription=Visualizador de ficheros
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=recolector
|
||||
LegalCopyright=JD Soft. 199x-2000
|
||||
LegalTrademarks=JD Soft.
|
||||
OriginalFilename=Recolector.EXE
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
url=http://www.jd.infdj.com
|
||||
e-mail=jd@infdj.com
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
RemoteHost=
|
||||
RemotePath=
|
||||
RemoteDebug=0
|
||||
|
||||
[Compiler]
|
||||
ShowInfoMsgs=0
|
||||
LinkDebugVcl=0
|
||||
LinkCGLIB=0
|
||||
|
||||
[CORBA]
|
||||
AddServerUnit=1
|
||||
AddClientUnit=1
|
||||
PrecompiledHeaders=1
|
||||
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
26
AgendaLlamadas.cpp
Normal file
26
AgendaLlamadas.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
USERES("AgendaLlamadas.res");
|
||||
USEFORM("Agenda.cpp", ListadoClientes);
|
||||
USEFORM("DlgQueImprimir.cpp", DlgImprimir);
|
||||
USEFORM("QR_ListadoGeneral.cpp", Form1);
|
||||
USEFORM("QR_Mailing.cpp", QRLabelsForm); /* TQuickRep: File Type */
|
||||
USEFORM("QR_FichaCompleta.cpp", Form2);
|
||||
//---------------------------------------------------------------------------
|
||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application->Initialize();
|
||||
Application->CreateForm(__classid(TListadoClientes), &ListadoClientes);
|
||||
Application->CreateForm(__classid(TForm2), &Form2);
|
||||
Application->Run();
|
||||
}
|
||||
catch (Exception &exception)
|
||||
{
|
||||
Application->ShowException(&exception);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
BIN
AgendaLlamadas.exe
Normal file
BIN
AgendaLlamadas.exe
Normal file
Binary file not shown.
BIN
AgendaLlamadas.res
Normal file
BIN
AgendaLlamadas.res
Normal file
Binary file not shown.
64
DlgQueImprimir.cpp
Normal file
64
DlgQueImprimir.cpp
Normal file
@ -0,0 +1,64 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "DlgQueImprimir.h"
|
||||
#include "QR_Mailing.h"
|
||||
#include "QR_ListadoGeneral.h"
|
||||
#include "QR_FichaCompleta.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
#pragma resource "*.dfm"
|
||||
TDlgImprimir *DlgImprimir;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TDlgImprimir::TDlgImprimir(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TDlgImprimir::Button2Click(TObject *Sender)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TDlgImprimir::Button1Click(TObject *Sender)
|
||||
{
|
||||
|
||||
switch( RadioGroup1->ItemIndex )
|
||||
{
|
||||
// Listado Completo
|
||||
case 0:
|
||||
TForm2 *QRComp;
|
||||
QRComp = new TForm2(this);
|
||||
if ( !CheckBox1->Checked )
|
||||
QRComp->QRBand2->BandType = rbDetail;
|
||||
QRComp->QuickRep1->Print();
|
||||
delete QRComp;
|
||||
break;
|
||||
// Listado Rápido
|
||||
case 1:
|
||||
TForm1 *QRForm;
|
||||
QRForm = new TForm1(this);
|
||||
QRForm->QuickRep1->Preview();
|
||||
delete QRForm;
|
||||
break;
|
||||
// Pegatinas
|
||||
case 2:
|
||||
TQRLabelsForm *QRForm2;
|
||||
QRForm2 = new TQRLabelsForm(this);
|
||||
QRForm2->Preview();
|
||||
delete QRForm2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TDlgImprimir::RadioGroup1Click(TObject *Sender)
|
||||
{
|
||||
if ( RadioGroup1->ItemIndex == 0 )
|
||||
CheckBox1->Visible = true;
|
||||
else
|
||||
CheckBox1->Visible = false;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
62
DlgQueImprimir.dfm
Normal file
62
DlgQueImprimir.dfm
Normal file
@ -0,0 +1,62 @@
|
||||
object DlgImprimir: TDlgImprimir
|
||||
Left = 498
|
||||
Top = 140
|
||||
Width = 243
|
||||
Height = 166
|
||||
BorderIcons = [biSystemMenu]
|
||||
Caption = 'Imprimir...'
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object RadioGroup1: TRadioGroup
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 137
|
||||
Height = 121
|
||||
Items.Strings = (
|
||||
'Listado Completo'
|
||||
'Listado Rápido'
|
||||
'Pegatinas')
|
||||
TabOrder = 0
|
||||
OnClick = RadioGroup1Click
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 152
|
||||
Top = 72
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = '&Aceptar'
|
||||
TabOrder = 1
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 152
|
||||
Top = 104
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = '&Cancelar'
|
||||
TabOrder = 2
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 117
|
||||
Top = 31
|
||||
Width = 116
|
||||
Height = 17
|
||||
Alignment = taLeftJustify
|
||||
BiDiMode = bdLeftToRight
|
||||
Caption = '¿de solo esta Ficha?'
|
||||
Checked = True
|
||||
ParentBiDiMode = False
|
||||
State = cbChecked
|
||||
TabOrder = 3
|
||||
Visible = False
|
||||
end
|
||||
end
|
29
DlgQueImprimir.h
Normal file
29
DlgQueImprimir.h
Normal file
@ -0,0 +1,29 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifndef DlgQueImprimirH
|
||||
#define DlgQueImprimirH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TDlgImprimir : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TRadioGroup *RadioGroup1;
|
||||
TButton *Button1;
|
||||
TButton *Button2;
|
||||
TCheckBox *CheckBox1;
|
||||
void __fastcall Button2Click(TObject *Sender);
|
||||
void __fastcall Button1Click(TObject *Sender);
|
||||
void __fastcall RadioGroup1Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TDlgImprimir(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TDlgImprimir *DlgImprimir;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
26
QR_FichaCompleta.cpp
Normal file
26
QR_FichaCompleta.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "QR_FichaCompleta.h"
|
||||
#include "Agenda.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
#pragma resource "*.dfm"
|
||||
TForm2 *Form2;
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TForm2::TForm2(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall TForm2::QRBand2BeforePrint(TQRCustomBand *Sender,
|
||||
bool &PrintBand)
|
||||
{
|
||||
if ( FileExists( ListadoClientes->DB_Path + "pictures\\"+ ListadoClientes->TbListado->FieldByName( "Imagen" )->AsString ) )
|
||||
QRImage1->Picture->LoadFromFile( ListadoClientes->DB_Path + "pictures\\" + ListadoClientes->TbListado->FieldByName( "Imagen" )->AsString );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
1896
QR_FichaCompleta.dfm
Normal file
1896
QR_FichaCompleta.dfm
Normal file
File diff suppressed because it is too large
Load Diff
96
QR_FichaCompleta.h
Normal file
96
QR_FichaCompleta.h
Normal file
@ -0,0 +1,96 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifndef QR_FichaCompletaH
|
||||
#define QR_FichaCompletaH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <QuickRpt.hpp>
|
||||
#include <Qrctrls.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TForm2 : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TQuickRep *QuickRep1;
|
||||
TQRBand *QRBand2;
|
||||
TQRLabel *QRLabel1;
|
||||
TQRLabel *QRLabel2;
|
||||
TQRLabel *QRLabel3;
|
||||
TQRLabel *QRLabel4;
|
||||
TQRLabel *QRLabel5;
|
||||
TQRLabel *QRLabel6;
|
||||
TQRLabel *QRLabel7;
|
||||
TQRLabel *QRLabel8;
|
||||
TQRLabel *QRLabel9;
|
||||
TQRLabel *QRLabel10;
|
||||
TQRLabel *QRLabel11;
|
||||
TQRLabel *QRLabel12;
|
||||
TQRLabel *QRLabel13;
|
||||
TQRImage *QRImage1;
|
||||
TQRShape *QRShape1;
|
||||
TQRShape *QRShape2;
|
||||
TQRShape *QRShape3;
|
||||
TQRLabel *QRLabel14;
|
||||
TQRShape *QRShape4;
|
||||
TQRShape *QRShape5;
|
||||
TQRLabel *QRLabel15;
|
||||
TQRShape *QRShape6;
|
||||
TQRShape *QRShape7;
|
||||
TQRLabel *QRLabel16;
|
||||
TQRLabel *QRLabel17;
|
||||
TQRLabel *QRLabel18;
|
||||
TQRLabel *QRLabel19;
|
||||
TQRLabel *QRLabel20;
|
||||
TQRLabel *QRLabel21;
|
||||
TQRLabel *QRLabel22;
|
||||
TQRLabel *QRLabel23;
|
||||
TQRLabel *QRLabel24;
|
||||
TQRLabel *QRLabel25;
|
||||
TQRLabel *QRLabel26;
|
||||
TQRLabel *QRLabel27;
|
||||
TQRLabel *QRLabel28;
|
||||
TQRShape *QRShape8;
|
||||
TQRShape *QRShape9;
|
||||
TQRLabel *QRLabel29;
|
||||
TQRShape *QRShape10;
|
||||
TQRDBText *QRDBText1;
|
||||
TQRDBText *QRDBText2;
|
||||
TQRDBText *QRDBText3;
|
||||
TQRDBText *QRDBText4;
|
||||
TQRDBText *QRDBText5;
|
||||
TQRDBText *QRDBText6;
|
||||
TQRDBText *QRDBText7;
|
||||
TQRDBText *QRDBText8;
|
||||
TQRDBText *QRDBText9;
|
||||
TQRDBText *QRDBText10;
|
||||
TQRDBText *QRDBText11;
|
||||
TQRDBText *QRDBText12;
|
||||
TQRDBText *QRDBText13;
|
||||
TQRDBText *QRDBText14;
|
||||
TQRDBText *QRDBText15;
|
||||
TQRDBText *QRDBText16;
|
||||
TQRDBText *QRDBText17;
|
||||
TQRDBText *QRDBText18;
|
||||
TQRDBText *QRDBText19;
|
||||
TQRDBText *QRDBText20;
|
||||
TQRDBText *QRDBText21;
|
||||
TQRDBText *QRDBText22;
|
||||
TQRDBText *QRDBText23;
|
||||
TQRDBText *QRDBText24;
|
||||
TQRDBText *QRDBText25;
|
||||
TQRDBText *QRDBText26;
|
||||
TQRDBText *QRDBText27;
|
||||
TQRDBText *QRDBText28;
|
||||
void __fastcall QRBand2BeforePrint(TQRCustomBand *Sender,
|
||||
bool &PrintBand);
|
||||
private: // User declarations
|
||||
public: // User declarations
|
||||
__fastcall TForm2(TComponent* Owner);
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TForm2 *Form2;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
15
QR_ListadoGeneral.cpp
Normal file
15
QR_ListadoGeneral.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
//----------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "QR_ListadoGeneral.h"
|
||||
#include "Agenda.h"
|
||||
//----------------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
TForm1 *Form1;
|
||||
//----------------------------------------------------------------------------
|
||||
__fastcall TForm1::TForm1(TComponent* Owner)
|
||||
: TForm(Owner)
|
||||
{
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
BIN
QR_ListadoGeneral.dfm
Normal file
BIN
QR_ListadoGeneral.dfm
Normal file
Binary file not shown.
43
QR_ListadoGeneral.h
Normal file
43
QR_ListadoGeneral.h
Normal file
@ -0,0 +1,43 @@
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef QR_ListadoGeneralH
|
||||
#define QR_ListadoGeneralH
|
||||
//----------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <QuickRpt.hpp>
|
||||
#include <QRCtrls.hpp>
|
||||
#include <Db.hpp>
|
||||
#include <DBTables.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <Qrctrls.hpp>
|
||||
#include <quickrpt.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TForm1 : public TForm
|
||||
{
|
||||
__published:
|
||||
TQuickRep *QuickRep1;
|
||||
TQRBand *TitleBand1;
|
||||
TQRLabel *QRLabel1;
|
||||
TQRBand *PageFooterBand1;
|
||||
TQRSysData *QRSysData1;
|
||||
TQRBand *ColumnHeaderBand1;
|
||||
TQRBand *DetailBand1;
|
||||
TQRLabel *QRLabel2;
|
||||
TQRExpr *QRExpr1;
|
||||
TQRLabel *QRLabel3;
|
||||
TQRExpr *QRExpr2;
|
||||
TQRLabel *QRLabel4;
|
||||
TQRExpr *QRExpr3;
|
||||
TQRLabel *QRLabel5;
|
||||
TQRExpr *QRExpr4;
|
||||
TQRExpr *QRExpr5;
|
||||
private:
|
||||
public:
|
||||
__fastcall TForm1(TComponent* Owner);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
extern PACKAGE TForm1 *Form1;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
15
QR_Mailing.cpp
Normal file
15
QR_Mailing.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "QR_Mailing.h"
|
||||
#include "Agenda.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
TQRLabelsForm *QRLabelsForm;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TQRLabelsForm::TQRLabelsForm(TComponent* AOwner)
|
||||
: TQuickRep(AOwner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------
|
BIN
QR_Mailing.dfm
Normal file
BIN
QR_Mailing.dfm
Normal file
Binary file not shown.
42
QR_Mailing.h
Normal file
42
QR_Mailing.h
Normal file
@ -0,0 +1,42 @@
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef QR_MailingH
|
||||
#define QR_MailingH
|
||||
//----------------------------------------------------------------------------
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Quickrpt.hpp>
|
||||
#include <Dialogs.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Messages.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <System.hpp>
|
||||
#include <Qrctrls.hpp>
|
||||
#include <quickrpt.hpp>
|
||||
#include <QuickRpt.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TQRLabelsForm : public TQuickRep
|
||||
{
|
||||
__published:
|
||||
TQRBand *DetailBand1;
|
||||
TQRDBText *QRDBText1;
|
||||
TQRDBText *QRDBText2;
|
||||
TQRDBText *QRDBText3;
|
||||
TQRDBText *QRDBText4;
|
||||
TQRDBText *QRDBText5;
|
||||
TQRDBText *QRDBText6;
|
||||
TQRDBText *QRDBText7;
|
||||
TQRDBText *QRDBText8;
|
||||
TQRDBText *QRDBText9;
|
||||
TQRDBText *QRDBText10;
|
||||
private:
|
||||
public:
|
||||
virtual __fastcall TQRLabelsForm(TComponent* AOwner);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
extern PACKAGE TQRLabelsForm *QRLabelsForm;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
9
README.md
Normal file
9
README.md
Normal file
@ -0,0 +1,9 @@
|
||||
#06-jul-2002
|
||||
|
||||
|
||||
*27/10/2000*
|
||||
|
||||
ToDo: wwtcf?
|
||||
|
||||
|
||||

|
BIN
datos/Pictures/iError.bmp
Normal file
BIN
datos/Pictures/iError.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
BIN
datos/carpetas.DB
Normal file
BIN
datos/carpetas.DB
Normal file
Binary file not shown.
BIN
datos/llamadas.DB
Normal file
BIN
datos/llamadas.DB
Normal file
Binary file not shown.
BIN
datos/llamadas.MB
Normal file
BIN
datos/llamadas.MB
Normal file
Binary file not shown.
BIN
datos/llamadas.PX
Normal file
BIN
datos/llamadas.PX
Normal file
Binary file not shown.
BIN
datos/llamadas.XG0
Normal file
BIN
datos/llamadas.XG0
Normal file
Binary file not shown.
BIN
datos/llamadas.YG0
Normal file
BIN
datos/llamadas.YG0
Normal file
Binary file not shown.
BIN
datos/misnotas.DB
Normal file
BIN
datos/misnotas.DB
Normal file
Binary file not shown.
BIN
datos/misnotas.MB
Normal file
BIN
datos/misnotas.MB
Normal file
Binary file not shown.
BIN
datos/misnotas.PX
Normal file
BIN
datos/misnotas.PX
Normal file
Binary file not shown.
BIN
datos/personas.DB
Normal file
BIN
datos/personas.DB
Normal file
Binary file not shown.
BIN
datos/personas.MB
Normal file
BIN
datos/personas.MB
Normal file
Binary file not shown.
BIN
datos/personas.PX
Normal file
BIN
datos/personas.PX
Normal file
Binary file not shown.
BIN
datos/personas.XG0
Normal file
BIN
datos/personas.XG0
Normal file
Binary file not shown.
BIN
datos/personas.XG1
Normal file
BIN
datos/personas.XG1
Normal file
Binary file not shown.
BIN
datos/personas.XG2
Normal file
BIN
datos/personas.XG2
Normal file
Binary file not shown.
BIN
datos/personas.XG3
Normal file
BIN
datos/personas.XG3
Normal file
Binary file not shown.
BIN
datos/personas.XG4
Normal file
BIN
datos/personas.XG4
Normal file
Binary file not shown.
BIN
datos/personas.XG5
Normal file
BIN
datos/personas.XG5
Normal file
Binary file not shown.
BIN
datos/personas.YG0
Normal file
BIN
datos/personas.YG0
Normal file
Binary file not shown.
BIN
datos/personas.YG1
Normal file
BIN
datos/personas.YG1
Normal file
Binary file not shown.
BIN
datos/personas.YG2
Normal file
BIN
datos/personas.YG2
Normal file
Binary file not shown.
BIN
datos/personas.YG3
Normal file
BIN
datos/personas.YG3
Normal file
Binary file not shown.
BIN
datos/personas.YG4
Normal file
BIN
datos/personas.YG4
Normal file
Binary file not shown.
BIN
datos/personas.YG5
Normal file
BIN
datos/personas.YG5
Normal file
Binary file not shown.
BIN
jdsoft.bmp
Normal file
BIN
jdsoft.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
Loading…
x
Reference in New Issue
Block a user