first commit (2012-02-01)
This commit is contained in:
BIN
bin/gestionServicios.exe
Normal file
BIN
bin/gestionServicios.exe
Normal file
Binary file not shown.
BIN
bin/gestionServicios.tds
Normal file
BIN
bin/gestionServicios.tds
Normal file
Binary file not shown.
BIN
bin/gestorServicios.s3db
Normal file
BIN
bin/gestorServicios.s3db
Normal file
Binary file not shown.
BIN
bin/sqlite3.dll
Normal file
BIN
bin/sqlite3.dll
Normal file
Binary file not shown.
185
gestionServicios.bpr
Normal file
185
gestionServicios.bpr
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8' ?>
|
||||||
|
<!-- C++Builder XML Project -->
|
||||||
|
<PROJECT>
|
||||||
|
<MACROS>
|
||||||
|
<VERSION value="BCB.06.00"/>
|
||||||
|
<PROJECT value=""C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\bin\gestionServicios.exe""/>
|
||||||
|
<OBJFILES value="obj\gestionServicios.obj obj\clientes.obj obj\tsplash.obj obj\agentes.obj
|
||||||
|
obj\imprimirClientes.obj obj\cuentaPolizas.obj
|
||||||
|
obj\imprimirCuentaPolizas.obj obj\imprimirFichaCliente.obj obj\login_dlg.obj"/>
|
||||||
|
<RESFILES value="gestionServicios.res"/>
|
||||||
|
<IDLFILES value=""/>
|
||||||
|
<IDLGENFILES value=""/>
|
||||||
|
<DEFFILE value=""/>
|
||||||
|
<RESDEPEN value="$(RESFILES) src\clientes.dfm src\tsplash.dfm src\agentes.dfm
|
||||||
|
src\imprimirClientes.dfm src\cuentaPolizas.dfm
|
||||||
|
src\imprimirCuentaPolizas.dfm src\imprimirFichaCliente.dfm src\login_dlg.dfm"/>
|
||||||
|
<LIBFILES value=""/>
|
||||||
|
<LIBRARIES value="vclx.lib bdertl.lib QR5RunC6.lib ZParseSql.lib ZDbc.lib ZCore.lib
|
||||||
|
ZPlain.lib ZComponent.lib vcldb.lib dbrtl.lib rtl.lib vcl.lib"/>
|
||||||
|
<SPARELIBS value="vcl.lib rtl.lib dbrtl.lib vcldb.lib ZComponent.lib ZPlain.lib ZCore.lib
|
||||||
|
ZDbc.lib ZParseSql.lib QR5RunC6.lib bdertl.lib vclx.lib"/>
|
||||||
|
<PACKAGES value="vcl.bpi rtl.bpi dbrtl.bpi adortl.bpi vcldb.bpi vclx.bpi bdertl.bpi
|
||||||
|
vcldbx.bpi ibxpress.bpi dsnap.bpi cds.bpi bdecds.bpi teeui.bpi teedb.bpi
|
||||||
|
tee.bpi dss.bpi visualclx.bpi visualdbclx.bpi dsnapcrba.bpi dsnapcon.bpi
|
||||||
|
bcbsmp.bpi vclie.bpi xmlrtl.bpi inet.bpi inetdbbde.bpi inetdbxpress.bpi
|
||||||
|
inetdb.bpi nmfast.bpi webdsnap.bpi bcbie.bpi websnap.bpi soaprtl.bpi
|
||||||
|
dclocx.bpi dbexpress.bpi dbxcds.bpi indy.bpi bcb2kaxserver.bpi JDsoft.bpi
|
||||||
|
TVidGrab.bpi ZComponent.bpi ZPlain.bpi ZCore.bpi ZDbc.bpi ZParseSql.bpi
|
||||||
|
QR5RunC6.bpi"/>
|
||||||
|
<PATHCPP value=".;src"/>
|
||||||
|
<PATHPAS value=".;"/>
|
||||||
|
<PATHRC value=".;"/>
|
||||||
|
<PATHASM value=".;"/>
|
||||||
|
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||||
|
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||||
|
<LINKER value="ilink32"/>
|
||||||
|
<USERDEFINES value="_DEBUG"/>
|
||||||
|
<SYSDEFINES value="NO_STRICT"/>
|
||||||
|
<MAINSOURCE value="gestionServicios.cpp"/>
|
||||||
|
<INCLUDEPATH value=""C:\Archivos de programa\Borland\Quickrep5";C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\include;$(BCB)\include\vcl;C:\programacion\VCLs\zeos_mySQL\src\core;C:\programacion\VCLs\zeos_mySQL\src\dbc;C:\programacion\VCLs\zeos_mySQL\src\parsesql;C:\programacion\VCLs\zeos_mySQL\src\plain"/>
|
||||||
|
<LIBPATH value=""C:\Archivos de programa\Borland\Quickrep5";C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\Projects\Lib;C:\programacion\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib"/>
|
||||||
|
<WARNINGS value="-w-par"/>
|
||||||
|
<OTHERFILES value=""/>
|
||||||
|
</MACROS>
|
||||||
|
<OPTIONS>
|
||||||
|
<IDLCFLAGS value="-I"C:\Archivos de programa\Borland\Quickrep5"
|
||||||
|
-IC:\programacion\VCLs\zeos_mySQL\src\component -Isrc -I..\HAguila
|
||||||
|
-I$(BCB)\include -I$(BCB)\include\vcl
|
||||||
|
-IC:\programacion\VCLs\zeos_mySQL\src\core
|
||||||
|
-IC:\programacion\VCLs\zeos_mySQL\src\dbc
|
||||||
|
-IC:\programacion\VCLs\zeos_mySQL\src\parsesql
|
||||||
|
-IC:\programacion\VCLs\zeos_mySQL\src\plain -src_suffix cpp -D_DEBUG -boa"/>
|
||||||
|
<CFLAG1 value="-Od -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c
|
||||||
|
-tW -tWM"/>
|
||||||
|
<PFLAGS value="-N2"C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj"
|
||||||
|
-N0"C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj"
|
||||||
|
-$YD -$W -$O- -$A8 -v -JPHNE -M"/>
|
||||||
|
<RFLAGS value=""/>
|
||||||
|
<AFLAGS value="/mx /w2 /zd"/>
|
||||||
|
<LFLAGS value="-l"C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj"
|
||||||
|
-I"C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj"
|
||||||
|
-D"" -aa -Tpe -x -Gn -v"/>
|
||||||
|
<OTHERFILES value=""/>
|
||||||
|
</OPTIONS>
|
||||||
|
<LINKER>
|
||||||
|
<ALLOBJ value="c0w32.obj sysinit.obj $(OBJFILES)"/>
|
||||||
|
<ALLRES value="$(RESFILES)"/>
|
||||||
|
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
|
||||||
|
<OTHERFILES value=""/>
|
||||||
|
</LINKER>
|
||||||
|
<FILELIST>
|
||||||
|
<FILE FILENAME="gestionServicios.res" FORMNAME="" UNITNAME="gestionServicios.res" CONTAINERID="ResTool" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="gestionServicios.cpp" FORMNAME="" UNITNAME="gestionServicios" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\clientes.cpp" FORMNAME="gestionClientes" UNITNAME="clientes" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\tsplash.cpp" FORMNAME="Splash" UNITNAME="tsplash" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\agentes.cpp" FORMNAME="gestionAgentes" UNITNAME="agentes" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\imprimirClientes.cpp" FORMNAME="imprimirCarteraClientes" UNITNAME="imprimirClientes" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\cuentaPolizas.cpp" FORMNAME="gestionCuentaPolizas" UNITNAME="cuentaPolizas" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\imprimirCuentaPolizas.cpp" FORMNAME="imprCuentaPolizas" UNITNAME="imprimirCuentaPolizas" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\imprimirFichaCliente.cpp" FORMNAME="imprFichaCliente" UNITNAME="imprimirFichaCliente" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\login_dlg.cpp" FORMNAME="login" UNITNAME="login_dlg" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
</FILELIST>
|
||||||
|
<BUILDTOOLS>
|
||||||
|
</BUILDTOOLS>
|
||||||
|
|
||||||
|
<IDEOPTIONS>
|
||||||
|
[Version Info]
|
||||||
|
IncludeVerInfo=0
|
||||||
|
AutoIncBuild=0
|
||||||
|
MajorVer=1
|
||||||
|
MinorVer=0
|
||||||
|
Release=0
|
||||||
|
Build=0
|
||||||
|
Debug=0
|
||||||
|
PreRelease=0
|
||||||
|
Special=0
|
||||||
|
Private=0
|
||||||
|
DLL=0
|
||||||
|
Locale=1034
|
||||||
|
CodePage=1252
|
||||||
|
|
||||||
|
[Version Info Keys]
|
||||||
|
CompanyName=
|
||||||
|
FileDescription=
|
||||||
|
FileVersion=1.0.0.0
|
||||||
|
InternalName=
|
||||||
|
LegalCopyright=
|
||||||
|
LegalTrademarks=
|
||||||
|
OriginalFilename=
|
||||||
|
ProductName=
|
||||||
|
ProductVersion=1.0.0.0
|
||||||
|
Comments=
|
||||||
|
|
||||||
|
[Excluded Packages]
|
||||||
|
c:\archivos de programa\borland\cbuilder6\Bin\dclqrt60.bpl=QuickReport Components
|
||||||
|
c:\archivos de programa\borland\cbuilder6\Bin\dcltqr60.bpl=TeeChart for QuickReport Components
|
||||||
|
|
||||||
|
[HistoryLists\hlIncludePath]
|
||||||
|
Count=6
|
||||||
|
Item0=C:\Archivos de programa\Borland\Quickrep5;C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\include;$(BCB)\include\vcl;C:\programacion\VCLs\zeos_mySQL\src\core;C:\programacion\VCLs\zeos_mySQL\src\dbc;C:\programacion\VCLs\zeos_mySQL\src\parsesql;C:\programacion\VCLs\zeos_mySQL\src\plain
|
||||||
|
Item1=C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\include;$(BCB)\include\vcl;C:\programacion\VCLs\zeos_mySQL\src\core;C:\programacion\VCLs\zeos_mySQL\src\dbc;C:\programacion\VCLs\zeos_mySQL\src\parsesql;C:\programacion\VCLs\zeos_mySQL\src\plain
|
||||||
|
Item2=C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\include;$(BCB)\include\vcl;C:\programacion\VCLs\zeos_mySQL\src\core
|
||||||
|
Item3=C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\include;$(BCB)\include\vcl
|
||||||
|
Item4=src;..\HAguila;..\gestionServicios\src;$(BCB)\include;$(BCB)\include\vcl
|
||||||
|
Item5=..\HAguila;..\gestionServicios\src;$(BCB)\include;$(BCB)\include\vcl
|
||||||
|
|
||||||
|
[HistoryLists\hlLibraryPath]
|
||||||
|
Count=4
|
||||||
|
Item0=C:\Archivos de programa\Borland\Quickrep5;C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\Projects\Lib;C:\programacion\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
|
Item1=C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\Projects\Lib;C:\programacion\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
|
Item2=src;..\HAguila;..\gestionServicios\src;$(BCB)\Projects\Lib;C:\programacion\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
|
Item3=..\HAguila;..\gestionServicios\src;$(BCB)\Projects\Lib;C:\programacion\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
|
|
||||||
|
[HistoryLists\hlDebugSourcePath]
|
||||||
|
Count=1
|
||||||
|
Item0=$(BCB)\source\vcl
|
||||||
|
|
||||||
|
[HistoryLists\hlConditionals]
|
||||||
|
Count=1
|
||||||
|
Item0=_DEBUG
|
||||||
|
|
||||||
|
[HistoryLists\hlIntOutputDir]
|
||||||
|
Count=1
|
||||||
|
Item0=C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj
|
||||||
|
|
||||||
|
[HistoryLists\hlFinalOutputDir]
|
||||||
|
Count=2
|
||||||
|
Item0=C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\bin\
|
||||||
|
Item1=C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\bin
|
||||||
|
|
||||||
|
[HistoryLists\hIBPIOutputDir]
|
||||||
|
Count=1
|
||||||
|
Item0=C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj
|
||||||
|
|
||||||
|
[Debugging]
|
||||||
|
DebugSourceDirs=$(BCB)\source\vcl
|
||||||
|
|
||||||
|
[Parameters]
|
||||||
|
RunParams=
|
||||||
|
Launcher=
|
||||||
|
UseLauncher=0
|
||||||
|
DebugCWD=
|
||||||
|
HostApplication=
|
||||||
|
RemoteHost=
|
||||||
|
RemotePath=
|
||||||
|
RemoteLauncher=
|
||||||
|
RemoteCWD=
|
||||||
|
RemoteDebug=0
|
||||||
|
|
||||||
|
[Compiler]
|
||||||
|
ShowInfoMsgs=0
|
||||||
|
LinkDebugVcl=0
|
||||||
|
LinkCGLIB=0
|
||||||
|
|
||||||
|
[CORBA]
|
||||||
|
AddServerUnit=1
|
||||||
|
AddClientUnit=1
|
||||||
|
PrecompiledHeaders=1
|
||||||
|
|
||||||
|
[Language]
|
||||||
|
ActiveLang=
|
||||||
|
ProjectLang=
|
||||||
|
RootDir=
|
||||||
|
</IDEOPTIONS>
|
||||||
|
</PROJECT>
|
51
gestionServicios.cpp
Normal file
51
gestionServicios.cpp
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#include "tsplash.h"
|
||||||
|
#pragma hdrstop
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
USEFORM("src\clientes.cpp", gestionClientes);
|
||||||
|
USEFORM("src\tsplash.cpp", Splash);
|
||||||
|
USEFORM("src\agentes.cpp", gestionAgentes);
|
||||||
|
USEFORM("src\imprimirClientes.cpp", imprimirCarteraClientes);
|
||||||
|
USEFORM("src\cuentaPolizas.cpp", gestionCuentaPolizas);
|
||||||
|
USEFORM("src\imprimirCuentaPolizas.cpp", imprCuentaPolizas);
|
||||||
|
USEFORM("src\imprimirFichaCliente.cpp", imprFichaCliente);
|
||||||
|
USEFORM("src\login_dlg.cpp", login);
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||||
|
{
|
||||||
|
try {//outer finally
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Application->Initialize();
|
||||||
|
Splash = new TSplash(NULL);
|
||||||
|
Splash->Show();
|
||||||
|
Splash->Repaint();
|
||||||
|
|
||||||
|
Application->CreateForm(__classid(TgestionClientes), &gestionClientes);
|
||||||
|
Application->Run();
|
||||||
|
}
|
||||||
|
catch (Exception &exception)
|
||||||
|
{
|
||||||
|
Application->ShowException(&exception);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
throw Exception("");
|
||||||
|
}
|
||||||
|
catch (Exception &exception)
|
||||||
|
{
|
||||||
|
Application->ShowException(&exception);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__finally{
|
||||||
|
if(Splash)
|
||||||
|
delete Splash;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
BIN
gestionServicios.res
Normal file
BIN
gestionServicios.res
Normal file
Binary file not shown.
185
gestionServicios.~bpr
Normal file
185
gestionServicios.~bpr
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8' ?>
|
||||||
|
<!-- C++Builder XML Project -->
|
||||||
|
<PROJECT>
|
||||||
|
<MACROS>
|
||||||
|
<VERSION value="BCB.06.00"/>
|
||||||
|
<PROJECT value=""C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\bin\gestionServicios.exe""/>
|
||||||
|
<OBJFILES value="obj\gestionServicios.obj obj\clientes.obj obj\tsplash.obj obj\agentes.obj
|
||||||
|
obj\imprimirClientes.obj obj\cuentaPolizas.obj
|
||||||
|
obj\imprimirCuentaPolizas.obj obj\imprimirFichaCliente.obj obj\login_dlg.obj"/>
|
||||||
|
<RESFILES value="gestionServicios.res"/>
|
||||||
|
<IDLFILES value=""/>
|
||||||
|
<IDLGENFILES value=""/>
|
||||||
|
<DEFFILE value=""/>
|
||||||
|
<RESDEPEN value="$(RESFILES) src\clientes.dfm src\tsplash.dfm src\agentes.dfm
|
||||||
|
src\imprimirClientes.dfm src\cuentaPolizas.dfm
|
||||||
|
src\imprimirCuentaPolizas.dfm src\imprimirFichaCliente.dfm src\login_dlg.dfm"/>
|
||||||
|
<LIBFILES value=""/>
|
||||||
|
<LIBRARIES value="vclx.lib bdertl.lib QR5RunC6.lib ZParseSql.lib ZDbc.lib ZCore.lib
|
||||||
|
ZPlain.lib ZComponent.lib vcldb.lib dbrtl.lib rtl.lib vcl.lib"/>
|
||||||
|
<SPARELIBS value="vcl.lib rtl.lib dbrtl.lib vcldb.lib ZComponent.lib ZPlain.lib ZCore.lib
|
||||||
|
ZDbc.lib ZParseSql.lib QR5RunC6.lib bdertl.lib vclx.lib"/>
|
||||||
|
<PACKAGES value="vcl.bpi rtl.bpi dbrtl.bpi adortl.bpi vcldb.bpi vclx.bpi bdertl.bpi
|
||||||
|
vcldbx.bpi ibxpress.bpi dsnap.bpi cds.bpi bdecds.bpi teeui.bpi teedb.bpi
|
||||||
|
tee.bpi dss.bpi visualclx.bpi visualdbclx.bpi dsnapcrba.bpi dsnapcon.bpi
|
||||||
|
bcbsmp.bpi vclie.bpi xmlrtl.bpi inet.bpi inetdbbde.bpi inetdbxpress.bpi
|
||||||
|
inetdb.bpi nmfast.bpi webdsnap.bpi bcbie.bpi websnap.bpi soaprtl.bpi
|
||||||
|
dclocx.bpi dbexpress.bpi dbxcds.bpi indy.bpi bcb2kaxserver.bpi JDsoft.bpi
|
||||||
|
TVidGrab.bpi ZComponent.bpi ZPlain.bpi ZCore.bpi ZDbc.bpi ZParseSql.bpi
|
||||||
|
QR5RunC6.bpi"/>
|
||||||
|
<PATHCPP value=".;src"/>
|
||||||
|
<PATHPAS value=".;"/>
|
||||||
|
<PATHRC value=".;"/>
|
||||||
|
<PATHASM value=".;"/>
|
||||||
|
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||||
|
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||||
|
<LINKER value="ilink32"/>
|
||||||
|
<USERDEFINES value="_DEBUG"/>
|
||||||
|
<SYSDEFINES value="NO_STRICT"/>
|
||||||
|
<MAINSOURCE value="gestionServicios.cpp"/>
|
||||||
|
<INCLUDEPATH value=""C:\Archivos de programa\Borland\Quickrep5";C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\include;$(BCB)\include\vcl;C:\programacion\VCLs\zeos_mySQL\src\core;C:\programacion\VCLs\zeos_mySQL\src\dbc;C:\programacion\VCLs\zeos_mySQL\src\parsesql;C:\programacion\VCLs\zeos_mySQL\src\plain"/>
|
||||||
|
<LIBPATH value=""C:\Archivos de programa\Borland\Quickrep5";C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\Projects\Lib;C:\programacion\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib"/>
|
||||||
|
<WARNINGS value="-w-par"/>
|
||||||
|
<OTHERFILES value=""/>
|
||||||
|
</MACROS>
|
||||||
|
<OPTIONS>
|
||||||
|
<IDLCFLAGS value="-I"C:\Archivos de programa\Borland\Quickrep5"
|
||||||
|
-IC:\programacion\VCLs\zeos_mySQL\src\component -Isrc -I..\HAguila
|
||||||
|
-I$(BCB)\include -I$(BCB)\include\vcl
|
||||||
|
-IC:\programacion\VCLs\zeos_mySQL\src\core
|
||||||
|
-IC:\programacion\VCLs\zeos_mySQL\src\dbc
|
||||||
|
-IC:\programacion\VCLs\zeos_mySQL\src\parsesql
|
||||||
|
-IC:\programacion\VCLs\zeos_mySQL\src\plain -src_suffix cpp -D_DEBUG -boa"/>
|
||||||
|
<CFLAG1 value="-Od -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c
|
||||||
|
-tW -tWM"/>
|
||||||
|
<PFLAGS value="-N2"C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj"
|
||||||
|
-N0"C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj"
|
||||||
|
-$YD -$W -$O- -$A8 -v -JPHNE -M"/>
|
||||||
|
<RFLAGS value=""/>
|
||||||
|
<AFLAGS value="/mx /w2 /zd"/>
|
||||||
|
<LFLAGS value="-l"C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj"
|
||||||
|
-I"C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj"
|
||||||
|
-D"" -aa -Tpe -x -Gn -v"/>
|
||||||
|
<OTHERFILES value=""/>
|
||||||
|
</OPTIONS>
|
||||||
|
<LINKER>
|
||||||
|
<ALLOBJ value="c0w32.obj sysinit.obj $(OBJFILES)"/>
|
||||||
|
<ALLRES value="$(RESFILES)"/>
|
||||||
|
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
|
||||||
|
<OTHERFILES value=""/>
|
||||||
|
</LINKER>
|
||||||
|
<FILELIST>
|
||||||
|
<FILE FILENAME="gestionServicios.res" FORMNAME="" UNITNAME="gestionServicios.res" CONTAINERID="ResTool" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="gestionServicios.cpp" FORMNAME="" UNITNAME="gestionServicios" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\clientes.cpp" FORMNAME="gestionClientes" UNITNAME="clientes" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\tsplash.cpp" FORMNAME="Splash" UNITNAME="tsplash" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\agentes.cpp" FORMNAME="gestionAgentes" UNITNAME="agentes" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\imprimirClientes.cpp" FORMNAME="imprimirCarteraClientes" UNITNAME="imprimirClientes" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\cuentaPolizas.cpp" FORMNAME="gestionCuentaPolizas" UNITNAME="cuentaPolizas" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\imprimirCuentaPolizas.cpp" FORMNAME="imprCuentaPolizas" UNITNAME="imprimirCuentaPolizas" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\imprimirFichaCliente.cpp" FORMNAME="imprFichaCliente" UNITNAME="imprimirFichaCliente" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
<FILE FILENAME="src\login_dlg.cpp" FORMNAME="login" UNITNAME="login_dlg" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||||
|
</FILELIST>
|
||||||
|
<BUILDTOOLS>
|
||||||
|
</BUILDTOOLS>
|
||||||
|
|
||||||
|
<IDEOPTIONS>
|
||||||
|
[Version Info]
|
||||||
|
IncludeVerInfo=0
|
||||||
|
AutoIncBuild=0
|
||||||
|
MajorVer=1
|
||||||
|
MinorVer=0
|
||||||
|
Release=0
|
||||||
|
Build=0
|
||||||
|
Debug=0
|
||||||
|
PreRelease=0
|
||||||
|
Special=0
|
||||||
|
Private=0
|
||||||
|
DLL=0
|
||||||
|
Locale=1034
|
||||||
|
CodePage=1252
|
||||||
|
|
||||||
|
[Version Info Keys]
|
||||||
|
CompanyName=
|
||||||
|
FileDescription=
|
||||||
|
FileVersion=1.0.0.0
|
||||||
|
InternalName=
|
||||||
|
LegalCopyright=
|
||||||
|
LegalTrademarks=
|
||||||
|
OriginalFilename=
|
||||||
|
ProductName=
|
||||||
|
ProductVersion=1.0.0.0
|
||||||
|
Comments=
|
||||||
|
|
||||||
|
[Excluded Packages]
|
||||||
|
c:\archivos de programa\borland\cbuilder6\Bin\dclqrt60.bpl=QuickReport Components
|
||||||
|
c:\archivos de programa\borland\cbuilder6\Bin\dcltqr60.bpl=TeeChart for QuickReport Components
|
||||||
|
|
||||||
|
[HistoryLists\hlIncludePath]
|
||||||
|
Count=6
|
||||||
|
Item0=C:\Archivos de programa\Borland\Quickrep5;C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\include;$(BCB)\include\vcl;C:\programacion\VCLs\zeos_mySQL\src\core;C:\programacion\VCLs\zeos_mySQL\src\dbc;C:\programacion\VCLs\zeos_mySQL\src\parsesql;C:\programacion\VCLs\zeos_mySQL\src\plain
|
||||||
|
Item1=C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\include;$(BCB)\include\vcl;C:\programacion\VCLs\zeos_mySQL\src\core;C:\programacion\VCLs\zeos_mySQL\src\dbc;C:\programacion\VCLs\zeos_mySQL\src\parsesql;C:\programacion\VCLs\zeos_mySQL\src\plain
|
||||||
|
Item2=C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\include;$(BCB)\include\vcl;C:\programacion\VCLs\zeos_mySQL\src\core
|
||||||
|
Item3=C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\include;$(BCB)\include\vcl
|
||||||
|
Item4=src;..\HAguila;..\gestionServicios\src;$(BCB)\include;$(BCB)\include\vcl
|
||||||
|
Item5=..\HAguila;..\gestionServicios\src;$(BCB)\include;$(BCB)\include\vcl
|
||||||
|
|
||||||
|
[HistoryLists\hlLibraryPath]
|
||||||
|
Count=4
|
||||||
|
Item0=C:\Archivos de programa\Borland\Quickrep5;C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\Projects\Lib;C:\programacion\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
|
Item1=C:\programacion\VCLs\zeos_mySQL\src\component;src;..\HAguila;$(BCB)\Projects\Lib;C:\programacion\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
|
Item2=src;..\HAguila;..\gestionServicios\src;$(BCB)\Projects\Lib;C:\programacion\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
|
Item3=..\HAguila;..\gestionServicios\src;$(BCB)\Projects\Lib;C:\programacion\VCLs\lib;$(BCB)\lib\obj;$(BCB)\lib
|
||||||
|
|
||||||
|
[HistoryLists\hlDebugSourcePath]
|
||||||
|
Count=1
|
||||||
|
Item0=$(BCB)\source\vcl
|
||||||
|
|
||||||
|
[HistoryLists\hlConditionals]
|
||||||
|
Count=1
|
||||||
|
Item0=_DEBUG
|
||||||
|
|
||||||
|
[HistoryLists\hlIntOutputDir]
|
||||||
|
Count=1
|
||||||
|
Item0=C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj
|
||||||
|
|
||||||
|
[HistoryLists\hlFinalOutputDir]
|
||||||
|
Count=2
|
||||||
|
Item0=C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\bin\
|
||||||
|
Item1=C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\bin
|
||||||
|
|
||||||
|
[HistoryLists\hIBPIOutputDir]
|
||||||
|
Count=1
|
||||||
|
Item0=C:\Documents and Settings\Administrador\Mis documentos\CBuilder\Ventas\gestionServicios\obj
|
||||||
|
|
||||||
|
[Debugging]
|
||||||
|
DebugSourceDirs=$(BCB)\source\vcl
|
||||||
|
|
||||||
|
[Parameters]
|
||||||
|
RunParams=
|
||||||
|
Launcher=
|
||||||
|
UseLauncher=0
|
||||||
|
DebugCWD=
|
||||||
|
HostApplication=
|
||||||
|
RemoteHost=
|
||||||
|
RemotePath=
|
||||||
|
RemoteLauncher=
|
||||||
|
RemoteCWD=
|
||||||
|
RemoteDebug=0
|
||||||
|
|
||||||
|
[Compiler]
|
||||||
|
ShowInfoMsgs=0
|
||||||
|
LinkDebugVcl=0
|
||||||
|
LinkCGLIB=0
|
||||||
|
|
||||||
|
[CORBA]
|
||||||
|
AddServerUnit=1
|
||||||
|
AddClientUnit=1
|
||||||
|
PrecompiledHeaders=1
|
||||||
|
|
||||||
|
[Language]
|
||||||
|
ActiveLang=
|
||||||
|
ProjectLang=
|
||||||
|
RootDir=
|
||||||
|
</IDEOPTIONS>
|
||||||
|
</PROJECT>
|
52
gestionServicios.~cpp
Normal file
52
gestionServicios.~cpp
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#include "tsplash.h"
|
||||||
|
#pragma hdrstop
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
USEFORM("src\clientes.cpp", gestionClientes);
|
||||||
|
USEFORM("src\tsplash.cpp", Splash);
|
||||||
|
USEFORM("src\agentes.cpp", gestionAgentes);
|
||||||
|
USEFORM("src\imprimirClientes.cpp", imprimirCarteraClientes);
|
||||||
|
USEFORM("src\cuentaPolizas.cpp", gestionCuentaPolizas);
|
||||||
|
USEFORM("src\imprimirCuentaPolizas.cpp", imprCuentaPolizas);
|
||||||
|
USEFORM("src\imprimirFichaCliente.cpp", imprFichaCliente);
|
||||||
|
USEFORM("src\login_dlg.cpp", login);
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||||
|
{
|
||||||
|
try {//outer finally
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Application->Initialize();
|
||||||
|
Splash = new TSplash(NULL);
|
||||||
|
Splash->Show();
|
||||||
|
Splash->Repaint();
|
||||||
|
|
||||||
|
Application->CreateForm(__classid(TgestionClientes), &gestionClientes);
|
||||||
|
Application->CreateForm(__classid(Tlogin), &login);
|
||||||
|
Application->Run();
|
||||||
|
}
|
||||||
|
catch (Exception &exception)
|
||||||
|
{
|
||||||
|
Application->ShowException(&exception);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
throw Exception("");
|
||||||
|
}
|
||||||
|
catch (Exception &exception)
|
||||||
|
{
|
||||||
|
Application->ShowException(&exception);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__finally{
|
||||||
|
if(Splash)
|
||||||
|
delete Splash;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
BIN
gestorServicios.s3db
Normal file
BIN
gestorServicios.s3db
Normal file
Binary file not shown.
11
leeme.txt
Normal file
11
leeme.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
2011-12-29 JDsoft Actualizaci<63>n para a<>adir control de polizas externas
|
||||||
|
|
||||||
|
CREATE TABLE [serviciosExternos] (
|
||||||
|
[id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||||
|
[cliente] INTEGER NULL,
|
||||||
|
[tipoServicio] INTEGER NULL,
|
||||||
|
[nPoliza] vARCHAR(15) NULL,
|
||||||
|
[fechaEfecto] DATE NULL,
|
||||||
|
[fechaVencimiento] dATE NULL,
|
||||||
|
[primaNeta] NUMERIC DEFAULT '0' NULL
|
||||||
|
)
|
BIN
obj/agentes.obj
Normal file
BIN
obj/agentes.obj
Normal file
Binary file not shown.
BIN
obj/clientes.obj
Normal file
BIN
obj/clientes.obj
Normal file
Binary file not shown.
BIN
obj/cuentaPolizas.obj
Normal file
BIN
obj/cuentaPolizas.obj
Normal file
Binary file not shown.
BIN
obj/gestionServicios.obj
Normal file
BIN
obj/gestionServicios.obj
Normal file
Binary file not shown.
BIN
obj/imprimirClientes.obj
Normal file
BIN
obj/imprimirClientes.obj
Normal file
Binary file not shown.
BIN
obj/imprimirCuentaPolizas.obj
Normal file
BIN
obj/imprimirCuentaPolizas.obj
Normal file
Binary file not shown.
BIN
obj/imprimirFichaCliente.obj
Normal file
BIN
obj/imprimirFichaCliente.obj
Normal file
Binary file not shown.
BIN
obj/login_dlg.obj
Normal file
BIN
obj/login_dlg.obj
Normal file
Binary file not shown.
BIN
obj/tsplash.obj
Normal file
BIN
obj/tsplash.obj
Normal file
Binary file not shown.
BIN
sqlite3.dll
Normal file
BIN
sqlite3.dll
Normal file
Binary file not shown.
19
src/agentes.cpp
Normal file
19
src/agentes.cpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "agentes.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "ZAbstractDataset"
|
||||||
|
#pragma link "ZAbstractRODataset"
|
||||||
|
#pragma link "ZDataset"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TgestionAgentes *gestionAgentes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TgestionAgentes::TgestionAgentes(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
38
src/agentes.dfm
Normal file
38
src/agentes.dfm
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
object gestionAgentes: TgestionAgentes
|
||||||
|
Left = 511
|
||||||
|
Top = 161
|
||||||
|
Width = 400
|
||||||
|
Height = 450
|
||||||
|
Caption = 'Gesti'#243'n de Agentes'
|
||||||
|
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 DBGrid2: TDBGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 392
|
||||||
|
Height = 420
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
TitleFont.Charset = DEFAULT_CHARSET
|
||||||
|
TitleFont.Color = clWindowText
|
||||||
|
TitleFont.Height = -11
|
||||||
|
TitleFont.Name = 'MS Sans Serif'
|
||||||
|
TitleFont.Style = []
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'nombre'
|
||||||
|
Title.Caption = 'Nombre del Agente'
|
||||||
|
Width = 352
|
||||||
|
Visible = True
|
||||||
|
end>
|
||||||
|
end
|
||||||
|
end
|
28
src/agentes.h
Normal file
28
src/agentes.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef agentesH
|
||||||
|
#define agentesH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include "ZAbstractDataset.hpp"
|
||||||
|
#include "ZAbstractRODataset.hpp"
|
||||||
|
#include "ZDataset.hpp"
|
||||||
|
#include <DB.hpp>
|
||||||
|
#include <DBGrids.hpp>
|
||||||
|
#include <Grids.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TgestionAgentes : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TDBGrid *DBGrid2;
|
||||||
|
private: // User declarations
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TgestionAgentes(TComponent* Owner);
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TgestionAgentes *gestionAgentes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
19
src/agentes.~cpp
Normal file
19
src/agentes.~cpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "agentes.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "ZAbstractDataset"
|
||||||
|
#pragma link "ZAbstractRODataset"
|
||||||
|
#pragma link "ZDataset"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TgestionAgentes *gestionAgentes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TgestionAgentes::TgestionAgentes(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
44
src/agentes.~dfm
Normal file
44
src/agentes.~dfm
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
object gestionAgentes: TgestionAgentes
|
||||||
|
Left = 511
|
||||||
|
Top = 161
|
||||||
|
Width = 400
|
||||||
|
Height = 450
|
||||||
|
Caption = 'Gesti'#243'n de Agentes'
|
||||||
|
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 DBGrid2: TDBGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 392
|
||||||
|
Height = 420
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
TitleFont.Charset = DEFAULT_CHARSET
|
||||||
|
TitleFont.Color = clWindowText
|
||||||
|
TitleFont.Height = -11
|
||||||
|
TitleFont.Name = 'MS Sans Serif'
|
||||||
|
TitleFont.Style = []
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'id'
|
||||||
|
ReadOnly = True
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'nombre'
|
||||||
|
Title.Caption = 'Nombre del Agente'
|
||||||
|
Width = 295
|
||||||
|
Visible = True
|
||||||
|
end>
|
||||||
|
end
|
||||||
|
end
|
28
src/agentes.~h
Normal file
28
src/agentes.~h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef agentesH
|
||||||
|
#define agentesH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include "ZAbstractDataset.hpp"
|
||||||
|
#include "ZAbstractRODataset.hpp"
|
||||||
|
#include "ZDataset.hpp"
|
||||||
|
#include <DB.hpp>
|
||||||
|
#include <DBGrids.hpp>
|
||||||
|
#include <Grids.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TgestionAgentes : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TDBGrid *DBGrid2;
|
||||||
|
private: // User declarations
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TgestionAgentes(TComponent* Owner);
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TgestionAgentes *gestionAgentes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
600
src/clientes.cpp
Normal file
600
src/clientes.cpp
Normal file
@ -0,0 +1,600 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#include <DateUtils.hpp>
|
||||||
|
#include "tsplash.h"
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "clientes.h"
|
||||||
|
#include "agentes.h"
|
||||||
|
#include "imprimirClientes.h"
|
||||||
|
#include "cuentaPolizas.h"
|
||||||
|
#include "imprimirFichaCliente.h"
|
||||||
|
#include "login_dlg.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "ZAbstractDataset"
|
||||||
|
#pragma link "ZAbstractRODataset"
|
||||||
|
#pragma link "ZConnection"
|
||||||
|
#pragma link "ZDataset"
|
||||||
|
#pragma link "ZSqlUpdate"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TgestionClientes *gestionClientes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TgestionClientes::TgestionClientes(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
gettingAutoIncrement = false;
|
||||||
|
|
||||||
|
#define IDM_ABOUTBOX 1
|
||||||
|
HMENU pSysMenu = GetSystemMenu(this->Handle, FALSE);
|
||||||
|
if (pSysMenu != NULL)
|
||||||
|
{
|
||||||
|
AppendMenu(pSysMenu, MF_SEPARATOR,0,0);
|
||||||
|
AppendMenu(pSysMenu, MF_STRING, IDM_ABOUTBOX, "Acerca de...");
|
||||||
|
}
|
||||||
|
WindowProc=MyWndProc;
|
||||||
|
|
||||||
|
|
||||||
|
// Cargamos el listado de agentes disponibles
|
||||||
|
TZQuery *zquery;
|
||||||
|
zquery = new TZQuery(this);
|
||||||
|
zquery->Connection = ZConnection1;
|
||||||
|
zquery->SQL->Clear();
|
||||||
|
zquery->SQL->Add("SELECT id,nombre FROM agentes ORDER BY nombre");
|
||||||
|
zquery->Active=zquery->Connection->Connected;
|
||||||
|
|
||||||
|
srch_agentes->Items->Clear();
|
||||||
|
srch_agentes->Items->AddObject("",(TObject *)(-1) );
|
||||||
|
srch_agentes->Items->AddObject("-[ Sin Agente Asignado ]-",(TObject *)(0) );
|
||||||
|
while(!zquery->Eof)
|
||||||
|
{
|
||||||
|
srch_agentes->Items->AddObject(zquery->FieldByName("nombre")->AsString,(TObject *)(zquery->FieldByName("id")->AsInteger));
|
||||||
|
zquery->Next();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Orden del listado
|
||||||
|
dsListado_sort = "c.id";
|
||||||
|
|
||||||
|
|
||||||
|
zuClientes->ModifySQL->Clear();
|
||||||
|
zuClientes->ModifySQL->Add("UPDATE clientes SET agente=:agente, nombre=:nombre, dni=:dni, calle=:calle, poblacion=:poblacion, provincia=:provincia, cp=:cp, telefono=:telefono, movil=:movil, fax=:fax, correo=:correo, cobroCalle=:cobroCalle, estado=:estado, gradoFidelidad=:gradoFidelidad, pCargo=:pCargo, fechaNacimiento=:fechaNacimiento, fechaCarnet=:fechaCarnet, fecha=:fecha, hora=:hora, notas=:notas WHERE id=:OLD_id");
|
||||||
|
zuClientes->DeleteSQL->Clear();
|
||||||
|
zuClientes->DeleteSQL->Add("DELETE FROM clientes WHERE id=:OLD_id");
|
||||||
|
zuClientes->InsertSQL->Clear();
|
||||||
|
zuClientes->InsertSQL->Add("INSERT INTO clientes (agente, nombre, dni, calle, poblacion, provincia, cp, telefono, movil, fax, correo, cobroCalle, estado, gradoFidelidad, pCargo, fechaNacimiento, fechaCarnet, fecha, hora, notas) VALUES (:agente, :nombre, :dni, :calle, :poblacion, :provincia, :cp, :telefono, :movil, :fax, :correo, :cobroCalle, :estado, :gradoFidelidad, :pCargo, :fechaNacimiento, :fechaCarnet, :fecha, :hora, :notas)");
|
||||||
|
|
||||||
|
zuServicios->ModifySQL->Clear();
|
||||||
|
zuServicios->ModifySQL->Add("UPDATE servicios SET tipoServicio=:tipoServicio, nPoliza=:nPoliza, fechaEfecto=:fechaEfecto, fechaVencimiento=:fechaVencimiento, primaNeta=:primaNeta WHERE id=:OLD_id");
|
||||||
|
zuServicios->DeleteSQL->Clear();
|
||||||
|
zuServicios->DeleteSQL->Add("DELETE FROM servicios WHERE id=:OLD_id");
|
||||||
|
zuServicios->InsertSQL->Clear();
|
||||||
|
zuServicios->InsertSQL->Add("INSERT INTO servicios (cliente, tipoServicio, nPoliza, fechaEfecto, fechaVencimiento, primaNeta) VALUES (:cliente, :tipoServicio, :nPoliza, :fechaEfecto, :fechaVencimiento, :primaNeta)");
|
||||||
|
|
||||||
|
|
||||||
|
zuServiciosExternos->ModifySQL->Clear();
|
||||||
|
zuServiciosExternos->ModifySQL->Add("UPDATE serviciosExternos SET tipoServicio=:tipoServicio, nPoliza=:nPoliza, fechaEfecto=:fechaEfecto, fechaVencimiento=:fechaVencimiento, primaNeta=:primaNeta WHERE id=:OLD_id");
|
||||||
|
zuServiciosExternos->DeleteSQL->Clear();
|
||||||
|
zuServiciosExternos->DeleteSQL->Add("DELETE FROM serviciosExternos WHERE id=:OLD_id");
|
||||||
|
zuServiciosExternos->InsertSQL->Clear();
|
||||||
|
zuServiciosExternos->InsertSQL->Add("INSERT INTO serviciosExternos (cliente, tipoServicio, nPoliza, fechaEfecto, fechaVencimiento, primaNeta) VALUES (:cliente, :tipoServicio, :nPoliza, :fechaEfecto, :fechaVencimiento, :primaNeta)");
|
||||||
|
|
||||||
|
|
||||||
|
PageControl1->ActivePage = TabSheet1;
|
||||||
|
PageControl2->ActivePage = TabSheet3;
|
||||||
|
|
||||||
|
zqClientes->Active = zqClientes->Connection->Connected;
|
||||||
|
zqServicios->Active = zqServicios->Connection->Connected;
|
||||||
|
zqServiciosExternos->Active = zqServicios->Connection->Connected;
|
||||||
|
zqTipoServicios->Active = zqTipoServicios->Connection->Connected;
|
||||||
|
zqFamiliares->Active = zqFamiliares->Connection->Connected;
|
||||||
|
zqAgentes->Active = zqAgentes->Connection->Connected;
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionClientes::MyWndProc(Messages::TMessage &Message)
|
||||||
|
{
|
||||||
|
HMENU hMenu;
|
||||||
|
hMenu = GetSystemMenu (this->Handle, FALSE);
|
||||||
|
if (Message.Msg == WM_SYSCOMMAND)
|
||||||
|
{
|
||||||
|
switch(Message.WParamLo)
|
||||||
|
{
|
||||||
|
case IDM_ABOUTBOX:
|
||||||
|
if ( Splash==NULL ) Splash = new TSplash(NULL);
|
||||||
|
Splash->pressKeyToClose = true;
|
||||||
|
Splash->Show();
|
||||||
|
Splash->Repaint();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
WndProc(Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
WndProc(Message);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionClientes::FormShow(TObject *Sender)
|
||||||
|
{
|
||||||
|
if(Splash){
|
||||||
|
delete Splash;
|
||||||
|
Splash = NULL;
|
||||||
|
|
||||||
|
Tlogin *login;
|
||||||
|
login = new Tlogin(this);
|
||||||
|
|
||||||
|
do {
|
||||||
|
login->ShowModal();
|
||||||
|
if ( login->ModalResult!=mrOk ) {
|
||||||
|
Close();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if ( login->auth ) break;
|
||||||
|
|
||||||
|
MessageDlg("Error iniciando sesi<73>n.\nEl usuario/contrase<73>a no es correcto.",mtError, TMsgDlgButtons() << mbOK, 0);
|
||||||
|
login->pass->Text = "";
|
||||||
|
} while(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionClientes::DBGrid1DblClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
PageControl1->ActivePage = TabSheet2;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::DBGrid1TitleClick(TColumn *Column)
|
||||||
|
{
|
||||||
|
if ( dsListado_sort.Pos(Column->FieldName)==1 && dsListado_sort.Pos(" ASC")==0 )
|
||||||
|
dsListado_sort = Column->FieldName + " ASC";
|
||||||
|
else
|
||||||
|
dsListado_sort = Column->FieldName + " DESC";
|
||||||
|
|
||||||
|
dsListado_Indice = Column->Index;
|
||||||
|
|
||||||
|
doFilterClick(NULL);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::doFilterClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
AnsiString where,orderBy,query, leftJOIN;
|
||||||
|
|
||||||
|
where = "";
|
||||||
|
leftJOIN = "";
|
||||||
|
if ( !srch_vFilter->Text.IsEmpty() )
|
||||||
|
switch( srch_kFilter->ItemIndex ) {
|
||||||
|
case 0:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.id='"+srch_vFilter->Text+"'";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.nombre LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" (c.telefono LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
where+=" OR c.movil LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
where+=" OR c.fax LIKE '%"+srch_vFilter->Text+"%')";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.calle LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.poblacion LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.provincia LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.cp LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.dni LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
System::TDateTime fecha;
|
||||||
|
if ( TryStrToDate(srch_vFilter->Text, fecha) ) {
|
||||||
|
DateSeparator = '-';
|
||||||
|
ShortDateFormat = "yyyy-mm-dd";
|
||||||
|
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" p.fechaVencimiento<='"+DateToStr(fecha)+"'";
|
||||||
|
leftJOIN = " LEFT JOIN serviciosExternos p ON (p.cliente=c.id) ";
|
||||||
|
|
||||||
|
DateSeparator = '/';
|
||||||
|
ShortDateFormat = "dd/mm/yyyy";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int agente;
|
||||||
|
if ( srch_agentes->ItemIndex>0 ) {
|
||||||
|
agente = (int)srch_agentes->Items->Objects[srch_agentes->ItemIndex];
|
||||||
|
if ( agente>=0 ) {
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" a.id="+AnsiString(agente);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
orderBy = " ORDER BY ";
|
||||||
|
if ( dsListado_sort.Pos("agenteNombre")>0 ) orderBy += "a.nombre"; else orderBy += "c."+dsListado_sort;
|
||||||
|
|
||||||
|
|
||||||
|
query = "SELECT c.id, c.agente, a.nombre agenteNombre, c.nombre, c.dni, c.calle, c.poblacion, c.provincia, c.cp, c.telefono, c.movil, c.fax, c.correo, c.cobroCalle, c.estado, c.gradoFidelidad, c.pCargo, c.fechaNacimiento,c.fechaCarnet,c.fecha, c.hora, c.notas";
|
||||||
|
query+= " FROM clientes c LEFT JOIN agentes a ON (a.id=c.agente)";
|
||||||
|
query+= leftJOIN;
|
||||||
|
query+= where;
|
||||||
|
query+= orderBy;
|
||||||
|
|
||||||
|
|
||||||
|
// Volver a filtrar el listado...
|
||||||
|
zqClientes->SQL->Clear();
|
||||||
|
zqClientes->SQL->Add(query);
|
||||||
|
zqClientes->Active = zqClientes->Connection->Connected;
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::DBGrid1DrawColumnCell(TObject *Sender,
|
||||||
|
const TRect &Rect, int DataCol, TColumn *Column,
|
||||||
|
TGridDrawState State)
|
||||||
|
{
|
||||||
|
//- ---------------------------------------------------------
|
||||||
|
if ( !State.Contains(gdSelected) )
|
||||||
|
{
|
||||||
|
Graphics::TBitmap *Bmp;
|
||||||
|
TDBGrid *dbG;
|
||||||
|
dbG = (TDBGrid *)Sender;
|
||||||
|
|
||||||
|
// Determina la columna clicada...
|
||||||
|
if ( Column->Index == dsListado_Indice )
|
||||||
|
{
|
||||||
|
Bmp = new Graphics::TBitmap();
|
||||||
|
Bmp->TransparentColor = clWhite;
|
||||||
|
Bmp->Transparent = true;
|
||||||
|
Bmp->TransparentMode = tmAuto;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Determina la imagen mostrada de acuerdo con el orden de los registros
|
||||||
|
if ( dsListado_sort.Pos(Column->FieldName) == 1 && dsListado_sort.Pos(" ASC")== 0 )
|
||||||
|
gridIcons->GetBitmap(0, Bmp); // Set abajo
|
||||||
|
else
|
||||||
|
gridIcons->GetBitmap(1, Bmp); // Set arriba
|
||||||
|
|
||||||
|
dbG->Canvas->Draw( Rect.right - Bmp->Width,2, Bmp);
|
||||||
|
} __finally {
|
||||||
|
delete Bmp; // Liberamos la variable Bmp de la memoria
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dbG->DefaultDrawColumnCell(Rect,DataCol,Column,State);
|
||||||
|
}
|
||||||
|
//- ---------------------------------------------------------
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqClientesBeforePost(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
// Comprobar que no exista el DNI introducido
|
||||||
|
AnsiString dni;
|
||||||
|
dni = zqClientes->FieldByName("dni")->AsString;
|
||||||
|
|
||||||
|
|
||||||
|
if ( DataSet->State == dsInsert && !dni.IsEmpty() ) {
|
||||||
|
TZQuery *q;
|
||||||
|
q = new TZQuery(this);
|
||||||
|
q->SQL->Clear();
|
||||||
|
q->SQL->Add( AnsiString("select id FROM clientes WHERE dni='")+dni+AnsiString("'") );
|
||||||
|
q->Connection = ZConnection1;
|
||||||
|
q->Active = true;
|
||||||
|
|
||||||
|
if ( q->RecordCount>0 ) {
|
||||||
|
int res;
|
||||||
|
res = MessageDlg("El dni introducido ya existe, ficha " + IntToStr(q->FieldByName("id")->AsInteger) + ". <20>Duplicar ficha?", mtInformation, mbYesNoCancel, 0);
|
||||||
|
switch( res ) {
|
||||||
|
case mrCancel:
|
||||||
|
Abort();
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
case mrNo:
|
||||||
|
zqClientes->CancelUpdates();
|
||||||
|
zqClientes->Locate("id",q->FieldByName("id")->AsInteger, TLocateOptions() );
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Guardamos el contenido de los combos
|
||||||
|
zqClientes->FieldByName("fechaNacimiento")->AsDateTime = DateTimePicker1->DateTime;
|
||||||
|
zqClientes->FieldByName("fechaCarnet")->AsDateTime = DateTimePicker2->DateTime;
|
||||||
|
switch( dbEstadoCivil->ItemIndex ) {
|
||||||
|
case 0: zqClientes->FieldByName("estado")->AsString = "S"; break;
|
||||||
|
case 1: zqClientes->FieldByName("estado")->AsString = "C"; break;
|
||||||
|
case 2: zqClientes->FieldByName("estado")->AsString = "D"; break;
|
||||||
|
case 3: zqClientes->FieldByName("estado")->AsString = "V"; break;
|
||||||
|
}
|
||||||
|
zqClientes->FieldByName("gradoFidelidad")->AsInteger = cbGradoFidelidad->ItemIndex;
|
||||||
|
zqClientes->FieldByName("pCargo")->AsString = (dbPCargo->Checked?"Y":"N");
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::DateTimePicker1CloseUp(TObject *Sender)
|
||||||
|
{
|
||||||
|
lbEdad->Caption = AnsiString( YearsBetween(TDateTime::CurrentDate(), DateTimePicker1->DateTime) ) + " A<>os";
|
||||||
|
|
||||||
|
if ( dbUpdating ) return;
|
||||||
|
if (zqClientes->State != dsEdit || zqClientes->State != dsInsert ) zqClientes->Edit();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqClientesAfterScroll(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
dbUpdating = true;
|
||||||
|
|
||||||
|
// Guardamos el contenido de los combos
|
||||||
|
DateTimePicker1->DateTime = zqClientes->FieldByName("fechaNacimiento")->AsDateTime;
|
||||||
|
DateTimePicker2->DateTime = zqClientes->FieldByName("fechaCarnet")->AsDateTime;
|
||||||
|
if ( zqClientes->FieldByName("estado")->AsString=="S" ) dbEstadoCivil->ItemIndex = 0; else
|
||||||
|
if ( zqClientes->FieldByName("estado")->AsString=="C" ) dbEstadoCivil->ItemIndex = 1; else
|
||||||
|
if ( zqClientes->FieldByName("estado")->AsString=="D" ) dbEstadoCivil->ItemIndex = 2; else
|
||||||
|
if ( zqClientes->FieldByName("estado")->AsString=="V" ) dbEstadoCivil->ItemIndex = 3;
|
||||||
|
|
||||||
|
if ( zqClientes->FieldByName("gradoFidelidad")->AsInteger == 0 ) cbGradoFidelidad->ItemIndex = 0;
|
||||||
|
else if ( zqClientes->FieldByName("gradoFidelidad")->AsInteger == 1 ) cbGradoFidelidad->ItemIndex = 1;
|
||||||
|
else if ( zqClientes->FieldByName("gradoFidelidad")->AsInteger == 2 ) cbGradoFidelidad->ItemIndex = 2;
|
||||||
|
else cbGradoFidelidad->ItemIndex = 2;
|
||||||
|
|
||||||
|
dbPCargo->Checked = (zqClientes->FieldByName("pCargo")->AsString=="Y");
|
||||||
|
|
||||||
|
lbEdad->Caption = AnsiString( YearsBetween(TDateTime::CurrentDate(), DateTimePicker1->DateTime) ) + " A<>os";
|
||||||
|
|
||||||
|
dbUpdating = false;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::dbEstadoCivilChange(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( dbUpdating ) return;
|
||||||
|
if (zqClientes->State != dsEdit || zqClientes->State != dsInsert ) zqClientes->Edit();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::dbPCargoClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( dbUpdating ) return;
|
||||||
|
if (zqClientes->State != dsEdit || zqClientes->State != dsInsert ) zqClientes->Edit();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::Salir1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::GestindeAgentes1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TgestionAgentes *f;
|
||||||
|
f = new TgestionAgentes(this);
|
||||||
|
f->DBGrid2->DataSource = dsAgentes;
|
||||||
|
f->ShowModal();
|
||||||
|
delete f;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqFamiliaresNewRecord(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
zqFamiliares->FieldByName("cliente")->AsInteger = zqClientes->FieldByName("id")->AsInteger;
|
||||||
|
zqFamiliares->FieldByName("sexo")->AsString = "H";
|
||||||
|
zqFamiliares->FieldByName("estado")->AsString = "C";
|
||||||
|
zqFamiliares->FieldByName("relacion")->AsString = "C";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqFamiliaresBeforePost(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
// Convertir los desplegables
|
||||||
|
zqFamiliares->FieldByName("sexo")->AsString = (zqFamiliares->FieldByName("sexo")->AsString=="Hombre"?"H":"M");
|
||||||
|
if ( zqFamiliares->FieldByName("estado")->AsString=="Soltero" ) zqFamiliares->FieldByName("estado")->AsString = "S"; else
|
||||||
|
if ( zqFamiliares->FieldByName("estado")->AsString=="Casado" ) zqFamiliares->FieldByName("estado")->AsString = "C"; else
|
||||||
|
if ( zqFamiliares->FieldByName("estado")->AsString=="Divorciado" ) zqFamiliares->FieldByName("estado")->AsString = "D"; else
|
||||||
|
if ( zqFamiliares->FieldByName("estado")->AsString=="Viudo" ) zqFamiliares->FieldByName("estado")->AsString = "V";
|
||||||
|
|
||||||
|
if ( zqFamiliares->FieldByName("relacion")->AsString == "Padre/Madre" ) zqFamiliares->FieldByName("relacion")->AsString = "P"; else
|
||||||
|
if ( zqFamiliares->FieldByName("relacion")->AsString == "Marido/Mujer" ) zqFamiliares->FieldByName("relacion")->AsString = "C"; else
|
||||||
|
if ( zqFamiliares->FieldByName("relacion")->AsString == "Hermano/a" ) zqFamiliares->FieldByName("relacion")->AsString = "H"; else
|
||||||
|
if ( zqFamiliares->FieldByName("relacion")->AsString == "Hijo/a" ) zqFamiliares->FieldByName("relacion")->AsString = "N"; else
|
||||||
|
if ( zqFamiliares->FieldByName("relacion")->AsString == "otros" ) zqFamiliares->FieldByName("relacion")->AsString = "o";
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqFamiliaresestadoGetText(TField *Sender,
|
||||||
|
AnsiString &Text, bool DisplayText)
|
||||||
|
{
|
||||||
|
if ( Sender->AsString == "S" ) Text = "Soltero"; else
|
||||||
|
if ( Sender->AsString == "C" ) Text = "Casado"; else
|
||||||
|
if ( Sender->AsString == "D" ) Text = "Divorciado"; else
|
||||||
|
if ( Sender->AsString == "V" ) Text = "Viudo";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqFamiliaresrelacionGetText(
|
||||||
|
TField *Sender, AnsiString &Text, bool DisplayText)
|
||||||
|
{
|
||||||
|
if ( Sender->AsString == "P" ) Text = "Padre/Madre"; else
|
||||||
|
if ( Sender->AsString == "C" ) Text = "Marido/Mujer"; else
|
||||||
|
if ( Sender->AsString == "H" ) Text = "Hermano/a"; else
|
||||||
|
if ( Sender->AsString == "N" ) Text = "Hijo/a"; else
|
||||||
|
if ( Sender->AsString == "o" ) Text = "otros";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqFamiliaressexoGetText(TField *Sender,
|
||||||
|
AnsiString &Text, bool DisplayText)
|
||||||
|
{
|
||||||
|
if ( Sender->AsString == "H" ) Text = "Hombre"; else
|
||||||
|
if ( Sender->AsString == "M" ) Text = "Mujer";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqServiciosNewRecord(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
zqServicios->FieldByName("cliente")->AsInteger = zqClientes->FieldByName("id")->AsInteger;
|
||||||
|
zqServicios->FieldByName("primaNeta")->AsCurrency = 0;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::TiposdeServicio1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TgestionAgentes *f;
|
||||||
|
f = new TgestionAgentes(this);
|
||||||
|
f->Caption = "Tipos de Servicios";
|
||||||
|
f->DBGrid2->Columns->Items[0]->Title->Caption = "Nombre del Servicio Contratado";
|
||||||
|
f->DBGrid2->DataSource = dsTipoServicios;
|
||||||
|
f->ShowModal();
|
||||||
|
delete f;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::ImprimirListado1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TimprimirCarteraClientes *i;
|
||||||
|
i = new TimprimirCarteraClientes(this);
|
||||||
|
i->QuickRep1->DataSet = zqClientes;
|
||||||
|
i->QuickRep1->Preview();
|
||||||
|
delete i;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::ImprimirFicha1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TimprFichaCliente *i;
|
||||||
|
i = new TimprFichaCliente(this);
|
||||||
|
|
||||||
|
i->rID->Caption = zqClientes->FieldByName("id")->AsString;
|
||||||
|
i->rNombre->Caption = zqClientes->FieldByName("nombre")->AsString;
|
||||||
|
i->rDNI->Caption = zqClientes->FieldByName("dni")->AsString;
|
||||||
|
i->rFechaNacimiento->Caption = zqClientes->FieldByName("fechaNacimiento")->AsString;
|
||||||
|
i->rEstadoCivil->Caption = zqClientes->FieldByName("estado")->AsString;
|
||||||
|
i->rPCargo->Caption = zqClientes->FieldByName("pCargo")->AsString=="Y"?"SI":"NO";
|
||||||
|
i->rCalle->Caption = zqClientes->FieldByName("calle")->AsString;
|
||||||
|
i->rPoblacion->Caption = zqClientes->FieldByName("poblacion")->AsString;
|
||||||
|
i->rProvincia->Caption = zqClientes->FieldByName("provincia")->AsString;
|
||||||
|
i->rCP->Caption = zqClientes->FieldByName("cp")->AsString;
|
||||||
|
i->rDirCobro->Caption = zqClientes->FieldByName("cobroCalle")->AsString;
|
||||||
|
i->rTelefono->Caption = zqClientes->FieldByName("telefono")->AsString;
|
||||||
|
i->rMovil->Caption = zqClientes->FieldByName("movil")->AsString;
|
||||||
|
i->rFax->Caption = zqClientes->FieldByName("fax")->AsString;
|
||||||
|
i->rEMail->Caption = zqClientes->FieldByName("correo")->AsString;
|
||||||
|
i->rAgente->Caption = DBLookupComboBox1->Text;
|
||||||
|
i->rGradoFidelidad->Caption = zqClientes->FieldByName("gradoFidelidad")->AsString;
|
||||||
|
i->rNotas->Lines->Text = zqClientes->FieldByName("notas")->AsString;
|
||||||
|
|
||||||
|
i->QuickRep1->DataSet = zqFamiliares;
|
||||||
|
i->QuickRep1->Preview();
|
||||||
|
delete i;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::CuentaPolizas1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TgestionCuentaPolizas *f;
|
||||||
|
f = new TgestionCuentaPolizas(this);
|
||||||
|
f->ShowModal();
|
||||||
|
delete f;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::dsClientesStateChange(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( dsClientes->State==dsInsert ) {
|
||||||
|
PageControl2->ActivePage = TabSheet5;
|
||||||
|
}
|
||||||
|
|
||||||
|
TabSheet3->Enabled = (dsClientes->State!=dsInsert);
|
||||||
|
TabSheet6->Enabled = (dsClientes->State!=dsInsert);
|
||||||
|
TabSheet4->Enabled = (dsClientes->State!=dsInsert);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqClientesAfterPost(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
if ( gettingAutoIncrement ) return;
|
||||||
|
// Read auto-increment
|
||||||
|
if ( zqClientes->FieldByName("id")->AsInteger==0 ) {
|
||||||
|
gettingAutoIncrement = true;
|
||||||
|
|
||||||
|
zqClientes->Edit();
|
||||||
|
|
||||||
|
TZQuery *q;
|
||||||
|
q = new TZQuery(this);
|
||||||
|
q->SQL->Clear();
|
||||||
|
q->SQL->Add("select last_insert_rowid() id");
|
||||||
|
q->Connection = ZConnection1;
|
||||||
|
q->Active = true;
|
||||||
|
|
||||||
|
zqClientes->FieldByName("id")->AsInteger = q->FieldByName("id")->AsInteger;
|
||||||
|
delete q;
|
||||||
|
|
||||||
|
zqClientes->Post();
|
||||||
|
gettingAutoIncrement = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::cbGradoFidelidadChange(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( dbUpdating ) return;
|
||||||
|
if (zqClientes->State != dsEdit || zqClientes->State != dsInsert ) zqClientes->Edit();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::FormClose(TObject *Sender,
|
||||||
|
TCloseAction &Action)
|
||||||
|
{
|
||||||
|
if( zqClientes->State == dsEdit || zqClientes->State == dsInsert ) zqClientes->Post();
|
||||||
|
if( zqServicios->State == dsEdit || zqServicios->State == dsInsert ) zqServicios->Post();
|
||||||
|
if( zqFamiliares->State == dsEdit || zqFamiliares->State == dsInsert ) zqFamiliares->Post();
|
||||||
|
if( zqAgentes->State == dsEdit || zqAgentes->State == dsInsert ) zqAgentes->Post();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqServiciosExternosNewRecord(
|
||||||
|
TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
zqServiciosExternos->FieldByName("cliente")->AsInteger = zqClientes->FieldByName("id")->AsInteger;
|
||||||
|
zqServiciosExternos->FieldByName("primaNeta")->AsCurrency = 0;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::PageControl2Changing(TObject *Sender,
|
||||||
|
bool &AllowChange)
|
||||||
|
{
|
||||||
|
AllowChange = ( dsClientes->State!=dsInsert );
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
BIN
src/clientes.ddp
Normal file
BIN
src/clientes.ddp
Normal file
Binary file not shown.
1665
src/clientes.dfm
Normal file
1665
src/clientes.dfm
Normal file
File diff suppressed because it is too large
Load Diff
211
src/clientes.h
Normal file
211
src/clientes.h
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef clientesH
|
||||||
|
#define clientesH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include "ZAbstractDataset.hpp"
|
||||||
|
#include "ZAbstractRODataset.hpp"
|
||||||
|
#include "ZConnection.hpp"
|
||||||
|
#include "ZDataset.hpp"
|
||||||
|
#include "ZSqlUpdate.hpp"
|
||||||
|
#include <ComCtrls.hpp>
|
||||||
|
#include <DB.hpp>
|
||||||
|
#include <DBGrids.hpp>
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <Grids.hpp>
|
||||||
|
#include <Buttons.hpp>
|
||||||
|
#include <ImgList.hpp>
|
||||||
|
#include <DBCtrls.hpp>
|
||||||
|
#include <Mask.hpp>
|
||||||
|
#include <Menus.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TgestionClientes : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TPageControl *PageControl1;
|
||||||
|
TTabSheet *TabSheet1;
|
||||||
|
TTabSheet *TabSheet2;
|
||||||
|
TPanel *Panel1;
|
||||||
|
TDBGrid *DBGrid1;
|
||||||
|
TZConnection *ZConnection1;
|
||||||
|
TZQuery *zqClientes;
|
||||||
|
TZUpdateSQL *zuClientes;
|
||||||
|
TDataSource *dsClientes;
|
||||||
|
TLabel *Label1;
|
||||||
|
TComboBox *srch_kFilter;
|
||||||
|
TEdit *srch_vFilter;
|
||||||
|
TBitBtn *BitBtn1;
|
||||||
|
TComboBox *srch_agentes;
|
||||||
|
TImageList *gridIcons;
|
||||||
|
TLabel *Label2;
|
||||||
|
TDBEdit *DBEdit1;
|
||||||
|
TPageControl *PageControl2;
|
||||||
|
TTabSheet *TabSheet3;
|
||||||
|
TTabSheet *TabSheet4;
|
||||||
|
TTabSheet *TabSheet5;
|
||||||
|
TDBMemo *DBMemo1;
|
||||||
|
TDBGrid *DBGrid2;
|
||||||
|
TPanel *Panel2;
|
||||||
|
TDBGrid *DBGrid3;
|
||||||
|
TDBNavigator *DBNavigator1;
|
||||||
|
TLabel *Label4;
|
||||||
|
TDBText *DBText1;
|
||||||
|
TLabel *Label5;
|
||||||
|
TDBEdit *DBEdit2;
|
||||||
|
TLabel *Label6;
|
||||||
|
TDBEdit *DBEdit3;
|
||||||
|
TLabel *Label7;
|
||||||
|
TDBEdit *DBEdit4;
|
||||||
|
TLabel *Label8;
|
||||||
|
TDBEdit *DBEdit5;
|
||||||
|
TLabel *Label9;
|
||||||
|
TDBEdit *DBEdit6;
|
||||||
|
TLabel *Label10;
|
||||||
|
TDBEdit *DBEdit7;
|
||||||
|
TLabel *Label11;
|
||||||
|
TDBEdit *DBEdit8;
|
||||||
|
TLabel *Label12;
|
||||||
|
TDBEdit *DBEdit9;
|
||||||
|
TLabel *Label13;
|
||||||
|
TDBEdit *DBEdit10;
|
||||||
|
TLabel *Label14;
|
||||||
|
TDBEdit *DBEdit11;
|
||||||
|
TLabel *Label15;
|
||||||
|
TLabel *Label16;
|
||||||
|
TLabel *lbEdad;
|
||||||
|
TDateTimePicker *DateTimePicker1;
|
||||||
|
TLabel *Label18;
|
||||||
|
TComboBox *dbEstadoCivil;
|
||||||
|
TGroupBox *GroupBox1;
|
||||||
|
TLabel *Label3;
|
||||||
|
TLabel *Label19;
|
||||||
|
TCheckBox *dbPCargo;
|
||||||
|
TIntegerField *zqClientesid;
|
||||||
|
TIntegerField *zqClientesagente;
|
||||||
|
TStringField *zqClientesagenteNombre;
|
||||||
|
TStringField *zqClientesnombre;
|
||||||
|
TStringField *zqClientesdni;
|
||||||
|
TStringField *zqClientescalle;
|
||||||
|
TStringField *zqClientespoblacion;
|
||||||
|
TStringField *zqClientesprovincia;
|
||||||
|
TStringField *zqClientescp;
|
||||||
|
TStringField *zqClientestelefono;
|
||||||
|
TStringField *zqClientesmovil;
|
||||||
|
TStringField *zqClientesfax;
|
||||||
|
TStringField *zqClientescorreo;
|
||||||
|
TStringField *zqClientescobroCalle;
|
||||||
|
TStringField *zqClientesestado;
|
||||||
|
TIntegerField *zqClientesgradoFidelidad;
|
||||||
|
TStringField *zqClientespCargo;
|
||||||
|
TDateField *zqClientesfechaNacimiento;
|
||||||
|
TDateField *zqClientesfecha;
|
||||||
|
TTimeField *zqClienteshora;
|
||||||
|
TMemoField *zqClientesnotas;
|
||||||
|
TMainMenu *MainMenu1;
|
||||||
|
TMenuItem *menu_Clientes1;
|
||||||
|
TMenuItem *menu_Agentes1;
|
||||||
|
TMenuItem *ImprimirFicha1;
|
||||||
|
TMenuItem *ImprimirListado1;
|
||||||
|
TMenuItem *GestindeAgentes1;
|
||||||
|
TMenuItem *CuentaPolizas1;
|
||||||
|
TMenuItem *Salir1;
|
||||||
|
TZQuery *zqFamiliares;
|
||||||
|
TDataSource *dsFamiliares;
|
||||||
|
TIntegerField *zqFamiliaresid;
|
||||||
|
TIntegerField *zqFamiliarescliente;
|
||||||
|
TStringField *zqFamiliaresnombre;
|
||||||
|
TStringField *zqFamiliaresdni;
|
||||||
|
TStringField *zqFamiliaressexo;
|
||||||
|
TStringField *zqFamiliaresestado;
|
||||||
|
TStringField *zqFamiliaresrelacion;
|
||||||
|
TDateField *zqFamiliaresfechaNacimiento;
|
||||||
|
TZQuery *zqServicios;
|
||||||
|
TDataSource *dsServicios;
|
||||||
|
TIntegerField *zqServiciosid;
|
||||||
|
TIntegerField *zqServicioscliente;
|
||||||
|
TIntegerField *zqServiciostipoServicio;
|
||||||
|
TStringField *zqServiciosnPoliza;
|
||||||
|
TDateField *zqServiciosfechaEfecto;
|
||||||
|
TDateField *zqServiciosfechaVencimiento;
|
||||||
|
TFloatField *zqServiciosprimaNeta;
|
||||||
|
TZQuery *zqTipoServicios;
|
||||||
|
TIntegerField *zqTipoServiciosid;
|
||||||
|
TStringField *zqTipoServiciosnombre;
|
||||||
|
TStringField *zqServiciosnombreServicio;
|
||||||
|
TZUpdateSQL *zuServicios;
|
||||||
|
TDataSource *dsAgentes;
|
||||||
|
TMenuItem *TiposdeServicio1;
|
||||||
|
TMenuItem *N1;
|
||||||
|
TDataSource *dsTipoServicios;
|
||||||
|
TDBLookupComboBox *DBLookupComboBox1;
|
||||||
|
TZQuery *zqAgentes;
|
||||||
|
TImageList *ImageList1;
|
||||||
|
TComboBox *cbGradoFidelidad;
|
||||||
|
TTabSheet *TabSheet6;
|
||||||
|
TDBGrid *DBGrid4;
|
||||||
|
TDataSource *dsServiciosExternos;
|
||||||
|
TZQuery *zqServiciosExternos;
|
||||||
|
TIntegerField *IntegerField1;
|
||||||
|
TIntegerField *IntegerField2;
|
||||||
|
TIntegerField *IntegerField3;
|
||||||
|
TStringField *StringField1;
|
||||||
|
TDateField *DateField1;
|
||||||
|
TDateField *DateField2;
|
||||||
|
TFloatField *FloatField1;
|
||||||
|
TStringField *StringField2;
|
||||||
|
TZUpdateSQL *zuServiciosExternos;
|
||||||
|
TLabel *Label17;
|
||||||
|
TDateTimePicker *DateTimePicker2;
|
||||||
|
TDateField *zqClientesfechaCarnet;
|
||||||
|
void __fastcall FormShow(TObject *Sender);
|
||||||
|
void __fastcall DBGrid1DblClick(TObject *Sender);
|
||||||
|
void __fastcall DBGrid1TitleClick(TColumn *Column);
|
||||||
|
void __fastcall doFilterClick(TObject *Sender);
|
||||||
|
void __fastcall DBGrid1DrawColumnCell(TObject *Sender,
|
||||||
|
const TRect &Rect, int DataCol, TColumn *Column,
|
||||||
|
TGridDrawState State);
|
||||||
|
void __fastcall zqClientesBeforePost(TDataSet *DataSet);
|
||||||
|
void __fastcall DateTimePicker1CloseUp(TObject *Sender);
|
||||||
|
void __fastcall zqClientesAfterScroll(TDataSet *DataSet);
|
||||||
|
void __fastcall dbEstadoCivilChange(TObject *Sender);
|
||||||
|
void __fastcall dbPCargoClick(TObject *Sender);
|
||||||
|
void __fastcall Salir1Click(TObject *Sender);
|
||||||
|
void __fastcall GestindeAgentes1Click(TObject *Sender);
|
||||||
|
void __fastcall zqFamiliaresNewRecord(TDataSet *DataSet);
|
||||||
|
void __fastcall zqFamiliaresBeforePost(TDataSet *DataSet);
|
||||||
|
void __fastcall zqFamiliaresestadoGetText(TField *Sender,
|
||||||
|
AnsiString &Text, bool DisplayText);
|
||||||
|
void __fastcall zqFamiliaresrelacionGetText(TField *Sender,
|
||||||
|
AnsiString &Text, bool DisplayText);
|
||||||
|
void __fastcall zqFamiliaressexoGetText(TField *Sender,
|
||||||
|
AnsiString &Text, bool DisplayText);
|
||||||
|
void __fastcall zqServiciosNewRecord(TDataSet *DataSet);
|
||||||
|
void __fastcall TiposdeServicio1Click(TObject *Sender);
|
||||||
|
void __fastcall ImprimirListado1Click(TObject *Sender);
|
||||||
|
void __fastcall ImprimirFicha1Click(TObject *Sender);
|
||||||
|
void __fastcall CuentaPolizas1Click(TObject *Sender);
|
||||||
|
void __fastcall dsClientesStateChange(TObject *Sender);
|
||||||
|
void __fastcall zqClientesAfterPost(TDataSet *DataSet);
|
||||||
|
void __fastcall cbGradoFidelidadChange(TObject *Sender);
|
||||||
|
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
||||||
|
void __fastcall zqServiciosExternosNewRecord(TDataSet *DataSet);
|
||||||
|
void __fastcall PageControl2Changing(TObject *Sender,
|
||||||
|
bool &AllowChange);
|
||||||
|
private: // User declarations
|
||||||
|
void __fastcall MyWndProc(Messages::TMessage &Message);
|
||||||
|
AnsiString dsListado_sort;
|
||||||
|
int dsListado_Indice;
|
||||||
|
bool dbUpdating, gettingAutoIncrement;
|
||||||
|
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TgestionClientes(TComponent* Owner);
|
||||||
|
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TgestionClientes *gestionClientes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
600
src/clientes.~cpp
Normal file
600
src/clientes.~cpp
Normal file
@ -0,0 +1,600 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#include <DateUtils.hpp>
|
||||||
|
#include "tsplash.h"
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "clientes.h"
|
||||||
|
#include "agentes.h"
|
||||||
|
#include "imprimirClientes.h"
|
||||||
|
#include "cuentaPolizas.h"
|
||||||
|
#include "imprimirFichaCliente.h"
|
||||||
|
#include "login_dlg.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "ZAbstractDataset"
|
||||||
|
#pragma link "ZAbstractRODataset"
|
||||||
|
#pragma link "ZConnection"
|
||||||
|
#pragma link "ZDataset"
|
||||||
|
#pragma link "ZSqlUpdate"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TgestionClientes *gestionClientes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TgestionClientes::TgestionClientes(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
gettingAutoIncrement = false;
|
||||||
|
|
||||||
|
#define IDM_ABOUTBOX 1
|
||||||
|
HMENU pSysMenu = GetSystemMenu(this->Handle, FALSE);
|
||||||
|
if (pSysMenu != NULL)
|
||||||
|
{
|
||||||
|
AppendMenu(pSysMenu, MF_SEPARATOR,0,0);
|
||||||
|
AppendMenu(pSysMenu, MF_STRING, IDM_ABOUTBOX, "Acerca de...");
|
||||||
|
}
|
||||||
|
WindowProc=MyWndProc;
|
||||||
|
|
||||||
|
|
||||||
|
// Cargamos el listado de agentes disponibles
|
||||||
|
TZQuery *zquery;
|
||||||
|
zquery = new TZQuery(this);
|
||||||
|
zquery->Connection = ZConnection1;
|
||||||
|
zquery->SQL->Clear();
|
||||||
|
zquery->SQL->Add("SELECT id,nombre FROM agentes ORDER BY nombre");
|
||||||
|
zquery->Active=zquery->Connection->Connected;
|
||||||
|
|
||||||
|
srch_agentes->Items->Clear();
|
||||||
|
srch_agentes->Items->AddObject("",(TObject *)(-1) );
|
||||||
|
srch_agentes->Items->AddObject("-[ Sin Agente Asignado ]-",(TObject *)(0) );
|
||||||
|
while(!zquery->Eof)
|
||||||
|
{
|
||||||
|
srch_agentes->Items->AddObject(zquery->FieldByName("nombre")->AsString,(TObject *)(zquery->FieldByName("id")->AsInteger));
|
||||||
|
zquery->Next();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Orden del listado
|
||||||
|
dsListado_sort = "c.id";
|
||||||
|
|
||||||
|
|
||||||
|
zuClientes->ModifySQL->Clear();
|
||||||
|
zuClientes->ModifySQL->Add("UPDATE clientes SET agente=:agente, nombre=:nombre, dni=:dni, calle=:calle, poblacion=:poblacion, provincia=:provincia, cp=:cp, telefono=:telefono, movil=:movil, fax=:fax, correo=:correo, cobroCalle=:cobroCalle, estado=:estado, gradoFidelidad=:gradoFidelidad, pCargo=:pCargo, fechaNacimiento=:fechaNacimiento, fechaCarnet=:fechaCarnet, fecha=:fecha, hora=:hora, notas=:notas WHERE id=:OLD_id");
|
||||||
|
zuClientes->DeleteSQL->Clear();
|
||||||
|
zuClientes->DeleteSQL->Add("DELETE FROM clientes WHERE id=:OLD_id");
|
||||||
|
zuClientes->InsertSQL->Clear();
|
||||||
|
zuClientes->InsertSQL->Add("INSERT INTO clientes (agente, nombre, dni, calle, poblacion, provincia, cp, telefono, movil, fax, correo, cobroCalle, estado, gradoFidelidad, pCargo, fechaNacimiento, fechaCarnet, fecha, hora, notas) VALUES (:agente, :nombre, :dni, :calle, :poblacion, :provincia, :cp, :telefono, :movil, :fax, :correo, :cobroCalle, :estado, :gradoFidelidad, :pCargo, :fechaNacimiento, :fechaCarnet, :fecha, :hora, :notas)");
|
||||||
|
|
||||||
|
zuServicios->ModifySQL->Clear();
|
||||||
|
zuServicios->ModifySQL->Add("UPDATE servicios SET tipoServicio=:tipoServicio, nPoliza=:nPoliza, fechaEfecto=:fechaEfecto, fechaVencimiento=:fechaVencimiento, primaNeta=:primaNeta WHERE id=:OLD_id");
|
||||||
|
zuServicios->DeleteSQL->Clear();
|
||||||
|
zuServicios->DeleteSQL->Add("DELETE FROM servicios WHERE id=:OLD_id");
|
||||||
|
zuServicios->InsertSQL->Clear();
|
||||||
|
zuServicios->InsertSQL->Add("INSERT INTO servicios (cliente, tipoServicio, nPoliza, fechaEfecto, fechaVencimiento, primaNeta) VALUES (:cliente, :tipoServicio, :nPoliza, :fechaEfecto, :fechaVencimiento, :primaNeta)");
|
||||||
|
|
||||||
|
|
||||||
|
zuServiciosExternos->ModifySQL->Clear();
|
||||||
|
zuServiciosExternos->ModifySQL->Add("UPDATE serviciosExternos SET tipoServicio=:tipoServicio, nPoliza=:nPoliza, fechaEfecto=:fechaEfecto, fechaVencimiento=:fechaVencimiento, primaNeta=:primaNeta WHERE id=:OLD_id");
|
||||||
|
zuServiciosExternos->DeleteSQL->Clear();
|
||||||
|
zuServiciosExternos->DeleteSQL->Add("DELETE FROM serviciosExternos WHERE id=:OLD_id");
|
||||||
|
zuServiciosExternos->InsertSQL->Clear();
|
||||||
|
zuServiciosExternos->InsertSQL->Add("INSERT INTO serviciosExternos (cliente, tipoServicio, nPoliza, fechaEfecto, fechaVencimiento, primaNeta) VALUES (:cliente, :tipoServicio, :nPoliza, :fechaEfecto, :fechaVencimiento, :primaNeta)");
|
||||||
|
|
||||||
|
|
||||||
|
PageControl1->ActivePage = TabSheet1;
|
||||||
|
PageControl2->ActivePage = TabSheet3;
|
||||||
|
|
||||||
|
zqClientes->Active = zqClientes->Connection->Connected;
|
||||||
|
zqServicios->Active = zqServicios->Connection->Connected;
|
||||||
|
zqServiciosExternos->Active = zqServicios->Connection->Connected;
|
||||||
|
zqTipoServicios->Active = zqTipoServicios->Connection->Connected;
|
||||||
|
zqFamiliares->Active = zqFamiliares->Connection->Connected;
|
||||||
|
zqAgentes->Active = zqAgentes->Connection->Connected;
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionClientes::MyWndProc(Messages::TMessage &Message)
|
||||||
|
{
|
||||||
|
HMENU hMenu;
|
||||||
|
hMenu = GetSystemMenu (this->Handle, FALSE);
|
||||||
|
if (Message.Msg == WM_SYSCOMMAND)
|
||||||
|
{
|
||||||
|
switch(Message.WParamLo)
|
||||||
|
{
|
||||||
|
case IDM_ABOUTBOX:
|
||||||
|
if ( Splash==NULL ) Splash = new TSplash(NULL);
|
||||||
|
Splash->pressKeyToClose = true;
|
||||||
|
Splash->Show();
|
||||||
|
Splash->Repaint();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
WndProc(Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
WndProc(Message);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionClientes::FormShow(TObject *Sender)
|
||||||
|
{
|
||||||
|
if(Splash){
|
||||||
|
delete Splash;
|
||||||
|
Splash = NULL;
|
||||||
|
|
||||||
|
Tlogin *login;
|
||||||
|
login = new Tlogin(this);
|
||||||
|
|
||||||
|
do {
|
||||||
|
login->ShowModal();
|
||||||
|
if ( login->ModalResult!=mrOk ) {
|
||||||
|
Close();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if ( login->auth ) break;
|
||||||
|
|
||||||
|
MessageDlg("Error iniciando sesi<73>n.\nEl usuario/contrase<73>a no es correcto.",mtError, TMsgDlgButtons() << mbOK, 0);
|
||||||
|
login->pass->Text = "";
|
||||||
|
} while(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionClientes::DBGrid1DblClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
PageControl1->ActivePage = TabSheet2;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::DBGrid1TitleClick(TColumn *Column)
|
||||||
|
{
|
||||||
|
if ( dsListado_sort.Pos(Column->FieldName)==1 && dsListado_sort.Pos(" ASC")==0 )
|
||||||
|
dsListado_sort = Column->FieldName + " ASC";
|
||||||
|
else
|
||||||
|
dsListado_sort = Column->FieldName + " DESC";
|
||||||
|
|
||||||
|
dsListado_Indice = Column->Index;
|
||||||
|
|
||||||
|
doFilterClick(NULL);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::doFilterClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
AnsiString where,orderBy,query, leftJOIN;
|
||||||
|
|
||||||
|
where = "";
|
||||||
|
leftJOIN = "";
|
||||||
|
if ( !srch_vFilter->Text.IsEmpty() )
|
||||||
|
switch( srch_kFilter->ItemIndex ) {
|
||||||
|
case 0:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.id='"+srch_vFilter->Text+"'";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.nombre LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" (c.telefono LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
where+=" OR c.movil LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
where+=" OR c.fax LIKE '%"+srch_vFilter->Text+"%')";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.calle LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.poblacion LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.provincia LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.cp LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" c.dni LIKE '%"+srch_vFilter->Text+"%'";
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
System::TDateTime fecha;
|
||||||
|
if ( TryStrToDate(srch_vFilter->Text, fecha) ) {
|
||||||
|
DateSeparator = '-';
|
||||||
|
ShortDateFormat = "yyyy-mm-dd";
|
||||||
|
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" p.fechaVencimiento<='"+DateToStr(fecha)+"'";
|
||||||
|
leftJOIN = " LEFT JOIN serviciosExternos p ON (p.cliente=c.id) ";
|
||||||
|
|
||||||
|
DateSeparator = '/';
|
||||||
|
ShortDateFormat = "dd/mm/yyyy";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int agente;
|
||||||
|
if ( srch_agentes->ItemIndex>0 ) {
|
||||||
|
agente = (int)srch_agentes->Items->Objects[srch_agentes->ItemIndex];
|
||||||
|
if ( agente>=0 ) {
|
||||||
|
if ( where.IsEmpty() ) where = " WHERE "; else where+=" AND ";
|
||||||
|
where+=" a.id="+AnsiString(agente);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
orderBy = " ORDER BY ";
|
||||||
|
if ( dsListado_sort.Pos("agenteNombre")>0 ) orderBy += "a.nombre"; else orderBy += "c."+dsListado_sort;
|
||||||
|
|
||||||
|
|
||||||
|
query = "SELECT c.id, c.agente, a.nombre agenteNombre, c.nombre, c.dni, c.calle, c.poblacion, c.provincia, c.cp, c.telefono, c.movil, c.fax, c.correo, c.cobroCalle, c.estado, c.gradoFidelidad, c.pCargo, c.fechaNacimiento,c.fechaCarnet,c.fecha, c.hora, c.notas";
|
||||||
|
query+= " FROM clientes c LEFT JOIN agentes a ON (a.id=c.agente)";
|
||||||
|
query+= leftJOIN;
|
||||||
|
query+= where;
|
||||||
|
query+= orderBy;
|
||||||
|
|
||||||
|
|
||||||
|
// Volver a filtrar el listado...
|
||||||
|
zqClientes->SQL->Clear();
|
||||||
|
zqClientes->SQL->Add(query);
|
||||||
|
zqClientes->Active = zqClientes->Connection->Connected;
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::DBGrid1DrawColumnCell(TObject *Sender,
|
||||||
|
const TRect &Rect, int DataCol, TColumn *Column,
|
||||||
|
TGridDrawState State)
|
||||||
|
{
|
||||||
|
//- ---------------------------------------------------------
|
||||||
|
if ( !State.Contains(gdSelected) )
|
||||||
|
{
|
||||||
|
Graphics::TBitmap *Bmp;
|
||||||
|
TDBGrid *dbG;
|
||||||
|
dbG = (TDBGrid *)Sender;
|
||||||
|
|
||||||
|
// Determina la columna clicada...
|
||||||
|
if ( Column->Index == dsListado_Indice )
|
||||||
|
{
|
||||||
|
Bmp = new Graphics::TBitmap();
|
||||||
|
Bmp->TransparentColor = clWhite;
|
||||||
|
Bmp->Transparent = true;
|
||||||
|
Bmp->TransparentMode = tmAuto;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Determina la imagen mostrada de acuerdo con el orden de los registros
|
||||||
|
if ( dsListado_sort.Pos(Column->FieldName) == 1 && dsListado_sort.Pos(" ASC")== 0 )
|
||||||
|
gridIcons->GetBitmap(0, Bmp); // Set abajo
|
||||||
|
else
|
||||||
|
gridIcons->GetBitmap(1, Bmp); // Set arriba
|
||||||
|
|
||||||
|
dbG->Canvas->Draw( Rect.right - Bmp->Width,2, Bmp);
|
||||||
|
} __finally {
|
||||||
|
delete Bmp; // Liberamos la variable Bmp de la memoria
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dbG->DefaultDrawColumnCell(Rect,DataCol,Column,State);
|
||||||
|
}
|
||||||
|
//- ---------------------------------------------------------
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqClientesBeforePost(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
// Comprobar que no exista el DNI introducido
|
||||||
|
AnsiString dni;
|
||||||
|
dni = zqClientes->FieldByName("dni")->AsString;
|
||||||
|
|
||||||
|
|
||||||
|
if ( DataSet->State == dsInsert && !dni.IsEmpty() ) {
|
||||||
|
TZQuery *q;
|
||||||
|
q = new TZQuery(this);
|
||||||
|
q->SQL->Clear();
|
||||||
|
q->SQL->Add( AnsiString("select id FROM clientes WHERE dni='")+dni+AnsiString("'") );
|
||||||
|
q->Connection = ZConnection1;
|
||||||
|
q->Active = true;
|
||||||
|
|
||||||
|
if ( q->RecordCount>0 ) {
|
||||||
|
int res;
|
||||||
|
res = MessageDlg("El dni introducido ya existe, ficha " + IntToStr(q->FieldByName("id")->AsInteger) + ". <20>Duplicar ficha?", mtInformation, mbYesNoCancel, 0);
|
||||||
|
switch( res ) {
|
||||||
|
case mrCancel:
|
||||||
|
Abort();
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
case mrNo:
|
||||||
|
zqClientes->CancelUpdates();
|
||||||
|
zqClientes->Locate("id",q->FieldByName("id")->AsInteger, TLocateOptions() );
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Guardamos el contenido de los combos
|
||||||
|
zqClientes->FieldByName("fechaNacimiento")->AsDateTime = DateTimePicker1->DateTime;
|
||||||
|
zqClientes->FieldByName("fechaCarnet")->AsDateTime = DateTimePicker2->DateTime;
|
||||||
|
switch( dbEstadoCivil->ItemIndex ) {
|
||||||
|
case 0: zqClientes->FieldByName("estado")->AsString = "S"; break;
|
||||||
|
case 1: zqClientes->FieldByName("estado")->AsString = "C"; break;
|
||||||
|
case 2: zqClientes->FieldByName("estado")->AsString = "D"; break;
|
||||||
|
case 3: zqClientes->FieldByName("estado")->AsString = "V"; break;
|
||||||
|
}
|
||||||
|
zqClientes->FieldByName("gradoFidelidad")->AsInteger = cbGradoFidelidad->ItemIndex;
|
||||||
|
zqClientes->FieldByName("pCargo")->AsString = (dbPCargo->Checked?"Y":"N");
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::DateTimePicker1CloseUp(TObject *Sender)
|
||||||
|
{
|
||||||
|
lbEdad->Caption = AnsiString( YearsBetween(TDateTime::CurrentDate(), DateTimePicker1->DateTime) ) + " A<>os";
|
||||||
|
|
||||||
|
if ( dbUpdating ) return;
|
||||||
|
if (zqClientes->State != dsEdit || zqClientes->State != dsInsert ) zqClientes->Edit();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqClientesAfterScroll(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
dbUpdating = true;
|
||||||
|
|
||||||
|
// Guardamos el contenido de los combos
|
||||||
|
DateTimePicker1->DateTime = zqClientes->FieldByName("fechaNacimiento")->AsDateTime;
|
||||||
|
DateTimePicker2->DateTime = zqClientes->FieldByName("fechaCarnet")->AsDateTime;
|
||||||
|
if ( zqClientes->FieldByName("estado")->AsString=="S" ) dbEstadoCivil->ItemIndex = 0; else
|
||||||
|
if ( zqClientes->FieldByName("estado")->AsString=="C" ) dbEstadoCivil->ItemIndex = 1; else
|
||||||
|
if ( zqClientes->FieldByName("estado")->AsString=="D" ) dbEstadoCivil->ItemIndex = 2; else
|
||||||
|
if ( zqClientes->FieldByName("estado")->AsString=="V" ) dbEstadoCivil->ItemIndex = 3;
|
||||||
|
|
||||||
|
if ( zqClientes->FieldByName("gradoFidelidad")->AsInteger == 0 ) cbGradoFidelidad->ItemIndex = 0;
|
||||||
|
else if ( zqClientes->FieldByName("gradoFidelidad")->AsInteger == 1 ) cbGradoFidelidad->ItemIndex = 1;
|
||||||
|
else if ( zqClientes->FieldByName("gradoFidelidad")->AsInteger == 2 ) cbGradoFidelidad->ItemIndex = 2;
|
||||||
|
else cbGradoFidelidad->ItemIndex = 2;
|
||||||
|
|
||||||
|
dbPCargo->Checked = (zqClientes->FieldByName("pCargo")->AsString=="Y");
|
||||||
|
|
||||||
|
lbEdad->Caption = AnsiString( YearsBetween(TDateTime::CurrentDate(), DateTimePicker1->DateTime) ) + " A<>os";
|
||||||
|
|
||||||
|
dbUpdating = false;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::dbEstadoCivilChange(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( dbUpdating ) return;
|
||||||
|
if (zqClientes->State != dsEdit || zqClientes->State != dsInsert ) zqClientes->Edit();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::dbPCargoClick(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( dbUpdating ) return;
|
||||||
|
if (zqClientes->State != dsEdit || zqClientes->State != dsInsert ) zqClientes->Edit();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::Salir1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::GestindeAgentes1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TgestionAgentes *f;
|
||||||
|
f = new TgestionAgentes(this);
|
||||||
|
f->DBGrid2->DataSource = dsAgentes;
|
||||||
|
f->ShowModal();
|
||||||
|
delete f;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqFamiliaresNewRecord(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
zqFamiliares->FieldByName("cliente")->AsInteger = zqClientes->FieldByName("id")->AsInteger;
|
||||||
|
zqFamiliares->FieldByName("sexo")->AsString = "H";
|
||||||
|
zqFamiliares->FieldByName("estado")->AsString = "C";
|
||||||
|
zqFamiliares->FieldByName("relacion")->AsString = "C";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqFamiliaresBeforePost(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
// Convertir los desplegables
|
||||||
|
zqFamiliares->FieldByName("sexo")->AsString = (zqFamiliares->FieldByName("sexo")->AsString=="Hombre"?"H":"M");
|
||||||
|
if ( zqFamiliares->FieldByName("estado")->AsString=="Soltero" ) zqFamiliares->FieldByName("estado")->AsString = "S"; else
|
||||||
|
if ( zqFamiliares->FieldByName("estado")->AsString=="Casado" ) zqFamiliares->FieldByName("estado")->AsString = "C"; else
|
||||||
|
if ( zqFamiliares->FieldByName("estado")->AsString=="Divorciado" ) zqFamiliares->FieldByName("estado")->AsString = "D"; else
|
||||||
|
if ( zqFamiliares->FieldByName("estado")->AsString=="Viudo" ) zqFamiliares->FieldByName("estado")->AsString = "V";
|
||||||
|
|
||||||
|
if ( zqFamiliares->FieldByName("relacion")->AsString == "Padre/Madre" ) zqFamiliares->FieldByName("relacion")->AsString = "P"; else
|
||||||
|
if ( zqFamiliares->FieldByName("relacion")->AsString == "Marido/Mujer" ) zqFamiliares->FieldByName("relacion")->AsString = "C"; else
|
||||||
|
if ( zqFamiliares->FieldByName("relacion")->AsString == "Hermano/a" ) zqFamiliares->FieldByName("relacion")->AsString = "H"; else
|
||||||
|
if ( zqFamiliares->FieldByName("relacion")->AsString == "Hijo/a" ) zqFamiliares->FieldByName("relacion")->AsString = "N"; else
|
||||||
|
if ( zqFamiliares->FieldByName("relacion")->AsString == "otros" ) zqFamiliares->FieldByName("relacion")->AsString = "o";
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqFamiliaresestadoGetText(TField *Sender,
|
||||||
|
AnsiString &Text, bool DisplayText)
|
||||||
|
{
|
||||||
|
if ( Sender->AsString == "S" ) Text = "Soltero"; else
|
||||||
|
if ( Sender->AsString == "C" ) Text = "Casado"; else
|
||||||
|
if ( Sender->AsString == "D" ) Text = "Divorciado"; else
|
||||||
|
if ( Sender->AsString == "V" ) Text = "Viudo";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqFamiliaresrelacionGetText(
|
||||||
|
TField *Sender, AnsiString &Text, bool DisplayText)
|
||||||
|
{
|
||||||
|
if ( Sender->AsString == "P" ) Text = "Padre/Madre"; else
|
||||||
|
if ( Sender->AsString == "C" ) Text = "Marido/Mujer"; else
|
||||||
|
if ( Sender->AsString == "H" ) Text = "Hermano/a"; else
|
||||||
|
if ( Sender->AsString == "N" ) Text = "Hijo/a"; else
|
||||||
|
if ( Sender->AsString == "o" ) Text = "otros";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqFamiliaressexoGetText(TField *Sender,
|
||||||
|
AnsiString &Text, bool DisplayText)
|
||||||
|
{
|
||||||
|
if ( Sender->AsString == "H" ) Text = "Hombre"; else
|
||||||
|
if ( Sender->AsString == "M" ) Text = "Mujer";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqServiciosNewRecord(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
zqServicios->FieldByName("cliente")->AsInteger = zqClientes->FieldByName("id")->AsInteger;
|
||||||
|
zqServicios->FieldByName("primaNeta")->AsCurrency = 0;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::TiposdeServicio1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TgestionAgentes *f;
|
||||||
|
f = new TgestionAgentes(this);
|
||||||
|
f->Caption = "Tipos de Servicios";
|
||||||
|
f->DBGrid2->Columns->Items[0]->Title->Caption = "Nombre del Servicio Contratado";
|
||||||
|
f->DBGrid2->DataSource = dsTipoServicios;
|
||||||
|
f->ShowModal();
|
||||||
|
delete f;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::ImprimirListado1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TimprimirCarteraClientes *i;
|
||||||
|
i = new TimprimirCarteraClientes(this);
|
||||||
|
i->QuickRep1->DataSet = zqClientes;
|
||||||
|
i->QuickRep1->Preview();
|
||||||
|
delete i;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::ImprimirFicha1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TimprFichaCliente *i;
|
||||||
|
i = new TimprFichaCliente(this);
|
||||||
|
|
||||||
|
i->rID->Caption = zqClientes->FieldByName("id")->AsString;
|
||||||
|
i->rNombre->Caption = zqClientes->FieldByName("nombre")->AsString;
|
||||||
|
i->rDNI->Caption = zqClientes->FieldByName("dni")->AsString;
|
||||||
|
i->rFechaNacimiento->Caption = zqClientes->FieldByName("fechaNacimiento")->AsString;
|
||||||
|
i->rEstadoCivil->Caption = zqClientes->FieldByName("estado")->AsString;
|
||||||
|
i->rPCargo->Caption = zqClientes->FieldByName("pCargo")->AsString=="Y"?"SI":"NO";
|
||||||
|
i->rCalle->Caption = zqClientes->FieldByName("calle")->AsString;
|
||||||
|
i->rPoblacion->Caption = zqClientes->FieldByName("poblacion")->AsString;
|
||||||
|
i->rProvincia->Caption = zqClientes->FieldByName("provincia")->AsString;
|
||||||
|
i->rCP->Caption = zqClientes->FieldByName("cp")->AsString;
|
||||||
|
i->rDirCobro->Caption = zqClientes->FieldByName("cobroCalle")->AsString;
|
||||||
|
i->rTelefono->Caption = zqClientes->FieldByName("telefono")->AsString;
|
||||||
|
i->rMovil->Caption = zqClientes->FieldByName("movil")->AsString;
|
||||||
|
i->rFax->Caption = zqClientes->FieldByName("fax")->AsString;
|
||||||
|
i->rEMail->Caption = zqClientes->FieldByName("correo")->AsString;
|
||||||
|
i->rAgente->Caption = DBLookupComboBox1->Text;
|
||||||
|
i->rGradoFidelidad->Caption = zqClientes->FieldByName("gradoFidelidad")->AsString;
|
||||||
|
i->rNotas->Lines->Text = zqClientes->FieldByName("notas")->AsString;
|
||||||
|
|
||||||
|
i->QuickRep1->DataSet = zqFamiliares;
|
||||||
|
i->QuickRep1->Preview();
|
||||||
|
delete i;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::CuentaPolizas1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TgestionCuentaPolizas *f;
|
||||||
|
f = new TgestionCuentaPolizas(this);
|
||||||
|
f->ShowModal();
|
||||||
|
delete f;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::dsClientesStateChange(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( dsClientes->State==dsInsert ) {
|
||||||
|
PageControl2->ActivePage = TabSheet5;
|
||||||
|
}
|
||||||
|
|
||||||
|
TabSheet3->Enabled = (dsClientes->State!=dsInsert);
|
||||||
|
TabSheet6->Enabled = (dsClientes->State!=dsInsert);
|
||||||
|
TabSheet4->Enabled = (dsClientes->State!=dsInsert);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqClientesAfterPost(TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
if ( gettingAutoIncrement ) return;
|
||||||
|
// Read auto-increment
|
||||||
|
if ( zqClientes->FieldByName("id")->AsInteger==0 ) {
|
||||||
|
gettingAutoIncrement = true;
|
||||||
|
|
||||||
|
zqClientes->Edit();
|
||||||
|
|
||||||
|
TZQuery *q;
|
||||||
|
q = new TZQuery(this);
|
||||||
|
q->SQL->Clear();
|
||||||
|
q->SQL->Add("select last_insert_rowid() id");
|
||||||
|
q->Connection = ZConnection1;
|
||||||
|
q->Active = true;
|
||||||
|
|
||||||
|
zqClientes->FieldByName("id")->AsInteger = q->FieldByName("id")->AsInteger;
|
||||||
|
delete q;
|
||||||
|
|
||||||
|
zqClientes->Post();
|
||||||
|
gettingAutoIncrement = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::cbGradoFidelidadChange(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( dbUpdating ) return;
|
||||||
|
if (zqClientes->State != dsEdit || zqClientes->State != dsInsert ) zqClientes->Edit();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::FormClose(TObject *Sender,
|
||||||
|
TCloseAction &Action)
|
||||||
|
{
|
||||||
|
if( zqClientes->State == dsEdit || zqClientes->State == dsInsert ) zqClientes->Post();
|
||||||
|
if( zqServicios->State == dsEdit || zqServicios->State == dsInsert ) zqServicios->Post();
|
||||||
|
if( zqFamiliares->State == dsEdit || zqFamiliares->State == dsInsert ) zqFamiliares->Post();
|
||||||
|
if( zqAgentes->State == dsEdit || zqAgentes->State == dsInsert ) zqAgentes->Post();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::zqServiciosExternosNewRecord(
|
||||||
|
TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
zqServiciosExternos->FieldByName("cliente")->AsInteger = zqClientes->FieldByName("id")->AsInteger;
|
||||||
|
zqServiciosExternos->FieldByName("primaNeta")->AsCurrency = 0;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TgestionClientes::PageControl2Changing(TObject *Sender,
|
||||||
|
bool &AllowChange)
|
||||||
|
{
|
||||||
|
AllowChange = ( dsClientes->State!=dsInsert );
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
BIN
src/clientes.~ddp
Normal file
BIN
src/clientes.~ddp
Normal file
Binary file not shown.
1665
src/clientes.~dfm
Normal file
1665
src/clientes.~dfm
Normal file
File diff suppressed because it is too large
Load Diff
211
src/clientes.~h
Normal file
211
src/clientes.~h
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef clientesH
|
||||||
|
#define clientesH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include "ZAbstractDataset.hpp"
|
||||||
|
#include "ZAbstractRODataset.hpp"
|
||||||
|
#include "ZConnection.hpp"
|
||||||
|
#include "ZDataset.hpp"
|
||||||
|
#include "ZSqlUpdate.hpp"
|
||||||
|
#include <ComCtrls.hpp>
|
||||||
|
#include <DB.hpp>
|
||||||
|
#include <DBGrids.hpp>
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <Grids.hpp>
|
||||||
|
#include <Buttons.hpp>
|
||||||
|
#include <ImgList.hpp>
|
||||||
|
#include <DBCtrls.hpp>
|
||||||
|
#include <Mask.hpp>
|
||||||
|
#include <Menus.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TgestionClientes : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TPageControl *PageControl1;
|
||||||
|
TTabSheet *TabSheet1;
|
||||||
|
TTabSheet *TabSheet2;
|
||||||
|
TPanel *Panel1;
|
||||||
|
TDBGrid *DBGrid1;
|
||||||
|
TZConnection *ZConnection1;
|
||||||
|
TZQuery *zqClientes;
|
||||||
|
TZUpdateSQL *zuClientes;
|
||||||
|
TDataSource *dsClientes;
|
||||||
|
TLabel *Label1;
|
||||||
|
TComboBox *srch_kFilter;
|
||||||
|
TEdit *srch_vFilter;
|
||||||
|
TBitBtn *BitBtn1;
|
||||||
|
TComboBox *srch_agentes;
|
||||||
|
TImageList *gridIcons;
|
||||||
|
TLabel *Label2;
|
||||||
|
TDBEdit *DBEdit1;
|
||||||
|
TPageControl *PageControl2;
|
||||||
|
TTabSheet *TabSheet3;
|
||||||
|
TTabSheet *TabSheet4;
|
||||||
|
TTabSheet *TabSheet5;
|
||||||
|
TDBMemo *DBMemo1;
|
||||||
|
TDBGrid *DBGrid2;
|
||||||
|
TPanel *Panel2;
|
||||||
|
TDBGrid *DBGrid3;
|
||||||
|
TDBNavigator *DBNavigator1;
|
||||||
|
TLabel *Label4;
|
||||||
|
TDBText *DBText1;
|
||||||
|
TLabel *Label5;
|
||||||
|
TDBEdit *DBEdit2;
|
||||||
|
TLabel *Label6;
|
||||||
|
TDBEdit *DBEdit3;
|
||||||
|
TLabel *Label7;
|
||||||
|
TDBEdit *DBEdit4;
|
||||||
|
TLabel *Label8;
|
||||||
|
TDBEdit *DBEdit5;
|
||||||
|
TLabel *Label9;
|
||||||
|
TDBEdit *DBEdit6;
|
||||||
|
TLabel *Label10;
|
||||||
|
TDBEdit *DBEdit7;
|
||||||
|
TLabel *Label11;
|
||||||
|
TDBEdit *DBEdit8;
|
||||||
|
TLabel *Label12;
|
||||||
|
TDBEdit *DBEdit9;
|
||||||
|
TLabel *Label13;
|
||||||
|
TDBEdit *DBEdit10;
|
||||||
|
TLabel *Label14;
|
||||||
|
TDBEdit *DBEdit11;
|
||||||
|
TLabel *Label15;
|
||||||
|
TLabel *Label16;
|
||||||
|
TLabel *lbEdad;
|
||||||
|
TDateTimePicker *DateTimePicker1;
|
||||||
|
TLabel *Label18;
|
||||||
|
TComboBox *dbEstadoCivil;
|
||||||
|
TGroupBox *GroupBox1;
|
||||||
|
TLabel *Label3;
|
||||||
|
TLabel *Label19;
|
||||||
|
TCheckBox *dbPCargo;
|
||||||
|
TIntegerField *zqClientesid;
|
||||||
|
TIntegerField *zqClientesagente;
|
||||||
|
TStringField *zqClientesagenteNombre;
|
||||||
|
TStringField *zqClientesnombre;
|
||||||
|
TStringField *zqClientesdni;
|
||||||
|
TStringField *zqClientescalle;
|
||||||
|
TStringField *zqClientespoblacion;
|
||||||
|
TStringField *zqClientesprovincia;
|
||||||
|
TStringField *zqClientescp;
|
||||||
|
TStringField *zqClientestelefono;
|
||||||
|
TStringField *zqClientesmovil;
|
||||||
|
TStringField *zqClientesfax;
|
||||||
|
TStringField *zqClientescorreo;
|
||||||
|
TStringField *zqClientescobroCalle;
|
||||||
|
TStringField *zqClientesestado;
|
||||||
|
TIntegerField *zqClientesgradoFidelidad;
|
||||||
|
TStringField *zqClientespCargo;
|
||||||
|
TDateField *zqClientesfechaNacimiento;
|
||||||
|
TDateField *zqClientesfecha;
|
||||||
|
TTimeField *zqClienteshora;
|
||||||
|
TMemoField *zqClientesnotas;
|
||||||
|
TMainMenu *MainMenu1;
|
||||||
|
TMenuItem *menu_Clientes1;
|
||||||
|
TMenuItem *menu_Agentes1;
|
||||||
|
TMenuItem *ImprimirFicha1;
|
||||||
|
TMenuItem *ImprimirListado1;
|
||||||
|
TMenuItem *GestindeAgentes1;
|
||||||
|
TMenuItem *CuentaPolizas1;
|
||||||
|
TMenuItem *Salir1;
|
||||||
|
TZQuery *zqFamiliares;
|
||||||
|
TDataSource *dsFamiliares;
|
||||||
|
TIntegerField *zqFamiliaresid;
|
||||||
|
TIntegerField *zqFamiliarescliente;
|
||||||
|
TStringField *zqFamiliaresnombre;
|
||||||
|
TStringField *zqFamiliaresdni;
|
||||||
|
TStringField *zqFamiliaressexo;
|
||||||
|
TStringField *zqFamiliaresestado;
|
||||||
|
TStringField *zqFamiliaresrelacion;
|
||||||
|
TDateField *zqFamiliaresfechaNacimiento;
|
||||||
|
TZQuery *zqServicios;
|
||||||
|
TDataSource *dsServicios;
|
||||||
|
TIntegerField *zqServiciosid;
|
||||||
|
TIntegerField *zqServicioscliente;
|
||||||
|
TIntegerField *zqServiciostipoServicio;
|
||||||
|
TStringField *zqServiciosnPoliza;
|
||||||
|
TDateField *zqServiciosfechaEfecto;
|
||||||
|
TDateField *zqServiciosfechaVencimiento;
|
||||||
|
TFloatField *zqServiciosprimaNeta;
|
||||||
|
TZQuery *zqTipoServicios;
|
||||||
|
TIntegerField *zqTipoServiciosid;
|
||||||
|
TStringField *zqTipoServiciosnombre;
|
||||||
|
TStringField *zqServiciosnombreServicio;
|
||||||
|
TZUpdateSQL *zuServicios;
|
||||||
|
TDataSource *dsAgentes;
|
||||||
|
TMenuItem *TiposdeServicio1;
|
||||||
|
TMenuItem *N1;
|
||||||
|
TDataSource *dsTipoServicios;
|
||||||
|
TDBLookupComboBox *DBLookupComboBox1;
|
||||||
|
TZQuery *zqAgentes;
|
||||||
|
TImageList *ImageList1;
|
||||||
|
TComboBox *cbGradoFidelidad;
|
||||||
|
TTabSheet *TabSheet6;
|
||||||
|
TDBGrid *DBGrid4;
|
||||||
|
TDataSource *dsServiciosExternos;
|
||||||
|
TZQuery *zqServiciosExternos;
|
||||||
|
TIntegerField *IntegerField1;
|
||||||
|
TIntegerField *IntegerField2;
|
||||||
|
TIntegerField *IntegerField3;
|
||||||
|
TStringField *StringField1;
|
||||||
|
TDateField *DateField1;
|
||||||
|
TDateField *DateField2;
|
||||||
|
TFloatField *FloatField1;
|
||||||
|
TStringField *StringField2;
|
||||||
|
TZUpdateSQL *zuServiciosExternos;
|
||||||
|
TLabel *Label17;
|
||||||
|
TDateTimePicker *DateTimePicker2;
|
||||||
|
TDateField *zqClientesfechaCarnet;
|
||||||
|
void __fastcall FormShow(TObject *Sender);
|
||||||
|
void __fastcall DBGrid1DblClick(TObject *Sender);
|
||||||
|
void __fastcall DBGrid1TitleClick(TColumn *Column);
|
||||||
|
void __fastcall doFilterClick(TObject *Sender);
|
||||||
|
void __fastcall DBGrid1DrawColumnCell(TObject *Sender,
|
||||||
|
const TRect &Rect, int DataCol, TColumn *Column,
|
||||||
|
TGridDrawState State);
|
||||||
|
void __fastcall zqClientesBeforePost(TDataSet *DataSet);
|
||||||
|
void __fastcall DateTimePicker1CloseUp(TObject *Sender);
|
||||||
|
void __fastcall zqClientesAfterScroll(TDataSet *DataSet);
|
||||||
|
void __fastcall dbEstadoCivilChange(TObject *Sender);
|
||||||
|
void __fastcall dbPCargoClick(TObject *Sender);
|
||||||
|
void __fastcall Salir1Click(TObject *Sender);
|
||||||
|
void __fastcall GestindeAgentes1Click(TObject *Sender);
|
||||||
|
void __fastcall zqFamiliaresNewRecord(TDataSet *DataSet);
|
||||||
|
void __fastcall zqFamiliaresBeforePost(TDataSet *DataSet);
|
||||||
|
void __fastcall zqFamiliaresestadoGetText(TField *Sender,
|
||||||
|
AnsiString &Text, bool DisplayText);
|
||||||
|
void __fastcall zqFamiliaresrelacionGetText(TField *Sender,
|
||||||
|
AnsiString &Text, bool DisplayText);
|
||||||
|
void __fastcall zqFamiliaressexoGetText(TField *Sender,
|
||||||
|
AnsiString &Text, bool DisplayText);
|
||||||
|
void __fastcall zqServiciosNewRecord(TDataSet *DataSet);
|
||||||
|
void __fastcall TiposdeServicio1Click(TObject *Sender);
|
||||||
|
void __fastcall ImprimirListado1Click(TObject *Sender);
|
||||||
|
void __fastcall ImprimirFicha1Click(TObject *Sender);
|
||||||
|
void __fastcall CuentaPolizas1Click(TObject *Sender);
|
||||||
|
void __fastcall dsClientesStateChange(TObject *Sender);
|
||||||
|
void __fastcall zqClientesAfterPost(TDataSet *DataSet);
|
||||||
|
void __fastcall cbGradoFidelidadChange(TObject *Sender);
|
||||||
|
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
||||||
|
void __fastcall zqServiciosExternosNewRecord(TDataSet *DataSet);
|
||||||
|
void __fastcall PageControl2Changing(TObject *Sender,
|
||||||
|
bool &AllowChange);
|
||||||
|
private: // User declarations
|
||||||
|
void __fastcall MyWndProc(Messages::TMessage &Message);
|
||||||
|
AnsiString dsListado_sort;
|
||||||
|
int dsListado_Indice;
|
||||||
|
bool dbUpdating, gettingAutoIncrement;
|
||||||
|
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TgestionClientes(TComponent* Owner);
|
||||||
|
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TgestionClientes *gestionClientes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
133
src/cuentaPolizas.cpp
Normal file
133
src/cuentaPolizas.cpp
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "cuentaPolizas.h"
|
||||||
|
#include "clientes.h"
|
||||||
|
#include "imprimirCuentaPolizas.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "ZAbstractDataset"
|
||||||
|
#pragma link "ZAbstractRODataset"
|
||||||
|
#pragma link "ZDataset"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TgestionCuentaPolizas *gestionCuentaPolizas;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TgestionCuentaPolizas::TgestionCuentaPolizas(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
// Cargamos el listado de agentes disponibles
|
||||||
|
TZQuery *zquery;
|
||||||
|
zquery = new TZQuery(this);
|
||||||
|
zquery->Connection = gestionClientes->ZConnection1;
|
||||||
|
zquery->SQL->Clear();
|
||||||
|
zquery->SQL->Add("SELECT id,nombre FROM agentes ORDER BY nombre");
|
||||||
|
zquery->Active=zquery->Connection->Connected;
|
||||||
|
|
||||||
|
srch_agentes->Items->Clear();
|
||||||
|
while(!zquery->Eof)
|
||||||
|
{
|
||||||
|
srch_agentes->Items->AddObject(zquery->FieldByName("nombre")->AsString,(TObject *)(zquery->FieldByName("id")->AsInteger));
|
||||||
|
zquery->Next();
|
||||||
|
}
|
||||||
|
srch_agentes->ItemIndex = 0;
|
||||||
|
|
||||||
|
unsigned short yyyy,mm,dd;
|
||||||
|
TDateTime::CurrentDate().DecodeDate(&yyyy,&mm,&dd);
|
||||||
|
srch_mes->ItemIndex = mm-1;
|
||||||
|
UpDown1->Position = yyyy;
|
||||||
|
|
||||||
|
execFilter(NULL);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionCuentaPolizas::zqCuentaPolizasNewRecord(
|
||||||
|
TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
AnsiString fecha;
|
||||||
|
fecha = "1/"+AnsiString(srch_mes->ItemIndex+1)+"/"+AnsiString(UpDown1->Position);
|
||||||
|
zqCuentaPolizas->FieldByName("fecha")->AsDateTime = TDateTime::TDateTime(fecha);
|
||||||
|
|
||||||
|
int agente;
|
||||||
|
agente = (int)srch_agentes->Items->Objects[srch_agentes->ItemIndex];
|
||||||
|
zqCuentaPolizas->FieldByName("agente")->AsInteger = agente;
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionCuentaPolizas::execFilter(TObject *Sender)
|
||||||
|
{
|
||||||
|
int agente;
|
||||||
|
if ( srch_agentes->ItemIndex<0 ) return;
|
||||||
|
agente = (int)srch_agentes->Items->Objects[srch_agentes->ItemIndex];
|
||||||
|
|
||||||
|
AnsiString where,orderBy,query;
|
||||||
|
|
||||||
|
AnsiString desde, hasta;
|
||||||
|
desde = Format("%.4d-%.2d-01", ARRAYOFCONST((UpDown1->Position,(srch_mes->ItemIndex+1))) );
|
||||||
|
if ( srch_mes->ItemIndex==11 )
|
||||||
|
hasta = Format("%.4d-01-01", ARRAYOFCONST((UpDown1->Position+1)) );
|
||||||
|
else
|
||||||
|
hasta = Format("%.4d-%.2d-01", ARRAYOFCONST((UpDown1->Position,(srch_mes->ItemIndex+2))) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
where = " WHERE fecha>='"+desde+"' AND fecha<'"+hasta+"' AND agente="+agente;
|
||||||
|
orderBy = " ORDER BY fecha ASC";
|
||||||
|
|
||||||
|
query = "SELECT id,agente,fecha,nombre,numPoliza,primaNeta,comision,puntos";
|
||||||
|
query+=" FROM cuentaPolizas";
|
||||||
|
query+=where;
|
||||||
|
query+=orderBy;
|
||||||
|
|
||||||
|
zqCuentaPolizas->SQL->Clear();
|
||||||
|
zqCuentaPolizas->SQL->Add(query);
|
||||||
|
zqCuentaPolizas->Active = zqCuentaPolizas->Connection->Connected;
|
||||||
|
|
||||||
|
Currency totalPrimaNeta, totalComision, totalPuntos;
|
||||||
|
totalPrimaNeta=0; totalComision=0; totalPuntos=0;
|
||||||
|
zqCuentaPolizas->First();
|
||||||
|
while(!zqCuentaPolizas->Eof){
|
||||||
|
totalPrimaNeta+=zqCuentaPolizas->FieldByName("primaNeta")->AsCurrency;
|
||||||
|
totalComision+=zqCuentaPolizas->FieldByName("comision")->AsCurrency;
|
||||||
|
totalPuntos+=zqCuentaPolizas->FieldByName("puntos")->AsCurrency;
|
||||||
|
zqCuentaPolizas->Next();
|
||||||
|
}
|
||||||
|
|
||||||
|
lbTotalPolizas->Caption = zqCuentaPolizas->RecordCount;
|
||||||
|
lbTotalPrimaNeta->Caption = AnsiString(totalPrimaNeta);
|
||||||
|
lbTotalComision->Caption = AnsiString(totalComision);
|
||||||
|
lbTotalPuntos->Caption = AnsiString(totalPuntos);
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionCuentaPolizas::SpeedButton1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( srch_mes->ItemIndex==0 ) {
|
||||||
|
srch_mes->ItemIndex=11;
|
||||||
|
UpDown1->Position--;
|
||||||
|
} else
|
||||||
|
srch_mes->ItemIndex--;
|
||||||
|
execFilter(NULL);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionCuentaPolizas::SpeedButton2Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( srch_mes->ItemIndex==11 ) {
|
||||||
|
srch_mes->ItemIndex=0;
|
||||||
|
UpDown1->Position++;
|
||||||
|
} else
|
||||||
|
srch_mes->ItemIndex++;
|
||||||
|
execFilter(NULL);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionCuentaPolizas::BitBtn2Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TimprCuentaPolizas *i;
|
||||||
|
i = new TimprCuentaPolizas(this);
|
||||||
|
i->qrlbFecha->Caption = AnsiString(UpDown1->Position)+" - "+srch_mes->Items->Strings[srch_mes->ItemIndex];
|
||||||
|
i->qrlbAgente->Caption = srch_agentes->Items->Strings[srch_agentes->ItemIndex];
|
||||||
|
i->QuickRep1->DataSet = zqCuentaPolizas;
|
||||||
|
i->QuickRep1->Preview();
|
||||||
|
delete i;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
BIN
src/cuentaPolizas.ddp
Normal file
BIN
src/cuentaPolizas.ddp
Normal file
Binary file not shown.
362
src/cuentaPolizas.dfm
Normal file
362
src/cuentaPolizas.dfm
Normal file
@ -0,0 +1,362 @@
|
|||||||
|
object gestionCuentaPolizas: TgestionCuentaPolizas
|
||||||
|
Left = 118
|
||||||
|
Top = 122
|
||||||
|
Width = 800
|
||||||
|
Height = 600
|
||||||
|
Caption = 'Cuenta Polizas'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
Scaled = False
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 16
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 792
|
||||||
|
Height = 41
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 0
|
||||||
|
object SpeedButton1: TSpeedButton
|
||||||
|
Left = 568
|
||||||
|
Top = 8
|
||||||
|
Width = 23
|
||||||
|
Height = 22
|
||||||
|
Caption = '<'
|
||||||
|
OnClick = SpeedButton1Click
|
||||||
|
end
|
||||||
|
object SpeedButton2: TSpeedButton
|
||||||
|
Left = 592
|
||||||
|
Top = 8
|
||||||
|
Width = 23
|
||||||
|
Height = 22
|
||||||
|
Caption = '>'
|
||||||
|
OnClick = SpeedButton2Click
|
||||||
|
end
|
||||||
|
object BitBtn1: TBitBtn
|
||||||
|
Left = 456
|
||||||
|
Top = 8
|
||||||
|
Width = 107
|
||||||
|
Height = 24
|
||||||
|
Caption = '&Filtrar'
|
||||||
|
Default = True
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = execFilter
|
||||||
|
Glyph.Data = {
|
||||||
|
42020000424D4202000000000000420000002800000010000000100000000100
|
||||||
|
10000300000000020000120B0000120B00000000000000000000007C0000E003
|
||||||
|
00001F000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
|
||||||
|
FF7FFF7FFF7FFF7FFF7FFF7FFF7FBB6FF14A2722E415C4150722D14ABB6FFF7F
|
||||||
|
FF7FFF7FFF7FFF7FFF7FFF7F565B261A682A304F53575357104B4726E619365B
|
||||||
|
FF7FFF7FFF7FFF7FFF7F765F2416ED42745B304BEC3EEC3E304B545BCC3EC415
|
||||||
|
365BFF7FFF7FFF7FBB7386220E43745BEC3AEB3ACB3ACB36CB36CB3A545BCD3E
|
||||||
|
E619BB6FFF7FFF7F524FA932755BEC3EEC3A0E43BA6B314FCA36CB36CB3A745B
|
||||||
|
6826F14AFF7FFF7FC82E524F514F0C3B0F43DD7BFF7FFF7F304BCB36CB3A304B
|
||||||
|
104F2722FF7FFF7FA52674572E3F2E43DD77FF7FDD77FF7FFF7F314BCB3AED3E
|
||||||
|
5357E415FF7FFF7FC62A745B2E430C3B755BBA6BEC3A965FFF7FFF7F314FED3E
|
||||||
|
54570416FF7FFF7F09375253524F0D3B0C370C370C370C37965FFF7FDC73314F
|
||||||
|
314F6722FF7FFF7F7357EB3A755B2D3F0D3B0C3B0C370C370C3B965F0D3F755B
|
||||||
|
A92E114BFF7FFF7FDC7309332F4B755B2D3F2D3B0D3B0D3B0D3B0D3F755B0E47
|
||||||
|
8622BB73FF7FFF7FFF7FB767072F2F4B755B524F2E432E43524F755B0F47851E
|
||||||
|
765FFF7FFF7FFF7FFF7FFF7FB76709370B3B5253745774575253CA36C62A965F
|
||||||
|
FF7FFF7FFF7FFF7FFF7FFF7FFF7FDC7393572A3BE72EE72E09377257DB73FF7F
|
||||||
|
FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
|
||||||
|
FF7FFF7FFF7F}
|
||||||
|
end
|
||||||
|
object srch_agentes: TComboBox
|
||||||
|
Left = 232
|
||||||
|
Top = 8
|
||||||
|
Width = 217
|
||||||
|
Height = 24
|
||||||
|
ItemHeight = 16
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object srch_mes: TComboBox
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 145
|
||||||
|
Height = 24
|
||||||
|
ItemHeight = 16
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 2
|
||||||
|
Text = 'Enero'
|
||||||
|
Items.Strings = (
|
||||||
|
'Enero'
|
||||||
|
'Febrero'
|
||||||
|
'Marzo'
|
||||||
|
'Abril'
|
||||||
|
'Mayo'
|
||||||
|
'Junio'
|
||||||
|
'Julio'
|
||||||
|
'Agosto'
|
||||||
|
'Septiembre'
|
||||||
|
'Octubre'
|
||||||
|
'Noviembre'
|
||||||
|
'Diciembre')
|
||||||
|
end
|
||||||
|
object srch_ano: TEdit
|
||||||
|
Left = 160
|
||||||
|
Top = 8
|
||||||
|
Width = 49
|
||||||
|
Height = 24
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 3
|
||||||
|
Text = '2.010'
|
||||||
|
end
|
||||||
|
object UpDown1: TUpDown
|
||||||
|
Left = 209
|
||||||
|
Top = 8
|
||||||
|
Width = 15
|
||||||
|
Height = 24
|
||||||
|
Associate = srch_ano
|
||||||
|
Min = 1900
|
||||||
|
Max = 2100
|
||||||
|
Position = 2010
|
||||||
|
TabOrder = 4
|
||||||
|
Wrap = False
|
||||||
|
end
|
||||||
|
object BitBtn2: TBitBtn
|
||||||
|
Left = 656
|
||||||
|
Top = 8
|
||||||
|
Width = 107
|
||||||
|
Height = 24
|
||||||
|
Caption = '&Imprimir'
|
||||||
|
Default = True
|
||||||
|
TabOrder = 5
|
||||||
|
OnClick = BitBtn2Click
|
||||||
|
Glyph.Data = {
|
||||||
|
36030000424D3603000000000000360000002800000010000000100000000100
|
||||||
|
1800000000000003000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000007A7A7A696969000000696969A1A1A10000000000000000
|
||||||
|
000000000000000000000000000000000000001E1E1E8C8C8C8C8C8CB2B2B287
|
||||||
|
8787785757B59797A1A1A1A1A1A1A1A1A1000000000000000000000000000000
|
||||||
|
8C8C8C8C8C8CF0F0F0E7E7E7A9A9A99F9F9F3A34344B4B4B6E6E6EB7B7B7C2C2
|
||||||
|
C2A1A1A1A1A1A10000000000008C8C8CFEFEFEF0F0F0E7E7E7DADADAA0A0A096
|
||||||
|
96968383836363635757576E6E6E969696B1B1B17575750000000000008C8C8C
|
||||||
|
F0F0F0DDDDDDA1A1A18181816E6E6E6C6C6C767676939393A9A9A99A9A9A6868
|
||||||
|
687575750000000000000000008C8C8C9696968C8C8CBCBCBCC4C4C4CBCBCB9D
|
||||||
|
9D9D959595767676747474747474879D8E7575750000000000000000008C8C8C
|
||||||
|
D1D1D1CFCFCFC4C4C4CECECE9D9D9DA1A1A1A1A1A1CCCCCCC2C2C2B5B5B58E8E
|
||||||
|
8E7575750000000000000000008C8C8CD0D0D0C4C4C4C7C7C79D9D9DDADADAEA
|
||||||
|
EAEADADADAA1A1A1A1A1A1A1A1A1B4B4B4757575000000000000000000CECECE
|
||||||
|
9D9D9D9D9D9D9D9D9DBDBDBDD5D5D5E6E6E6EAEAEAE7E7E7E1E1E1DEDEDEA1A1
|
||||||
|
A1B1B1B1000000000000000000000000000000D3D3D3D1936DB0B0B0B0B0B0B0
|
||||||
|
B0B0B0B0B0B0B0B0C1C1C1A3A3A39C9C9C000000000000000000000000000000
|
||||||
|
0000009F8181D1936DFFCA98FFDAB6FFE0C2F2D9C1D1936D8787870000000000
|
||||||
|
00000000000000000000000000000000000000D1936DFFD5AFFFD5AFFFD5AFFF
|
||||||
|
D5AFFFD5AFD1936D000000000000000000000000000000000000000000000000
|
||||||
|
000000D1936DFFE1C5FFE1C5FFE1C5FFE1C5FFE1C5D1936D0000000000000000
|
||||||
|
00000000000000000000000000000000814B4BD1936DFFEEDDFFEEDDFFEEDDFF
|
||||||
|
EEDDFFEEDDD1936D000000000000000000000000000000000000000000000000
|
||||||
|
D1936DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD1936D0000000000000000000000
|
||||||
|
00000000000000000000000000814B4BD1936DD1936DD1936DD1936DD1936DD1
|
||||||
|
936DA98181000000000000000000000000000000000000000000}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DBGrid1: TDBGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 41
|
||||||
|
Width = 792
|
||||||
|
Height = 463
|
||||||
|
Align = alClient
|
||||||
|
DataSource = dsCuentaPolizas
|
||||||
|
TabOrder = 1
|
||||||
|
TitleFont.Charset = DEFAULT_CHARSET
|
||||||
|
TitleFont.Color = clWindowText
|
||||||
|
TitleFont.Height = -13
|
||||||
|
TitleFont.Name = 'Tahoma'
|
||||||
|
TitleFont.Style = []
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'fecha'
|
||||||
|
Title.Caption = 'Fecha'
|
||||||
|
Width = 89
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'nombre'
|
||||||
|
Title.Caption = 'Nombre'
|
||||||
|
Width = 261
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'numPoliza'
|
||||||
|
Title.Caption = 'Num. Poliza'
|
||||||
|
Width = 129
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'primaNeta'
|
||||||
|
Title.Caption = 'Prima Neta'
|
||||||
|
Width = 90
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'comision'
|
||||||
|
Title.Caption = 'Comision'
|
||||||
|
Width = 90
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'puntos'
|
||||||
|
Title.Caption = 'Puntos'
|
||||||
|
Width = 90
|
||||||
|
Visible = True
|
||||||
|
end>
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 504
|
||||||
|
Width = 792
|
||||||
|
Height = 66
|
||||||
|
Align = alBottom
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 376
|
||||||
|
Top = 8
|
||||||
|
Width = 80
|
||||||
|
Height = 16
|
||||||
|
Caption = 'Total Polizas'
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 504
|
||||||
|
Top = 8
|
||||||
|
Width = 79
|
||||||
|
Height = 16
|
||||||
|
Caption = 'T. Pima Neta'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 592
|
||||||
|
Top = 8
|
||||||
|
Width = 71
|
||||||
|
Height = 16
|
||||||
|
Caption = 'T. Comisi'#243'n'
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 688
|
||||||
|
Top = 8
|
||||||
|
Width = 60
|
||||||
|
Height = 16
|
||||||
|
Caption = 'T. Puntos'
|
||||||
|
end
|
||||||
|
object lbTotalPolizas: TLabel
|
||||||
|
Left = 376
|
||||||
|
Top = 32
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = 'lbTotalPolizas'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object lbTotalPrimaNeta: TLabel
|
||||||
|
Left = 504
|
||||||
|
Top = 32
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = 'lbTotalPolizas'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object lbTotalComision: TLabel
|
||||||
|
Left = 584
|
||||||
|
Top = 32
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = 'lbTotalPolizas'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object lbTotalPuntos: TLabel
|
||||||
|
Left = 672
|
||||||
|
Top = 32
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = 'lbTotalPolizas'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object zqCuentaPolizas: TZQuery
|
||||||
|
Connection = gestionClientes.ZConnection1
|
||||||
|
OnNewRecord = zqCuentaPolizasNewRecord
|
||||||
|
SQL.Strings = (
|
||||||
|
|
||||||
|
'SELECT id,agente,fecha,nombre,numPoliza,primaNeta,comision,punto' +
|
||||||
|
's'
|
||||||
|
' FROM cuentaPolizas')
|
||||||
|
Params = <>
|
||||||
|
Left = 216
|
||||||
|
Top = 448
|
||||||
|
object zqCuentaPolizasid: TIntegerField
|
||||||
|
AutoGenerateValue = arAutoInc
|
||||||
|
FieldName = 'id'
|
||||||
|
end
|
||||||
|
object zqCuentaPolizasagente: TIntegerField
|
||||||
|
FieldName = 'agente'
|
||||||
|
end
|
||||||
|
object zqCuentaPolizasfecha: TDateField
|
||||||
|
FieldName = 'fecha'
|
||||||
|
end
|
||||||
|
object zqCuentaPolizasnombre: TStringField
|
||||||
|
FieldName = 'nombre'
|
||||||
|
Size = 45
|
||||||
|
end
|
||||||
|
object zqCuentaPolizasnumPoliza: TStringField
|
||||||
|
FieldName = 'numPoliza'
|
||||||
|
Size = 45
|
||||||
|
end
|
||||||
|
object zqCuentaPolizasprimaNeta: TFloatField
|
||||||
|
FieldName = 'primaNeta'
|
||||||
|
end
|
||||||
|
object zqCuentaPolizascomision: TFloatField
|
||||||
|
FieldName = 'comision'
|
||||||
|
end
|
||||||
|
object zqCuentaPolizaspuntos: TFloatField
|
||||||
|
FieldName = 'puntos'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object dsCuentaPolizas: TDataSource
|
||||||
|
DataSet = zqCuentaPolizas
|
||||||
|
Left = 216
|
||||||
|
Top = 416
|
||||||
|
end
|
||||||
|
end
|
64
src/cuentaPolizas.h
Normal file
64
src/cuentaPolizas.h
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef cuentaPolizasH
|
||||||
|
#define cuentaPolizasH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include "ZAbstractDataset.hpp"
|
||||||
|
#include "ZAbstractRODataset.hpp"
|
||||||
|
#include "ZDataset.hpp"
|
||||||
|
#include <Buttons.hpp>
|
||||||
|
#include <ComCtrls.hpp>
|
||||||
|
#include <DB.hpp>
|
||||||
|
#include <DBGrids.hpp>
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <Grids.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TgestionCuentaPolizas : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TPanel *Panel1;
|
||||||
|
TBitBtn *BitBtn1;
|
||||||
|
TComboBox *srch_agentes;
|
||||||
|
TDBGrid *DBGrid1;
|
||||||
|
TComboBox *srch_mes;
|
||||||
|
TEdit *srch_ano;
|
||||||
|
TUpDown *UpDown1;
|
||||||
|
TZQuery *zqCuentaPolizas;
|
||||||
|
TPanel *Panel2;
|
||||||
|
TDataSource *dsCuentaPolizas;
|
||||||
|
TIntegerField *zqCuentaPolizasid;
|
||||||
|
TIntegerField *zqCuentaPolizasagente;
|
||||||
|
TDateField *zqCuentaPolizasfecha;
|
||||||
|
TStringField *zqCuentaPolizasnombre;
|
||||||
|
TStringField *zqCuentaPolizasnumPoliza;
|
||||||
|
TFloatField *zqCuentaPolizasprimaNeta;
|
||||||
|
TFloatField *zqCuentaPolizascomision;
|
||||||
|
TFloatField *zqCuentaPolizaspuntos;
|
||||||
|
TSpeedButton *SpeedButton1;
|
||||||
|
TSpeedButton *SpeedButton2;
|
||||||
|
TBitBtn *BitBtn2;
|
||||||
|
TLabel *Label1;
|
||||||
|
TLabel *Label2;
|
||||||
|
TLabel *Label3;
|
||||||
|
TLabel *Label4;
|
||||||
|
TLabel *lbTotalPolizas;
|
||||||
|
TLabel *lbTotalPrimaNeta;
|
||||||
|
TLabel *lbTotalComision;
|
||||||
|
TLabel *lbTotalPuntos;
|
||||||
|
void __fastcall zqCuentaPolizasNewRecord(TDataSet *DataSet);
|
||||||
|
void __fastcall execFilter(TObject *Sender);
|
||||||
|
void __fastcall SpeedButton1Click(TObject *Sender);
|
||||||
|
void __fastcall SpeedButton2Click(TObject *Sender);
|
||||||
|
void __fastcall BitBtn2Click(TObject *Sender);
|
||||||
|
private: // User declarations
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TgestionCuentaPolizas(TComponent* Owner);
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TgestionCuentaPolizas *gestionCuentaPolizas;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
132
src/cuentaPolizas.~cpp
Normal file
132
src/cuentaPolizas.~cpp
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "cuentaPolizas.h"
|
||||||
|
#include "clientes.h"
|
||||||
|
#include "imprimirCuentaPolizas.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "ZAbstractDataset"
|
||||||
|
#pragma link "ZAbstractRODataset"
|
||||||
|
#pragma link "ZDataset"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TgestionCuentaPolizas *gestionCuentaPolizas;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TgestionCuentaPolizas::TgestionCuentaPolizas(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
// Cargamos el listado de agentes disponibles
|
||||||
|
TZQuery *zquery;
|
||||||
|
zquery = new TZQuery(this);
|
||||||
|
zquery->Connection = gestionClientes->ZConnection1;
|
||||||
|
zquery->SQL->Clear();
|
||||||
|
zquery->SQL->Add("SELECT id,nombre FROM agentes ORDER BY nombre");
|
||||||
|
zquery->Active=zquery->Connection->Connected;
|
||||||
|
|
||||||
|
srch_agentes->Items->Clear();
|
||||||
|
while(!zquery->Eof)
|
||||||
|
{
|
||||||
|
srch_agentes->Items->AddObject(zquery->FieldByName("nombre")->AsString,(TObject *)(zquery->FieldByName("id")->AsInteger));
|
||||||
|
zquery->Next();
|
||||||
|
}
|
||||||
|
srch_agentes->ItemIndex = 0;
|
||||||
|
|
||||||
|
unsigned short yyyy,mm,dd;
|
||||||
|
TDateTime::CurrentDate().DecodeDate(&yyyy,&mm,&dd);
|
||||||
|
srch_mes->ItemIndex = mm-1;
|
||||||
|
UpDown1->Position = yyyy;
|
||||||
|
|
||||||
|
execFilter(NULL);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionCuentaPolizas::zqCuentaPolizasNewRecord(
|
||||||
|
TDataSet *DataSet)
|
||||||
|
{
|
||||||
|
AnsiString fecha;
|
||||||
|
fecha = "1/"+AnsiString(srch_mes->ItemIndex+1)+"/"+AnsiString(UpDown1->Position);
|
||||||
|
zqCuentaPolizas->FieldByName("fecha")->AsDateTime = TDateTime::TDateTime(fecha);
|
||||||
|
|
||||||
|
int agente;
|
||||||
|
agente = (int)srch_agentes->Items->Objects[srch_agentes->ItemIndex];
|
||||||
|
zqCuentaPolizas->FieldByName("agente")->AsInteger = agente;
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionCuentaPolizas::execFilter(TObject *Sender)
|
||||||
|
{
|
||||||
|
int agente;
|
||||||
|
agente = (int)srch_agentes->Items->Objects[srch_agentes->ItemIndex];
|
||||||
|
|
||||||
|
AnsiString where,orderBy,query;
|
||||||
|
|
||||||
|
AnsiString desde, hasta;
|
||||||
|
desde = Format("%.4d-%.2d-01", ARRAYOFCONST((UpDown1->Position,(srch_mes->ItemIndex+1))) );
|
||||||
|
if ( srch_mes->ItemIndex==11 )
|
||||||
|
hasta = Format("%.4d-01-01", ARRAYOFCONST((UpDown1->Position+1)) );
|
||||||
|
else
|
||||||
|
hasta = Format("%.4d-%.2d-01", ARRAYOFCONST((UpDown1->Position,(srch_mes->ItemIndex+2))) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
where = " WHERE fecha>='"+desde+"' AND fecha<'"+hasta+"' AND agente="+agente;
|
||||||
|
orderBy = " ORDER BY fecha ASC";
|
||||||
|
|
||||||
|
query = "SELECT id,agente,fecha,nombre,numPoliza,primaNeta,comision,puntos";
|
||||||
|
query+=" FROM cuentaPolizas";
|
||||||
|
query+=where;
|
||||||
|
query+=orderBy;
|
||||||
|
|
||||||
|
zqCuentaPolizas->SQL->Clear();
|
||||||
|
zqCuentaPolizas->SQL->Add(query);
|
||||||
|
zqCuentaPolizas->Active = zqCuentaPolizas->Connection->Connected;
|
||||||
|
|
||||||
|
Currency totalPrimaNeta, totalComision, totalPuntos;
|
||||||
|
totalPrimaNeta=0; totalComision=0; totalPuntos=0;
|
||||||
|
zqCuentaPolizas->First();
|
||||||
|
while(!zqCuentaPolizas->Eof){
|
||||||
|
totalPrimaNeta+=zqCuentaPolizas->FieldByName("primaNeta")->AsCurrency;
|
||||||
|
totalComision+=zqCuentaPolizas->FieldByName("comision")->AsCurrency;
|
||||||
|
totalPuntos+=zqCuentaPolizas->FieldByName("puntos")->AsCurrency;
|
||||||
|
zqCuentaPolizas->Next();
|
||||||
|
}
|
||||||
|
|
||||||
|
lbTotalPolizas->Caption = zqCuentaPolizas->RecordCount;
|
||||||
|
lbTotalPrimaNeta->Caption = AnsiString(totalPrimaNeta);
|
||||||
|
lbTotalComision->Caption = AnsiString(totalComision);
|
||||||
|
lbTotalPuntos->Caption = AnsiString(totalPuntos);
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionCuentaPolizas::SpeedButton1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( srch_mes->ItemIndex==0 ) {
|
||||||
|
srch_mes->ItemIndex=11;
|
||||||
|
UpDown1->Position--;
|
||||||
|
} else
|
||||||
|
srch_mes->ItemIndex--;
|
||||||
|
execFilter(NULL);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionCuentaPolizas::SpeedButton2Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
if ( srch_mes->ItemIndex==11 ) {
|
||||||
|
srch_mes->ItemIndex=0;
|
||||||
|
UpDown1->Position++;
|
||||||
|
} else
|
||||||
|
srch_mes->ItemIndex++;
|
||||||
|
execFilter(NULL);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TgestionCuentaPolizas::BitBtn2Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TimprCuentaPolizas *i;
|
||||||
|
i = new TimprCuentaPolizas(this);
|
||||||
|
i->qrlbFecha->Caption = AnsiString(UpDown1->Position)+" - "+srch_mes->Items->Strings[srch_mes->ItemIndex];
|
||||||
|
i->qrlbAgente->Caption = srch_agentes->Items->Strings[srch_agentes->ItemIndex];
|
||||||
|
i->QuickRep1->DataSet = zqCuentaPolizas;
|
||||||
|
i->QuickRep1->Preview();
|
||||||
|
delete i;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
BIN
src/cuentaPolizas.~ddp
Normal file
BIN
src/cuentaPolizas.~ddp
Normal file
Binary file not shown.
362
src/cuentaPolizas.~dfm
Normal file
362
src/cuentaPolizas.~dfm
Normal file
@ -0,0 +1,362 @@
|
|||||||
|
object gestionCuentaPolizas: TgestionCuentaPolizas
|
||||||
|
Left = 118
|
||||||
|
Top = 122
|
||||||
|
Width = 800
|
||||||
|
Height = 600
|
||||||
|
Caption = 'Cuenta Polizas'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
Scaled = False
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 16
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 792
|
||||||
|
Height = 41
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 0
|
||||||
|
object SpeedButton1: TSpeedButton
|
||||||
|
Left = 568
|
||||||
|
Top = 8
|
||||||
|
Width = 23
|
||||||
|
Height = 22
|
||||||
|
Caption = '<'
|
||||||
|
OnClick = SpeedButton1Click
|
||||||
|
end
|
||||||
|
object SpeedButton2: TSpeedButton
|
||||||
|
Left = 592
|
||||||
|
Top = 8
|
||||||
|
Width = 23
|
||||||
|
Height = 22
|
||||||
|
Caption = '>'
|
||||||
|
OnClick = SpeedButton2Click
|
||||||
|
end
|
||||||
|
object BitBtn1: TBitBtn
|
||||||
|
Left = 456
|
||||||
|
Top = 8
|
||||||
|
Width = 107
|
||||||
|
Height = 24
|
||||||
|
Caption = '&Filtrar'
|
||||||
|
Default = True
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = execFilter
|
||||||
|
Glyph.Data = {
|
||||||
|
42020000424D4202000000000000420000002800000010000000100000000100
|
||||||
|
10000300000000020000120B0000120B00000000000000000000007C0000E003
|
||||||
|
00001F000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
|
||||||
|
FF7FFF7FFF7FFF7FFF7FFF7FFF7FBB6FF14A2722E415C4150722D14ABB6FFF7F
|
||||||
|
FF7FFF7FFF7FFF7FFF7FFF7F565B261A682A304F53575357104B4726E619365B
|
||||||
|
FF7FFF7FFF7FFF7FFF7F765F2416ED42745B304BEC3EEC3E304B545BCC3EC415
|
||||||
|
365BFF7FFF7FFF7FBB7386220E43745BEC3AEB3ACB3ACB36CB36CB3A545BCD3E
|
||||||
|
E619BB6FFF7FFF7F524FA932755BEC3EEC3A0E43BA6B314FCA36CB36CB3A745B
|
||||||
|
6826F14AFF7FFF7FC82E524F514F0C3B0F43DD7BFF7FFF7F304BCB36CB3A304B
|
||||||
|
104F2722FF7FFF7FA52674572E3F2E43DD77FF7FDD77FF7FFF7F314BCB3AED3E
|
||||||
|
5357E415FF7FFF7FC62A745B2E430C3B755BBA6BEC3A965FFF7FFF7F314FED3E
|
||||||
|
54570416FF7FFF7F09375253524F0D3B0C370C370C370C37965FFF7FDC73314F
|
||||||
|
314F6722FF7FFF7F7357EB3A755B2D3F0D3B0C3B0C370C370C3B965F0D3F755B
|
||||||
|
A92E114BFF7FFF7FDC7309332F4B755B2D3F2D3B0D3B0D3B0D3B0D3F755B0E47
|
||||||
|
8622BB73FF7FFF7FFF7FB767072F2F4B755B524F2E432E43524F755B0F47851E
|
||||||
|
765FFF7FFF7FFF7FFF7FFF7FB76709370B3B5253745774575253CA36C62A965F
|
||||||
|
FF7FFF7FFF7FFF7FFF7FFF7FFF7FDC7393572A3BE72EE72E09377257DB73FF7F
|
||||||
|
FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
|
||||||
|
FF7FFF7FFF7F}
|
||||||
|
end
|
||||||
|
object srch_agentes: TComboBox
|
||||||
|
Left = 232
|
||||||
|
Top = 8
|
||||||
|
Width = 217
|
||||||
|
Height = 24
|
||||||
|
ItemHeight = 16
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object srch_mes: TComboBox
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 145
|
||||||
|
Height = 24
|
||||||
|
ItemHeight = 16
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 2
|
||||||
|
Text = 'Enero'
|
||||||
|
Items.Strings = (
|
||||||
|
'Enero'
|
||||||
|
'Febrero'
|
||||||
|
'Marzo'
|
||||||
|
'Abril'
|
||||||
|
'Mayo'
|
||||||
|
'Junio'
|
||||||
|
'Julio'
|
||||||
|
'Agosto'
|
||||||
|
'Septiembre'
|
||||||
|
'Octubre'
|
||||||
|
'Noviembre'
|
||||||
|
'Diciembre')
|
||||||
|
end
|
||||||
|
object srch_ano: TEdit
|
||||||
|
Left = 160
|
||||||
|
Top = 8
|
||||||
|
Width = 49
|
||||||
|
Height = 24
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 3
|
||||||
|
Text = '2.010'
|
||||||
|
end
|
||||||
|
object UpDown1: TUpDown
|
||||||
|
Left = 209
|
||||||
|
Top = 8
|
||||||
|
Width = 15
|
||||||
|
Height = 24
|
||||||
|
Associate = srch_ano
|
||||||
|
Min = 1900
|
||||||
|
Max = 2100
|
||||||
|
Position = 2010
|
||||||
|
TabOrder = 4
|
||||||
|
Wrap = False
|
||||||
|
end
|
||||||
|
object BitBtn2: TBitBtn
|
||||||
|
Left = 656
|
||||||
|
Top = 8
|
||||||
|
Width = 107
|
||||||
|
Height = 24
|
||||||
|
Caption = '&Imprimir'
|
||||||
|
Default = True
|
||||||
|
TabOrder = 5
|
||||||
|
OnClick = BitBtn2Click
|
||||||
|
Glyph.Data = {
|
||||||
|
36030000424D3603000000000000360000002800000010000000100000000100
|
||||||
|
1800000000000003000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000007A7A7A696969000000696969A1A1A10000000000000000
|
||||||
|
000000000000000000000000000000000000001E1E1E8C8C8C8C8C8CB2B2B287
|
||||||
|
8787785757B59797A1A1A1A1A1A1A1A1A1000000000000000000000000000000
|
||||||
|
8C8C8C8C8C8CF0F0F0E7E7E7A9A9A99F9F9F3A34344B4B4B6E6E6EB7B7B7C2C2
|
||||||
|
C2A1A1A1A1A1A10000000000008C8C8CFEFEFEF0F0F0E7E7E7DADADAA0A0A096
|
||||||
|
96968383836363635757576E6E6E969696B1B1B17575750000000000008C8C8C
|
||||||
|
F0F0F0DDDDDDA1A1A18181816E6E6E6C6C6C767676939393A9A9A99A9A9A6868
|
||||||
|
687575750000000000000000008C8C8C9696968C8C8CBCBCBCC4C4C4CBCBCB9D
|
||||||
|
9D9D959595767676747474747474879D8E7575750000000000000000008C8C8C
|
||||||
|
D1D1D1CFCFCFC4C4C4CECECE9D9D9DA1A1A1A1A1A1CCCCCCC2C2C2B5B5B58E8E
|
||||||
|
8E7575750000000000000000008C8C8CD0D0D0C4C4C4C7C7C79D9D9DDADADAEA
|
||||||
|
EAEADADADAA1A1A1A1A1A1A1A1A1B4B4B4757575000000000000000000CECECE
|
||||||
|
9D9D9D9D9D9D9D9D9DBDBDBDD5D5D5E6E6E6EAEAEAE7E7E7E1E1E1DEDEDEA1A1
|
||||||
|
A1B1B1B1000000000000000000000000000000D3D3D3D1936DB0B0B0B0B0B0B0
|
||||||
|
B0B0B0B0B0B0B0B0C1C1C1A3A3A39C9C9C000000000000000000000000000000
|
||||||
|
0000009F8181D1936DFFCA98FFDAB6FFE0C2F2D9C1D1936D8787870000000000
|
||||||
|
00000000000000000000000000000000000000D1936DFFD5AFFFD5AFFFD5AFFF
|
||||||
|
D5AFFFD5AFD1936D000000000000000000000000000000000000000000000000
|
||||||
|
000000D1936DFFE1C5FFE1C5FFE1C5FFE1C5FFE1C5D1936D0000000000000000
|
||||||
|
00000000000000000000000000000000814B4BD1936DFFEEDDFFEEDDFFEEDDFF
|
||||||
|
EEDDFFEEDDD1936D000000000000000000000000000000000000000000000000
|
||||||
|
D1936DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD1936D0000000000000000000000
|
||||||
|
00000000000000000000000000814B4BD1936DD1936DD1936DD1936DD1936DD1
|
||||||
|
936DA98181000000000000000000000000000000000000000000}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DBGrid1: TDBGrid
|
||||||
|
Left = 0
|
||||||
|
Top = 41
|
||||||
|
Width = 792
|
||||||
|
Height = 463
|
||||||
|
Align = alClient
|
||||||
|
DataSource = dsCuentaPolizas
|
||||||
|
TabOrder = 1
|
||||||
|
TitleFont.Charset = DEFAULT_CHARSET
|
||||||
|
TitleFont.Color = clWindowText
|
||||||
|
TitleFont.Height = -13
|
||||||
|
TitleFont.Name = 'Tahoma'
|
||||||
|
TitleFont.Style = []
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'fecha'
|
||||||
|
Title.Caption = 'Fecha'
|
||||||
|
Width = 89
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'nombre'
|
||||||
|
Title.Caption = 'Nombre'
|
||||||
|
Width = 261
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'numPoliza'
|
||||||
|
Title.Caption = 'Num. Poliza'
|
||||||
|
Width = 129
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'primaNeta'
|
||||||
|
Title.Caption = 'Prima Neta'
|
||||||
|
Width = 90
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'comision'
|
||||||
|
Title.Caption = 'Comision'
|
||||||
|
Width = 90
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Expanded = False
|
||||||
|
FieldName = 'puntos'
|
||||||
|
Title.Caption = 'Puntos'
|
||||||
|
Width = 90
|
||||||
|
Visible = True
|
||||||
|
end>
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 504
|
||||||
|
Width = 792
|
||||||
|
Height = 66
|
||||||
|
Align = alBottom
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 2
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 376
|
||||||
|
Top = 8
|
||||||
|
Width = 80
|
||||||
|
Height = 16
|
||||||
|
Caption = 'Total Polizas'
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 504
|
||||||
|
Top = 8
|
||||||
|
Width = 79
|
||||||
|
Height = 16
|
||||||
|
Caption = 'T. Pima Neta'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 592
|
||||||
|
Top = 8
|
||||||
|
Width = 71
|
||||||
|
Height = 16
|
||||||
|
Caption = 'T. Comisi'#243'n'
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 688
|
||||||
|
Top = 8
|
||||||
|
Width = 60
|
||||||
|
Height = 16
|
||||||
|
Caption = 'T. Puntos'
|
||||||
|
end
|
||||||
|
object lbTotalPolizas: TLabel
|
||||||
|
Left = 376
|
||||||
|
Top = 32
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = 'lbTotalPolizas'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object lbTotalPrimaNeta: TLabel
|
||||||
|
Left = 504
|
||||||
|
Top = 32
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = 'lbTotalPolizas'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object lbTotalComision: TLabel
|
||||||
|
Left = 584
|
||||||
|
Top = 32
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = 'lbTotalPolizas'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object lbTotalPuntos: TLabel
|
||||||
|
Left = 672
|
||||||
|
Top = 32
|
||||||
|
Width = 87
|
||||||
|
Height = 16
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = 'lbTotalPolizas'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object zqCuentaPolizas: TZQuery
|
||||||
|
Connection = gestionClientes.ZConnection1
|
||||||
|
OnNewRecord = zqCuentaPolizasNewRecord
|
||||||
|
SQL.Strings = (
|
||||||
|
|
||||||
|
'SELECT id,agente,fecha,nombre,numPoliza,primaNeta,comision,punto' +
|
||||||
|
's'
|
||||||
|
' FROM cuentaPolizas')
|
||||||
|
Params = <>
|
||||||
|
Left = 216
|
||||||
|
Top = 448
|
||||||
|
object zqCuentaPolizasid: TIntegerField
|
||||||
|
AutoGenerateValue = arAutoInc
|
||||||
|
FieldName = 'id'
|
||||||
|
end
|
||||||
|
object zqCuentaPolizasagente: TIntegerField
|
||||||
|
FieldName = 'agente'
|
||||||
|
end
|
||||||
|
object zqCuentaPolizasfecha: TDateField
|
||||||
|
FieldName = 'fecha'
|
||||||
|
end
|
||||||
|
object zqCuentaPolizasnombre: TStringField
|
||||||
|
FieldName = 'nombre'
|
||||||
|
Size = 45
|
||||||
|
end
|
||||||
|
object zqCuentaPolizasnumPoliza: TStringField
|
||||||
|
FieldName = 'numPoliza'
|
||||||
|
Size = 45
|
||||||
|
end
|
||||||
|
object zqCuentaPolizasprimaNeta: TFloatField
|
||||||
|
FieldName = 'primaNeta'
|
||||||
|
end
|
||||||
|
object zqCuentaPolizascomision: TFloatField
|
||||||
|
FieldName = 'comision'
|
||||||
|
end
|
||||||
|
object zqCuentaPolizaspuntos: TFloatField
|
||||||
|
FieldName = 'puntos'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object dsCuentaPolizas: TDataSource
|
||||||
|
DataSet = zqCuentaPolizas
|
||||||
|
Left = 216
|
||||||
|
Top = 416
|
||||||
|
end
|
||||||
|
end
|
64
src/cuentaPolizas.~h
Normal file
64
src/cuentaPolizas.~h
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef cuentaPolizasH
|
||||||
|
#define cuentaPolizasH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include "ZAbstractDataset.hpp"
|
||||||
|
#include "ZAbstractRODataset.hpp"
|
||||||
|
#include "ZDataset.hpp"
|
||||||
|
#include <Buttons.hpp>
|
||||||
|
#include <ComCtrls.hpp>
|
||||||
|
#include <DB.hpp>
|
||||||
|
#include <DBGrids.hpp>
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <Grids.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TgestionCuentaPolizas : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TPanel *Panel1;
|
||||||
|
TBitBtn *BitBtn1;
|
||||||
|
TComboBox *srch_agentes;
|
||||||
|
TDBGrid *DBGrid1;
|
||||||
|
TComboBox *srch_mes;
|
||||||
|
TEdit *srch_ano;
|
||||||
|
TUpDown *UpDown1;
|
||||||
|
TZQuery *zqCuentaPolizas;
|
||||||
|
TPanel *Panel2;
|
||||||
|
TDataSource *dsCuentaPolizas;
|
||||||
|
TIntegerField *zqCuentaPolizasid;
|
||||||
|
TIntegerField *zqCuentaPolizasagente;
|
||||||
|
TDateField *zqCuentaPolizasfecha;
|
||||||
|
TStringField *zqCuentaPolizasnombre;
|
||||||
|
TStringField *zqCuentaPolizasnumPoliza;
|
||||||
|
TFloatField *zqCuentaPolizasprimaNeta;
|
||||||
|
TFloatField *zqCuentaPolizascomision;
|
||||||
|
TFloatField *zqCuentaPolizaspuntos;
|
||||||
|
TSpeedButton *SpeedButton1;
|
||||||
|
TSpeedButton *SpeedButton2;
|
||||||
|
TBitBtn *BitBtn2;
|
||||||
|
TLabel *Label1;
|
||||||
|
TLabel *Label2;
|
||||||
|
TLabel *Label3;
|
||||||
|
TLabel *Label4;
|
||||||
|
TLabel *lbTotalPolizas;
|
||||||
|
TLabel *lbTotalPrimaNeta;
|
||||||
|
TLabel *lbTotalComision;
|
||||||
|
TLabel *lbTotalPuntos;
|
||||||
|
void __fastcall zqCuentaPolizasNewRecord(TDataSet *DataSet);
|
||||||
|
void __fastcall execFilter(TObject *Sender);
|
||||||
|
void __fastcall SpeedButton1Click(TObject *Sender);
|
||||||
|
void __fastcall SpeedButton2Click(TObject *Sender);
|
||||||
|
void __fastcall BitBtn2Click(TObject *Sender);
|
||||||
|
private: // User declarations
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TgestionCuentaPolizas(TComponent* Owner);
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TgestionCuentaPolizas *gestionCuentaPolizas;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
17
src/imprimirClientes.cpp
Normal file
17
src/imprimirClientes.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "imprimirClientes.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "qrpctrls"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TimprimirCarteraClientes *imprimirCarteraClientes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TimprimirCarteraClientes::TimprimirCarteraClientes(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
477
src/imprimirClientes.dfm
Normal file
477
src/imprimirClientes.dfm
Normal file
@ -0,0 +1,477 @@
|
|||||||
|
object imprimirCarteraClientes: TimprimirCarteraClientes
|
||||||
|
Left = 509
|
||||||
|
Top = 348
|
||||||
|
Width = 837
|
||||||
|
Height = 476
|
||||||
|
Caption = 'Imprimir :: Cartera de Clientes'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Scaled = False
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object QuickRep1: TQuickRep
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 794
|
||||||
|
Height = 1123
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = []
|
||||||
|
Functions.Strings = (
|
||||||
|
'PAGENUMBER'
|
||||||
|
'COLUMNNUMBER'
|
||||||
|
'REPORTTITLE')
|
||||||
|
Functions.DATA = (
|
||||||
|
'0'
|
||||||
|
'0'
|
||||||
|
#39#39)
|
||||||
|
Options = [FirstPageHeader, LastPageFooter]
|
||||||
|
Page.Columns = 1
|
||||||
|
Page.Orientation = poPortrait
|
||||||
|
Page.PaperSize = Default
|
||||||
|
Page.Values = (
|
||||||
|
100
|
||||||
|
2970
|
||||||
|
100
|
||||||
|
2100
|
||||||
|
100
|
||||||
|
100
|
||||||
|
0)
|
||||||
|
PrinterSettings.Copies = 1
|
||||||
|
PrinterSettings.OutputBin = Auto
|
||||||
|
PrinterSettings.Duplex = False
|
||||||
|
PrinterSettings.FirstPage = 0
|
||||||
|
PrinterSettings.LastPage = 0
|
||||||
|
PrinterSettings.UseStandardprinter = False
|
||||||
|
PrinterSettings.UseCustomBinCode = False
|
||||||
|
PrinterSettings.CustomBinCode = 0
|
||||||
|
PrinterSettings.ExtendedDuplex = 0
|
||||||
|
PrinterSettings.UseCustomPaperCode = False
|
||||||
|
PrinterSettings.CustomPaperCode = 0
|
||||||
|
PrinterSettings.PrintMetaFile = False
|
||||||
|
PrinterSettings.PrintQuality = 0
|
||||||
|
PrinterSettings.Collate = 0
|
||||||
|
PrinterSettings.ColorOption = 0
|
||||||
|
PrintIfEmpty = True
|
||||||
|
SnapToGrid = True
|
||||||
|
Units = MM
|
||||||
|
Zoom = 100
|
||||||
|
PrevFormStyle = fsNormal
|
||||||
|
PreviewInitialState = wsNormal
|
||||||
|
PrevInitialZoom = qrZoomToFit
|
||||||
|
PreviewDefaultSaveType = stQRP
|
||||||
|
object QRPBand1: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 38
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.833333333333
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbTitle
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRLabel1: TQRLabel
|
||||||
|
Left = 264
|
||||||
|
Top = 8
|
||||||
|
Width = 178
|
||||||
|
Height = 23
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
60.8541666666667
|
||||||
|
698.5
|
||||||
|
21.1666666666667
|
||||||
|
470.958333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Cartera de Clientes'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -19
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 14
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QRPBand2: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 118
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.833333333333
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbDetail
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRExpr1: TQRExpr
|
||||||
|
Left = 35
|
||||||
|
Top = 0
|
||||||
|
Width = 11
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
92.6041666666667
|
||||||
|
0
|
||||||
|
29.1041666666667)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'id'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr2: TQRExpr
|
||||||
|
Left = 56
|
||||||
|
Top = 0
|
||||||
|
Width = 44
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
148.166666666667
|
||||||
|
0
|
||||||
|
116.416666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'nombre'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr3: TQRExpr
|
||||||
|
Left = 600
|
||||||
|
Top = 0
|
||||||
|
Width = 103
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1587.5
|
||||||
|
0
|
||||||
|
272.520833333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'telefono+'#39', '#39'+movil'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr4: TQRExpr
|
||||||
|
Left = 512
|
||||||
|
Top = 0
|
||||||
|
Width = 18
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1354.66666666667
|
||||||
|
0
|
||||||
|
47.625)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'dni'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr5: TQRExpr
|
||||||
|
Left = 56
|
||||||
|
Top = 16
|
||||||
|
Width = 273
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
148.166666666667
|
||||||
|
42.3333333333333
|
||||||
|
722.3125)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clGray
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = []
|
||||||
|
Color = clWhite
|
||||||
|
ParentFont = False
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'calle+'#39', '#39'+poblacion+'#39', CP: '#39'+cp+'#39' ('#39'+provincia+'#39')'#39
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QRPBand3: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 158
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.8
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbPageFooter
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
end
|
||||||
|
object QRPBand4: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 78
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = True
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.833333333333
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbColumnHeader
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRLabel2: TQRLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 16
|
||||||
|
Width = 14
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
42.3333333333333
|
||||||
|
42.3333333333333
|
||||||
|
37.0416666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'ID'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel3: TQRLabel
|
||||||
|
Left = 56
|
||||||
|
Top = 16
|
||||||
|
Width = 124
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
148.166666666667
|
||||||
|
42.3333333333333
|
||||||
|
328.083333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Nombre del Cliente'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel4: TQRLabel
|
||||||
|
Left = 600
|
||||||
|
Top = 16
|
||||||
|
Width = 63
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1587.5
|
||||||
|
42.3333333333333
|
||||||
|
166.6875)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Tel'#233'fonos'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel5: TQRLabel
|
||||||
|
Left = 512
|
||||||
|
Top = 16
|
||||||
|
Width = 35
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1354.66666666667
|
||||||
|
42.3333333333333
|
||||||
|
92.6041666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'D.N.I.'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
40
src/imprimirClientes.h
Normal file
40
src/imprimirClientes.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef imprimirClientesH
|
||||||
|
#define imprimirClientesH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include "qrpctrls.hpp"
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <QRCtrls.hpp>
|
||||||
|
#include <QuickRpt.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TimprimirCarteraClientes : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TQuickRep *QuickRep1;
|
||||||
|
TQRPBand *QRPBand1;
|
||||||
|
TQRPBand *QRPBand2;
|
||||||
|
TQRPBand *QRPBand3;
|
||||||
|
TQRLabel *QRLabel1;
|
||||||
|
TQRPBand *QRPBand4;
|
||||||
|
TQRLabel *QRLabel2;
|
||||||
|
TQRLabel *QRLabel3;
|
||||||
|
TQRLabel *QRLabel4;
|
||||||
|
TQRExpr *QRExpr1;
|
||||||
|
TQRExpr *QRExpr2;
|
||||||
|
TQRExpr *QRExpr3;
|
||||||
|
TQRLabel *QRLabel5;
|
||||||
|
TQRExpr *QRExpr4;
|
||||||
|
TQRExpr *QRExpr5;
|
||||||
|
private: // User declarations
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TimprimirCarteraClientes(TComponent* Owner);
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TimprimirCarteraClientes *imprimirCarteraClientes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
17
src/imprimirClientes.~cpp
Normal file
17
src/imprimirClientes.~cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "imprimirClientes.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "qrpctrls"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TimprimirCarteraClientes *imprimirCarteraClientes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TimprimirCarteraClientes::TimprimirCarteraClientes(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
477
src/imprimirClientes.~dfm
Normal file
477
src/imprimirClientes.~dfm
Normal file
@ -0,0 +1,477 @@
|
|||||||
|
object imprimirCarteraClientes: TimprimirCarteraClientes
|
||||||
|
Left = 232
|
||||||
|
Top = 319
|
||||||
|
Width = 837
|
||||||
|
Height = 476
|
||||||
|
Caption = 'Imprimir :: Cartera de Clientes'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Scaled = False
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object QuickRep1: TQuickRep
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 794
|
||||||
|
Height = 1123
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = []
|
||||||
|
Functions.Strings = (
|
||||||
|
'PAGENUMBER'
|
||||||
|
'COLUMNNUMBER'
|
||||||
|
'REPORTTITLE')
|
||||||
|
Functions.DATA = (
|
||||||
|
'0'
|
||||||
|
'0'
|
||||||
|
#39#39)
|
||||||
|
Options = [FirstPageHeader, LastPageFooter]
|
||||||
|
Page.Columns = 1
|
||||||
|
Page.Orientation = poPortrait
|
||||||
|
Page.PaperSize = Default
|
||||||
|
Page.Values = (
|
||||||
|
100
|
||||||
|
2970
|
||||||
|
100
|
||||||
|
2100
|
||||||
|
100
|
||||||
|
100
|
||||||
|
0)
|
||||||
|
PrinterSettings.Copies = 1
|
||||||
|
PrinterSettings.OutputBin = Auto
|
||||||
|
PrinterSettings.Duplex = False
|
||||||
|
PrinterSettings.FirstPage = 0
|
||||||
|
PrinterSettings.LastPage = 0
|
||||||
|
PrinterSettings.UseStandardprinter = False
|
||||||
|
PrinterSettings.UseCustomBinCode = False
|
||||||
|
PrinterSettings.CustomBinCode = 0
|
||||||
|
PrinterSettings.ExtendedDuplex = 0
|
||||||
|
PrinterSettings.UseCustomPaperCode = False
|
||||||
|
PrinterSettings.CustomPaperCode = 0
|
||||||
|
PrinterSettings.PrintMetaFile = False
|
||||||
|
PrinterSettings.PrintQuality = 0
|
||||||
|
PrinterSettings.Collate = 0
|
||||||
|
PrinterSettings.ColorOption = 0
|
||||||
|
PrintIfEmpty = True
|
||||||
|
SnapToGrid = True
|
||||||
|
Units = MM
|
||||||
|
Zoom = 100
|
||||||
|
PrevFormStyle = fsNormal
|
||||||
|
PreviewInitialState = wsNormal
|
||||||
|
PrevInitialZoom = qrZoomToFit
|
||||||
|
PreviewDefaultSaveType = stQRP
|
||||||
|
object QRPBand1: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 38
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.833333333333
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbTitle
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRLabel1: TQRLabel
|
||||||
|
Left = 264
|
||||||
|
Top = 8
|
||||||
|
Width = 178
|
||||||
|
Height = 23
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
60.8541666666667
|
||||||
|
698.5
|
||||||
|
21.1666666666667
|
||||||
|
470.958333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Cartera de Clientes'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -19
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 14
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QRPBand2: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 118
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.833333333333
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbDetail
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRExpr1: TQRExpr
|
||||||
|
Left = 35
|
||||||
|
Top = 0
|
||||||
|
Width = 11
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
92.6041666666667
|
||||||
|
0
|
||||||
|
29.1041666666667)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'id'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr2: TQRExpr
|
||||||
|
Left = 56
|
||||||
|
Top = 0
|
||||||
|
Width = 44
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
148.166666666667
|
||||||
|
0
|
||||||
|
116.416666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'nombre'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr3: TQRExpr
|
||||||
|
Left = 600
|
||||||
|
Top = 0
|
||||||
|
Width = 103
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1587.5
|
||||||
|
0
|
||||||
|
272.520833333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'telefono+'#39', '#39'+movil'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr4: TQRExpr
|
||||||
|
Left = 512
|
||||||
|
Top = 0
|
||||||
|
Width = 18
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1354.66666666667
|
||||||
|
0
|
||||||
|
47.625)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'dni'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr5: TQRExpr
|
||||||
|
Left = 56
|
||||||
|
Top = 16
|
||||||
|
Width = 273
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
148.166666666667
|
||||||
|
42.3333333333333
|
||||||
|
722.3125)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clGray
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = []
|
||||||
|
Color = clWhite
|
||||||
|
ParentFont = False
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'calle+'#39', '#39'+poblacion+'#39', CP: '#39'+cp+'#39' ('#39'+provincia+'#39')'#39
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QRPBand3: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 158
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.8
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbPageFooter
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
end
|
||||||
|
object QRPBand4: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 78
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = True
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.833333333333
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbColumnHeader
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRLabel2: TQRLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 16
|
||||||
|
Width = 14
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
42.3333333333333
|
||||||
|
42.3333333333333
|
||||||
|
37.0416666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'ID'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel3: TQRLabel
|
||||||
|
Left = 56
|
||||||
|
Top = 16
|
||||||
|
Width = 124
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
148.166666666667
|
||||||
|
42.3333333333333
|
||||||
|
328.083333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Nombre del Cliente'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel4: TQRLabel
|
||||||
|
Left = 600
|
||||||
|
Top = 16
|
||||||
|
Width = 63
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1587.5
|
||||||
|
42.3333333333333
|
||||||
|
166.6875)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Tel'#233'fonos'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel5: TQRLabel
|
||||||
|
Left = 512
|
||||||
|
Top = 16
|
||||||
|
Width = 35
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1354.66666666667
|
||||||
|
42.3333333333333
|
||||||
|
92.6041666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'D.N.I.'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
40
src/imprimirClientes.~h
Normal file
40
src/imprimirClientes.~h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef imprimirClientesH
|
||||||
|
#define imprimirClientesH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include "qrpctrls.hpp"
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <QRCtrls.hpp>
|
||||||
|
#include <QuickRpt.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TimprimirCarteraClientes : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TQuickRep *QuickRep1;
|
||||||
|
TQRPBand *QRPBand1;
|
||||||
|
TQRPBand *QRPBand2;
|
||||||
|
TQRPBand *QRPBand3;
|
||||||
|
TQRLabel *QRLabel1;
|
||||||
|
TQRPBand *QRPBand4;
|
||||||
|
TQRLabel *QRLabel2;
|
||||||
|
TQRLabel *QRLabel3;
|
||||||
|
TQRLabel *QRLabel4;
|
||||||
|
TQRExpr *QRExpr1;
|
||||||
|
TQRExpr *QRExpr2;
|
||||||
|
TQRExpr *QRExpr3;
|
||||||
|
TQRLabel *QRLabel5;
|
||||||
|
TQRExpr *QRExpr4;
|
||||||
|
TQRExpr *QRExpr5;
|
||||||
|
private: // User declarations
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TimprimirCarteraClientes(TComponent* Owner);
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TimprimirCarteraClientes *imprimirCarteraClientes;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
17
src/imprimirCuentaPolizas.cpp
Normal file
17
src/imprimirCuentaPolizas.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "imprimirCuentaPolizas.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "qrpctrls"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TimprCuentaPolizas *imprCuentaPolizas;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TimprCuentaPolizas::TimprCuentaPolizas(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
786
src/imprimirCuentaPolizas.dfm
Normal file
786
src/imprimirCuentaPolizas.dfm
Normal file
@ -0,0 +1,786 @@
|
|||||||
|
object imprCuentaPolizas: TimprCuentaPolizas
|
||||||
|
Left = 119
|
||||||
|
Top = 136
|
||||||
|
Width = 947
|
||||||
|
Height = 567
|
||||||
|
Caption = 'Imprimir :: Cuenta Polizas'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Scaled = False
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object QuickRep1: TQuickRep
|
||||||
|
Left = 32
|
||||||
|
Top = 23
|
||||||
|
Width = 794
|
||||||
|
Height = 1123
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = []
|
||||||
|
Functions.Strings = (
|
||||||
|
'PAGENUMBER'
|
||||||
|
'COLUMNNUMBER'
|
||||||
|
'REPORTTITLE')
|
||||||
|
Functions.DATA = (
|
||||||
|
'0'
|
||||||
|
'0'
|
||||||
|
#39#39)
|
||||||
|
Options = [FirstPageHeader, LastPageFooter]
|
||||||
|
Page.Columns = 1
|
||||||
|
Page.Orientation = poPortrait
|
||||||
|
Page.PaperSize = Default
|
||||||
|
Page.Values = (
|
||||||
|
100
|
||||||
|
2970
|
||||||
|
100
|
||||||
|
2100
|
||||||
|
100
|
||||||
|
100
|
||||||
|
0)
|
||||||
|
PrinterSettings.Copies = 1
|
||||||
|
PrinterSettings.OutputBin = Auto
|
||||||
|
PrinterSettings.Duplex = False
|
||||||
|
PrinterSettings.FirstPage = 0
|
||||||
|
PrinterSettings.LastPage = 0
|
||||||
|
PrinterSettings.UseStandardprinter = False
|
||||||
|
PrinterSettings.UseCustomBinCode = False
|
||||||
|
PrinterSettings.CustomBinCode = 0
|
||||||
|
PrinterSettings.ExtendedDuplex = 0
|
||||||
|
PrinterSettings.UseCustomPaperCode = False
|
||||||
|
PrinterSettings.CustomPaperCode = 0
|
||||||
|
PrinterSettings.PrintMetaFile = False
|
||||||
|
PrinterSettings.PrintQuality = 0
|
||||||
|
PrinterSettings.Collate = 0
|
||||||
|
PrinterSettings.ColorOption = 0
|
||||||
|
PrintIfEmpty = True
|
||||||
|
SnapToGrid = True
|
||||||
|
Units = MM
|
||||||
|
Zoom = 100
|
||||||
|
PrevFormStyle = fsNormal
|
||||||
|
PreviewInitialState = wsNormal
|
||||||
|
PrevInitialZoom = qrZoomToFit
|
||||||
|
PreviewDefaultSaveType = stQRP
|
||||||
|
object QRPBand1: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 38
|
||||||
|
Width = 718
|
||||||
|
Height = 123
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
325.4375
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbTitle
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRLabel1: TQRLabel
|
||||||
|
Left = 304
|
||||||
|
Top = 8
|
||||||
|
Width = 139
|
||||||
|
Height = 23
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
60.8541666666667
|
||||||
|
804.333333333333
|
||||||
|
21.1666666666667
|
||||||
|
367.770833333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Cuenta Polizas'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -19
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 14
|
||||||
|
end
|
||||||
|
object QRLabel6: TQRLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 48
|
||||||
|
Width = 44
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
42.3333333333333
|
||||||
|
127
|
||||||
|
116.416666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Fecha:'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel7: TQRLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 80
|
||||||
|
Width = 50
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
42.3333333333333
|
||||||
|
211.666666666667
|
||||||
|
132.291666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Agente:'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object qrlbFecha: TQRLabel
|
||||||
|
Left = 80
|
||||||
|
Top = 48
|
||||||
|
Width = 58
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
211.666666666667
|
||||||
|
127
|
||||||
|
153.458333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'qrlbFecha'
|
||||||
|
Color = clWhite
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object qrlbAgente: TQRLabel
|
||||||
|
Left = 80
|
||||||
|
Top = 80
|
||||||
|
Width = 58
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
211.666666666667
|
||||||
|
211.666666666667
|
||||||
|
153.458333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'qrlbFecha'
|
||||||
|
Color = clWhite
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QRPBand2: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 201
|
||||||
|
Width = 718
|
||||||
|
Height = 24
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
63.5
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbDetail
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRExpr1: TQRExpr
|
||||||
|
Left = 22
|
||||||
|
Top = 0
|
||||||
|
Width = 32
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
58.2083333333333
|
||||||
|
0
|
||||||
|
84.6666666666667)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'fecha'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr2: TQRExpr
|
||||||
|
Left = 64
|
||||||
|
Top = 0
|
||||||
|
Width = 44
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
169.333333333333
|
||||||
|
0
|
||||||
|
116.416666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'nombre'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr3: TQRExpr
|
||||||
|
Left = 672
|
||||||
|
Top = 0
|
||||||
|
Width = 40
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1778
|
||||||
|
0
|
||||||
|
105.833333333333)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'puntos'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr4: TQRExpr
|
||||||
|
Left = 592
|
||||||
|
Top = 0
|
||||||
|
Width = 53
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1566.33333333333
|
||||||
|
0
|
||||||
|
140.229166666667)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'comision'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr5: TQRExpr
|
||||||
|
Left = 336
|
||||||
|
Top = 0
|
||||||
|
Width = 62
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
889
|
||||||
|
0
|
||||||
|
164.041666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'numPoliza'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr9: TQRExpr
|
||||||
|
Left = 506
|
||||||
|
Top = 0
|
||||||
|
Width = 60
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1338.79166666667
|
||||||
|
0
|
||||||
|
158.75)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'primaNeta'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QRPBand3: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 225
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = True
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.833333333333
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbPageFooter
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRExpr6: TQRExpr
|
||||||
|
Left = 634
|
||||||
|
Top = 8
|
||||||
|
Width = 77
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1677.45833333333
|
||||||
|
21.1666666666667
|
||||||
|
203.729166666667)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'SUM(puntos)'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr7: TQRExpr
|
||||||
|
Left = 554
|
||||||
|
Top = 8
|
||||||
|
Width = 90
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1465.79166666667
|
||||||
|
21.1666666666667
|
||||||
|
238.125)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'SUM(comision)'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr8: TQRExpr
|
||||||
|
Left = 336
|
||||||
|
Top = 8
|
||||||
|
Width = 45
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
889
|
||||||
|
21.1666666666667
|
||||||
|
119.0625)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'COUNT'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr10: TQRExpr
|
||||||
|
Left = 474
|
||||||
|
Top = 8
|
||||||
|
Width = 97
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1254.125
|
||||||
|
21.1666666666667
|
||||||
|
256.645833333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'SUM(primaNeta)'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QRPBand4: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 161
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = True
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.833333333333
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbColumnHeader
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRLabel2: TQRLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 16
|
||||||
|
Width = 40
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
42.3333333333333
|
||||||
|
42.3333333333333
|
||||||
|
105.833333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Fecha'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel3: TQRLabel
|
||||||
|
Left = 64
|
||||||
|
Top = 16
|
||||||
|
Width = 124
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
169.333333333333
|
||||||
|
42.3333333333333
|
||||||
|
328.083333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Nombre del Cliente'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel4: TQRLabel
|
||||||
|
Left = 656
|
||||||
|
Top = 16
|
||||||
|
Width = 44
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1735.66666666667
|
||||||
|
42.3333333333333
|
||||||
|
116.416666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Puntos'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel5: TQRLabel
|
||||||
|
Left = 576
|
||||||
|
Top = 16
|
||||||
|
Width = 60
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1524
|
||||||
|
42.3333333333333
|
||||||
|
158.75)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Comisi'#243'n'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel8: TQRLabel
|
||||||
|
Left = 336
|
||||||
|
Top = 16
|
||||||
|
Width = 78
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
889
|
||||||
|
42.3333333333333
|
||||||
|
206.375)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'N'#250'm. Poliza'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel9: TQRLabel
|
||||||
|
Left = 488
|
||||||
|
Top = 16
|
||||||
|
Width = 72
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1291.16666666667
|
||||||
|
42.3333333333333
|
||||||
|
190.5)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Prima Neta'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
51
src/imprimirCuentaPolizas.h
Normal file
51
src/imprimirCuentaPolizas.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef imprimirCuentaPolizasH
|
||||||
|
#define imprimirCuentaPolizasH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include "qrpctrls.hpp"
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <QRCtrls.hpp>
|
||||||
|
#include <QuickRpt.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TimprCuentaPolizas : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TQuickRep *QuickRep1;
|
||||||
|
TQRPBand *QRPBand1;
|
||||||
|
TQRLabel *QRLabel1;
|
||||||
|
TQRPBand *QRPBand2;
|
||||||
|
TQRExpr *QRExpr1;
|
||||||
|
TQRExpr *QRExpr2;
|
||||||
|
TQRExpr *QRExpr3;
|
||||||
|
TQRExpr *QRExpr4;
|
||||||
|
TQRPBand *QRPBand3;
|
||||||
|
TQRPBand *QRPBand4;
|
||||||
|
TQRLabel *QRLabel2;
|
||||||
|
TQRLabel *QRLabel3;
|
||||||
|
TQRLabel *QRLabel4;
|
||||||
|
TQRLabel *QRLabel5;
|
||||||
|
TQRLabel *QRLabel6;
|
||||||
|
TQRLabel *QRLabel7;
|
||||||
|
TQRLabel *QRLabel8;
|
||||||
|
TQRExpr *QRExpr5;
|
||||||
|
TQRExpr *QRExpr6;
|
||||||
|
TQRExpr *QRExpr7;
|
||||||
|
TQRExpr *QRExpr8;
|
||||||
|
TQRLabel *qrlbFecha;
|
||||||
|
TQRLabel *qrlbAgente;
|
||||||
|
TQRLabel *QRLabel9;
|
||||||
|
TQRExpr *QRExpr9;
|
||||||
|
TQRExpr *QRExpr10;
|
||||||
|
private: // User declarations
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TimprCuentaPolizas(TComponent* Owner);
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TimprCuentaPolizas *imprCuentaPolizas;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
17
src/imprimirCuentaPolizas.~cpp
Normal file
17
src/imprimirCuentaPolizas.~cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "imprimirCuentaPolizas.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "qrpctrls"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TimprCuentaPolizas *imprCuentaPolizas;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TimprCuentaPolizas::TimprCuentaPolizas(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
700
src/imprimirCuentaPolizas.~dfm
Normal file
700
src/imprimirCuentaPolizas.~dfm
Normal file
@ -0,0 +1,700 @@
|
|||||||
|
object imprCuentaPolizas: TimprCuentaPolizas
|
||||||
|
Left = 2
|
||||||
|
Top = 110
|
||||||
|
Width = 947
|
||||||
|
Height = 567
|
||||||
|
Caption = 'Imprimir :: Cuenta Polizas'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Scaled = False
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object QuickRep1: TQuickRep
|
||||||
|
Left = 32
|
||||||
|
Top = 23
|
||||||
|
Width = 794
|
||||||
|
Height = 1123
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = []
|
||||||
|
Functions.Strings = (
|
||||||
|
'PAGENUMBER'
|
||||||
|
'COLUMNNUMBER'
|
||||||
|
'REPORTTITLE')
|
||||||
|
Functions.DATA = (
|
||||||
|
'0'
|
||||||
|
'0'
|
||||||
|
#39#39)
|
||||||
|
Options = [FirstPageHeader, LastPageFooter]
|
||||||
|
Page.Columns = 1
|
||||||
|
Page.Orientation = poPortrait
|
||||||
|
Page.PaperSize = Default
|
||||||
|
Page.Values = (
|
||||||
|
100
|
||||||
|
2970
|
||||||
|
100
|
||||||
|
2100
|
||||||
|
100
|
||||||
|
100
|
||||||
|
0)
|
||||||
|
PrinterSettings.Copies = 1
|
||||||
|
PrinterSettings.OutputBin = Auto
|
||||||
|
PrinterSettings.Duplex = False
|
||||||
|
PrinterSettings.FirstPage = 0
|
||||||
|
PrinterSettings.LastPage = 0
|
||||||
|
PrinterSettings.UseStandardprinter = False
|
||||||
|
PrinterSettings.UseCustomBinCode = False
|
||||||
|
PrinterSettings.CustomBinCode = 0
|
||||||
|
PrinterSettings.ExtendedDuplex = 0
|
||||||
|
PrinterSettings.UseCustomPaperCode = False
|
||||||
|
PrinterSettings.CustomPaperCode = 0
|
||||||
|
PrinterSettings.PrintMetaFile = False
|
||||||
|
PrinterSettings.PrintQuality = 0
|
||||||
|
PrinterSettings.Collate = 0
|
||||||
|
PrinterSettings.ColorOption = 0
|
||||||
|
PrintIfEmpty = True
|
||||||
|
SnapToGrid = True
|
||||||
|
Units = MM
|
||||||
|
Zoom = 100
|
||||||
|
PrevFormStyle = fsNormal
|
||||||
|
PreviewInitialState = wsNormal
|
||||||
|
PrevInitialZoom = qrZoomToFit
|
||||||
|
PreviewDefaultSaveType = stQRP
|
||||||
|
object QRPBand1: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 38
|
||||||
|
Width = 718
|
||||||
|
Height = 123
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
325.4375
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbTitle
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRLabel1: TQRLabel
|
||||||
|
Left = 304
|
||||||
|
Top = 8
|
||||||
|
Width = 139
|
||||||
|
Height = 23
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
60.8541666666667
|
||||||
|
804.333333333333
|
||||||
|
21.1666666666667
|
||||||
|
367.770833333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Cuenta Polizas'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -19
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 14
|
||||||
|
end
|
||||||
|
object QRLabel6: TQRLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 48
|
||||||
|
Width = 44
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
42.3333333333333
|
||||||
|
127
|
||||||
|
116.416666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Fecha:'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel7: TQRLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 80
|
||||||
|
Width = 50
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
42.3333333333333
|
||||||
|
211.666666666667
|
||||||
|
132.291666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Agente:'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object qrlbFecha: TQRLabel
|
||||||
|
Left = 80
|
||||||
|
Top = 48
|
||||||
|
Width = 58
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
211.666666666667
|
||||||
|
127
|
||||||
|
153.458333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'qrlbFecha'
|
||||||
|
Color = clWhite
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object qrlbAgente: TQRLabel
|
||||||
|
Left = 80
|
||||||
|
Top = 80
|
||||||
|
Width = 58
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
211.666666666667
|
||||||
|
211.666666666667
|
||||||
|
153.458333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'qrlbFecha'
|
||||||
|
Color = clWhite
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QRPBand2: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 201
|
||||||
|
Width = 718
|
||||||
|
Height = 24
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
63.5
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbDetail
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRExpr1: TQRExpr
|
||||||
|
Left = 22
|
||||||
|
Top = 0
|
||||||
|
Width = 32
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
58.2083333333333
|
||||||
|
0
|
||||||
|
84.6666666666667)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'fecha'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr2: TQRExpr
|
||||||
|
Left = 64
|
||||||
|
Top = 0
|
||||||
|
Width = 44
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
169.333333333333
|
||||||
|
0
|
||||||
|
116.416666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'nombre'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr3: TQRExpr
|
||||||
|
Left = 672
|
||||||
|
Top = 0
|
||||||
|
Width = 40
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1778
|
||||||
|
0
|
||||||
|
105.833333333333)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'puntos'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr4: TQRExpr
|
||||||
|
Left = 592
|
||||||
|
Top = 0
|
||||||
|
Width = 53
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1566.33333333333
|
||||||
|
0
|
||||||
|
140.229166666667)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'comision'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr5: TQRExpr
|
||||||
|
Left = 416
|
||||||
|
Top = 0
|
||||||
|
Width = 62
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1100.66666666667
|
||||||
|
0
|
||||||
|
164.041666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'numPoliza'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QRPBand3: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 225
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = True
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.833333333333
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbPageFooter
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRExpr6: TQRExpr
|
||||||
|
Left = 634
|
||||||
|
Top = 8
|
||||||
|
Width = 77
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1677.45833333333
|
||||||
|
21.1666666666667
|
||||||
|
203.729166666667)
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'SUM(puntos)'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr7: TQRExpr
|
||||||
|
Left = 554
|
||||||
|
Top = 8
|
||||||
|
Width = 90
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1465.79166666667
|
||||||
|
21.1666666666667
|
||||||
|
238.125)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'SUM(comision)'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRExpr8: TQRExpr
|
||||||
|
Left = 416
|
||||||
|
Top = 8
|
||||||
|
Width = 45
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1100.66666666667
|
||||||
|
21.1666666666667
|
||||||
|
119.0625)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Color = clWhite
|
||||||
|
ResetAfterPrint = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
Expression = 'COUNT'
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object QRPBand4: TQRPBand
|
||||||
|
Left = 38
|
||||||
|
Top = 161
|
||||||
|
Width = 718
|
||||||
|
Height = 40
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = True
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
AlignToBottom = False
|
||||||
|
Color = clWhite
|
||||||
|
TransparentBand = False
|
||||||
|
ForceNewColumn = False
|
||||||
|
ForceNewPage = False
|
||||||
|
Size.Values = (
|
||||||
|
105.833333333333
|
||||||
|
1899.70833333333)
|
||||||
|
PreCaluculateBandHeight = False
|
||||||
|
KeepOnOnePage = False
|
||||||
|
BandType = rbColumnHeader
|
||||||
|
AlwaysUseSpace = False
|
||||||
|
NotOnFirstPage = False
|
||||||
|
NotOnLastPage = False
|
||||||
|
object QRLabel2: TQRLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 16
|
||||||
|
Width = 40
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
42.3333333333333
|
||||||
|
42.3333333333333
|
||||||
|
105.833333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Fecha'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel3: TQRLabel
|
||||||
|
Left = 64
|
||||||
|
Top = 16
|
||||||
|
Width = 124
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
169.333333333333
|
||||||
|
42.3333333333333
|
||||||
|
328.083333333333)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Nombre del Cliente'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel4: TQRLabel
|
||||||
|
Left = 656
|
||||||
|
Top = 16
|
||||||
|
Width = 44
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1735.66666666667
|
||||||
|
42.3333333333333
|
||||||
|
116.416666666667)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Puntos'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel5: TQRLabel
|
||||||
|
Left = 576
|
||||||
|
Top = 16
|
||||||
|
Width = 60
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1524
|
||||||
|
42.3333333333333
|
||||||
|
158.75)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'Comisi'#243'n'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
object QRLabel8: TQRLabel
|
||||||
|
Left = 416
|
||||||
|
Top = 16
|
||||||
|
Width = 78
|
||||||
|
Height = 17
|
||||||
|
Frame.Color = clBlack
|
||||||
|
Frame.DrawTop = False
|
||||||
|
Frame.DrawBottom = False
|
||||||
|
Frame.DrawLeft = False
|
||||||
|
Frame.DrawRight = False
|
||||||
|
Size.Values = (
|
||||||
|
44.9791666666667
|
||||||
|
1100.66666666667
|
||||||
|
42.3333333333333
|
||||||
|
206.375)
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
AlignToBand = False
|
||||||
|
AutoSize = True
|
||||||
|
AutoStretch = False
|
||||||
|
Caption = 'N'#250'm. Poliza'
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
Transparent = False
|
||||||
|
WordWrap = True
|
||||||
|
ExportAs = exptText
|
||||||
|
FontSize = 10
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
48
src/imprimirCuentaPolizas.~h
Normal file
48
src/imprimirCuentaPolizas.~h
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef imprimirCuentaPolizasH
|
||||||
|
#define imprimirCuentaPolizasH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include "qrpctrls.hpp"
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <QRCtrls.hpp>
|
||||||
|
#include <QuickRpt.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TimprCuentaPolizas : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TQuickRep *QuickRep1;
|
||||||
|
TQRPBand *QRPBand1;
|
||||||
|
TQRLabel *QRLabel1;
|
||||||
|
TQRPBand *QRPBand2;
|
||||||
|
TQRExpr *QRExpr1;
|
||||||
|
TQRExpr *QRExpr2;
|
||||||
|
TQRExpr *QRExpr3;
|
||||||
|
TQRExpr *QRExpr4;
|
||||||
|
TQRPBand *QRPBand3;
|
||||||
|
TQRPBand *QRPBand4;
|
||||||
|
TQRLabel *QRLabel2;
|
||||||
|
TQRLabel *QRLabel3;
|
||||||
|
TQRLabel *QRLabel4;
|
||||||
|
TQRLabel *QRLabel5;
|
||||||
|
TQRLabel *QRLabel6;
|
||||||
|
TQRLabel *QRLabel7;
|
||||||
|
TQRLabel *QRLabel8;
|
||||||
|
TQRExpr *QRExpr5;
|
||||||
|
TQRExpr *QRExpr6;
|
||||||
|
TQRExpr *QRExpr7;
|
||||||
|
TQRExpr *QRExpr8;
|
||||||
|
TQRLabel *qrlbFecha;
|
||||||
|
TQRLabel *qrlbAgente;
|
||||||
|
private: // User declarations
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TimprCuentaPolizas(TComponent* Owner);
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TimprCuentaPolizas *imprCuentaPolizas;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
43
src/imprimirFichaCliente.cpp
Normal file
43
src/imprimirFichaCliente.cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "imprimirFichaCliente.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "qrpctrls"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TimprFichaCliente *imprFichaCliente;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TimprFichaCliente::TimprFichaCliente(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TimprFichaCliente::QRExpr6Print(TObject *sender,
|
||||||
|
AnsiString &Value)
|
||||||
|
{
|
||||||
|
if ( Value == "P" ) Value = "Padre/Madre"; else
|
||||||
|
if ( Value == "C" ) Value = "Marido/Mujer"; else
|
||||||
|
if ( Value == "H" ) Value = "Hermano/a"; else
|
||||||
|
if ( Value == "N" ) Value = "Hijo/a"; else
|
||||||
|
if ( Value == "o" ) Value = "otros";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TimprFichaCliente::QRExpr5Print(TObject *sender,
|
||||||
|
AnsiString &Value)
|
||||||
|
{
|
||||||
|
if ( Value == "S" ) Value = "Soltero"; else
|
||||||
|
if ( Value == "C" ) Value = "Casado"; else
|
||||||
|
if ( Value == "D" ) Value = "Divorciado"; else
|
||||||
|
if ( Value == "V" ) Value = "Viudo";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TimprFichaCliente::QRExpr4Print(TObject *sender,
|
||||||
|
AnsiString &Value)
|
||||||
|
{
|
||||||
|
if ( Value == "H" ) Value = "Hombre"; else
|
||||||
|
if ( Value == "M" ) Value = "Mujer";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
BIN
src/imprimirFichaCliente.ddp
Normal file
BIN
src/imprimirFichaCliente.ddp
Normal file
Binary file not shown.
1653
src/imprimirFichaCliente.dfm
Normal file
1653
src/imprimirFichaCliente.dfm
Normal file
File diff suppressed because it is too large
Load Diff
84
src/imprimirFichaCliente.h
Normal file
84
src/imprimirFichaCliente.h
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef imprimirFichaClienteH
|
||||||
|
#define imprimirFichaClienteH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <QuickRpt.hpp>
|
||||||
|
#include "qrpctrls.hpp"
|
||||||
|
#include <QRCtrls.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TimprFichaCliente : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TQuickRep *QuickRep1;
|
||||||
|
TQRPBand *QRPBand1;
|
||||||
|
TQRLabel *QRLabel1;
|
||||||
|
TQRLabel *QRLabel2;
|
||||||
|
TQRLabel *rNombre;
|
||||||
|
TQRLabel *QRLabel4;
|
||||||
|
TQRLabel *rID;
|
||||||
|
TQRLabel *QRLabel6;
|
||||||
|
TQRLabel *rDNI;
|
||||||
|
TQRLabel *QRLabel8;
|
||||||
|
TQRLabel *rFechaNacimiento;
|
||||||
|
TQRLabel *QRLabel10;
|
||||||
|
TQRLabel *rEstadoCivil;
|
||||||
|
TQRLabel *QRLabel12;
|
||||||
|
TQRLabel *rPCargo;
|
||||||
|
TQRLabel *QRLabel14;
|
||||||
|
TQRLabel *rCalle;
|
||||||
|
TQRLabel *QRLabel16;
|
||||||
|
TQRLabel *rPoblacion;
|
||||||
|
TQRLabel *QRLabel18;
|
||||||
|
TQRLabel *rProvincia;
|
||||||
|
TQRLabel *QRLabel20;
|
||||||
|
TQRLabel *rCP;
|
||||||
|
TQRLabel *QRLabel22;
|
||||||
|
TQRLabel *rDirCobro;
|
||||||
|
TQRLabel *QRLabel24;
|
||||||
|
TQRLabel *rTelefono;
|
||||||
|
TQRLabel *QRLabel26;
|
||||||
|
TQRLabel *rMovil;
|
||||||
|
TQRLabel *QRLabel28;
|
||||||
|
TQRLabel *rFax;
|
||||||
|
TQRLabel *QRLabel30;
|
||||||
|
TQRLabel *rEMail;
|
||||||
|
TQRShape *QRShape1;
|
||||||
|
TQRShape *QRShape2;
|
||||||
|
TQRLabel *rAgente;
|
||||||
|
TQRLabel *QRLabel33;
|
||||||
|
TQRLabel *QRLabel34;
|
||||||
|
TQRLabel *rGradoFidelidad;
|
||||||
|
TQRLabel *QRLabel36;
|
||||||
|
TQRBand *QRBand1;
|
||||||
|
TQRLabel *QRLabel37;
|
||||||
|
TQRLabel *QRLabel38;
|
||||||
|
TQRLabel *QRLabel39;
|
||||||
|
TQRLabel *QRLabel40;
|
||||||
|
TQRLabel *QRLabel41;
|
||||||
|
TQRLabel *QRLabel42;
|
||||||
|
TQRExpr *QRExpr1;
|
||||||
|
TQRExpr *QRExpr2;
|
||||||
|
TQRExpr *QRExpr3;
|
||||||
|
TQRExpr *QRExpr4;
|
||||||
|
TQRExpr *QRExpr5;
|
||||||
|
TQRExpr *QRExpr6;
|
||||||
|
TQRBand *QRBand2;
|
||||||
|
TQRLabel *QRLabel3;
|
||||||
|
TQRPMemo *rNotas;
|
||||||
|
void __fastcall QRExpr6Print(TObject *sender, AnsiString &Value);
|
||||||
|
void __fastcall QRExpr5Print(TObject *sender, AnsiString &Value);
|
||||||
|
void __fastcall QRExpr4Print(TObject *sender, AnsiString &Value);
|
||||||
|
private: // User declarations
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TimprFichaCliente(TComponent* Owner);
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TimprFichaCliente *imprFichaCliente;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
43
src/imprimirFichaCliente.~cpp
Normal file
43
src/imprimirFichaCliente.~cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "imprimirFichaCliente.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma link "qrpctrls"
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TimprFichaCliente *imprFichaCliente;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TimprFichaCliente::TimprFichaCliente(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TimprFichaCliente::QRExpr6Print(TObject *sender,
|
||||||
|
AnsiString &Value)
|
||||||
|
{
|
||||||
|
if ( Value == "P" ) Value = "Padre/Madre"; else
|
||||||
|
if ( Value == "C" ) Value = "Marido/Mujer"; else
|
||||||
|
if ( Value == "H" ) Value = "Hermano/a"; else
|
||||||
|
if ( Value == "N" ) Value = "Hijo/a"; else
|
||||||
|
if ( Value == "o" ) Value = "otros";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TimprFichaCliente::QRExpr5Print(TObject *sender,
|
||||||
|
AnsiString &Value)
|
||||||
|
{
|
||||||
|
if ( Value == "S" ) Value = "Soltero"; else
|
||||||
|
if ( Value == "C" ) Value = "Casado"; else
|
||||||
|
if ( Value == "D" ) Value = "Divorciado"; else
|
||||||
|
if ( Value == "V" ) Value = "Viudo";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TimprFichaCliente::QRExpr4Print(TObject *sender,
|
||||||
|
AnsiString &Value)
|
||||||
|
{
|
||||||
|
if ( Value == "H" ) Value = "Hombre"; else
|
||||||
|
if ( Value == "M" ) Value = "Mujer";
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
BIN
src/imprimirFichaCliente.~ddp
Normal file
BIN
src/imprimirFichaCliente.~ddp
Normal file
Binary file not shown.
1653
src/imprimirFichaCliente.~dfm
Normal file
1653
src/imprimirFichaCliente.~dfm
Normal file
File diff suppressed because it is too large
Load Diff
84
src/imprimirFichaCliente.~h
Normal file
84
src/imprimirFichaCliente.~h
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef imprimirFichaClienteH
|
||||||
|
#define imprimirFichaClienteH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <QuickRpt.hpp>
|
||||||
|
#include "qrpctrls.hpp"
|
||||||
|
#include <QRCtrls.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TimprFichaCliente : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TQuickRep *QuickRep1;
|
||||||
|
TQRPBand *QRPBand1;
|
||||||
|
TQRLabel *QRLabel1;
|
||||||
|
TQRLabel *QRLabel2;
|
||||||
|
TQRLabel *rNombre;
|
||||||
|
TQRLabel *QRLabel4;
|
||||||
|
TQRLabel *rID;
|
||||||
|
TQRLabel *QRLabel6;
|
||||||
|
TQRLabel *rDNI;
|
||||||
|
TQRLabel *QRLabel8;
|
||||||
|
TQRLabel *rFechaNacimiento;
|
||||||
|
TQRLabel *QRLabel10;
|
||||||
|
TQRLabel *rEstadoCivil;
|
||||||
|
TQRLabel *QRLabel12;
|
||||||
|
TQRLabel *rPCargo;
|
||||||
|
TQRLabel *QRLabel14;
|
||||||
|
TQRLabel *rCalle;
|
||||||
|
TQRLabel *QRLabel16;
|
||||||
|
TQRLabel *rPoblacion;
|
||||||
|
TQRLabel *QRLabel18;
|
||||||
|
TQRLabel *rProvincia;
|
||||||
|
TQRLabel *QRLabel20;
|
||||||
|
TQRLabel *rCP;
|
||||||
|
TQRLabel *QRLabel22;
|
||||||
|
TQRLabel *rDirCobro;
|
||||||
|
TQRLabel *QRLabel24;
|
||||||
|
TQRLabel *rTelefono;
|
||||||
|
TQRLabel *QRLabel26;
|
||||||
|
TQRLabel *rMovil;
|
||||||
|
TQRLabel *QRLabel28;
|
||||||
|
TQRLabel *rFax;
|
||||||
|
TQRLabel *QRLabel30;
|
||||||
|
TQRLabel *rEMail;
|
||||||
|
TQRShape *QRShape1;
|
||||||
|
TQRShape *QRShape2;
|
||||||
|
TQRLabel *rAgente;
|
||||||
|
TQRLabel *QRLabel33;
|
||||||
|
TQRLabel *QRLabel34;
|
||||||
|
TQRLabel *rGradoFidelidad;
|
||||||
|
TQRLabel *QRLabel36;
|
||||||
|
TQRBand *QRBand1;
|
||||||
|
TQRLabel *QRLabel37;
|
||||||
|
TQRLabel *QRLabel38;
|
||||||
|
TQRLabel *QRLabel39;
|
||||||
|
TQRLabel *QRLabel40;
|
||||||
|
TQRLabel *QRLabel41;
|
||||||
|
TQRLabel *QRLabel42;
|
||||||
|
TQRExpr *QRExpr1;
|
||||||
|
TQRExpr *QRExpr2;
|
||||||
|
TQRExpr *QRExpr3;
|
||||||
|
TQRExpr *QRExpr4;
|
||||||
|
TQRExpr *QRExpr5;
|
||||||
|
TQRExpr *QRExpr6;
|
||||||
|
TQRBand *QRBand2;
|
||||||
|
TQRLabel *QRLabel3;
|
||||||
|
TQRPMemo *rNotas;
|
||||||
|
void __fastcall QRExpr6Print(TObject *sender, AnsiString &Value);
|
||||||
|
void __fastcall QRExpr5Print(TObject *sender, AnsiString &Value);
|
||||||
|
void __fastcall QRExpr4Print(TObject *sender, AnsiString &Value);
|
||||||
|
private: // User declarations
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TimprFichaCliente(TComponent* Owner);
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TimprFichaCliente *imprFichaCliente;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
74
src/login_dlg.cpp
Normal file
74
src/login_dlg.cpp
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "login_dlg.h"
|
||||||
|
#include "clientes.h"
|
||||||
|
#include "tsplash.h"
|
||||||
|
#include "ZDataset.hpp"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
Tlogin *login;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall Tlogin::Tlogin(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
auth = false;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall Tlogin::BitBtn1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall Tlogin::FormShow(TObject *Sender)
|
||||||
|
{
|
||||||
|
if(Splash){
|
||||||
|
delete Splash;
|
||||||
|
Splash = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
bool __fastcall Tlogin::validateUserPass(AnsiString user, AnsiString pass) {
|
||||||
|
bool auth = false;
|
||||||
|
|
||||||
|
if ( !gestionClientes->ZConnection1->Connected ) return false;
|
||||||
|
|
||||||
|
TZQuery *zq;
|
||||||
|
zq = new TZQuery(this);
|
||||||
|
zq->Connection = gestionClientes->ZConnection1;
|
||||||
|
|
||||||
|
|
||||||
|
zq->SQL->Clear();
|
||||||
|
zq->SQL->Add("SELECT id FROM usuarios WHERE usuario='"+user+"' AND password='"+pass+"'");
|
||||||
|
zq->Active = true;
|
||||||
|
if ( zq->RecordCount>0 ) {
|
||||||
|
auth = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( auth ) {
|
||||||
|
// Registrar acceso OK
|
||||||
|
} else {
|
||||||
|
// Registrar acceso !OK
|
||||||
|
}
|
||||||
|
|
||||||
|
return auth;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall Tlogin::BitBtn2Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
TCursor Save_Cursor = Screen->Cursor;
|
||||||
|
Screen->Cursor = crHourGlass; // Show hourglass cursor
|
||||||
|
try {
|
||||||
|
auth = validateUserPass( user->Text, pass->Text );
|
||||||
|
} __finally {
|
||||||
|
Screen->Cursor = Save_Cursor; // always restore the cursor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
BIN
src/login_dlg.ddp
Normal file
BIN
src/login_dlg.ddp
Normal file
Binary file not shown.
193
src/login_dlg.dfm
Normal file
193
src/login_dlg.dfm
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
object login: Tlogin
|
||||||
|
Left = 346
|
||||||
|
Top = 452
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'Login...'
|
||||||
|
ClientHeight = 188
|
||||||
|
ClientWidth = 368
|
||||||
|
Color = clBlack
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clCream
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 20
|
||||||
|
object Image1: TImage
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 140
|
||||||
|
Height = 171
|
||||||
|
AutoSize = True
|
||||||
|
Picture.Data = {
|
||||||
|
0A544A504547496D616765360B0000FFD8FFE000104A46494600010101006000
|
||||||
|
600000FFDB004300100B0C0E0C0A100E0D0E1211101318281A18161618312325
|
||||||
|
1D283A333D3C3933383740485C4E404457453738506D51575F626768673E4D71
|
||||||
|
797064785C656763FFDB0043011112121815182F1A1A2F634238426363636363
|
||||||
|
6363636363636363636363636363636363636363636363636363636363636363
|
||||||
|
63636363636363636363636363FFC000110800AB008C03012200021101031101
|
||||||
|
FFC4001B00010002030101000000000000000000000004050203060107FFC400
|
||||||
|
3810000202010203060306040701000000000102000311042105123113224151
|
||||||
|
6171068191142332B1C1D13342A1F0152452536272E1A2FFC400190101000301
|
||||||
|
010000000000000000000000000102030405FFC4001F11010100020202030100
|
||||||
|
00000000000000000102110321123104415132FFDA000C03010002110311003F
|
||||||
|
00F9FC44D9452F7B854192606B8C1F29714E968A46E058DE39E93785ABFDA4C7
|
||||||
|
B4ADCA274A0C1F28C1F29D07253FED27D20D74FF00B49F48F386942A8CC70A09
|
||||||
|
32751C1F5570C84C0F59D0697455D54FDA6DA9517C36DCC36A19CEDB2F801276
|
||||||
|
85159C0F548B9001F632BEDA9EA6C3A9067566E5AF1CEC067A64CC751453ADAB
|
||||||
|
0D827C1846C727126DBC3350B714084F919B2BE17CCEA86E50E4E3946FBC9101
|
||||||
|
11AC6E55193270E1BCA076D6046233CBE32C74BA3A74E01049DC9761D420EA47
|
||||||
|
B9DA6A50755AB24E143B16623A28F1FA091B15BAAD13E9D55FF1237469167577
|
||||||
|
D696E86E0D9E66516227FA17A0FE93956186224C1E44440F40C9C0975A7A0514
|
||||||
|
2A8D9DC65BDBCA57F0DA85BAB50DF846E65A35773317C0DCCAE5749918F2E3A1
|
||||||
|
199B16BCF423EB3C146A361D9F5F59B129D42824D2481EB31B57D3D1564EDF9C
|
||||||
|
99C2B86BEBB882D5CA7913769A74696A5C0D9537CC4E9B40BFE1BF0EEAF5E7F8
|
||||||
|
966CA4FAED270EE97D28F8BEA56ED59AA9FE0D5DD5F5F332228C2938CE0749A4
|
||||||
|
1DF324D1CA56D66CE2BA99C63CF181F9CD6B2B7EDE7F87EAFB137332A2B6F927
|
||||||
|
73FF00920D01B9D9C12C876383D7D62ED6EAAFAFB27BDD90ED82662A8B532AD4
|
||||||
|
E49C6FFB48EC8DF5E2BED3524EC830A0F8B1E9F4EB3CE1F5611EECE1F3D9D5FF
|
||||||
|
0062376F90C9FA46B68353F6639B9970187FCBC7F69219151574F9014028CE3E
|
||||||
|
B637E43E50B691B53605A404C8ED7C3CAB1F87EA72665A3A94540D99FBDC96C7
|
||||||
|
5158EBF53B4D079B5BADC7E00E703C9547EC24E27EEC15CAF698E5F4AC7E11F3
|
||||||
|
3BFCA4A1A175B6D7A8B5AC4C2D87BC08E83C87B0951AED29ADBB44EF56DB8227
|
||||||
|
425681A7B15BCB3BF5CF84F6AD357F61297216E61CC7CC7944A9D391893788E8
|
||||||
|
4E96CCA9E6ADB706429642CF82AFDEBB792CBDE501401BE7ACA4E0A7F8ABE240
|
||||||
|
FCC4BE423233E739F9BDB5C3D36D6A4104E3CA6F15E141F01B4D28E07286DB0D
|
||||||
|
93372B0EC8F97319CF5A466C9F76B939E624CB1F89CFD9BE1CD1E99760E413F2
|
||||||
|
19FD657B05EEC9DF1B9FF2DA11E1BFE4274707DA9C9F4E44493A5601DD08CF69
|
||||||
|
5B20F7236FEA2470265CB91D48F51E136608EE948A50A3B35AC4961CA4041FA9
|
||||||
|
9BB466B4B56C6500D632A078B787F58C30D8A927CC78CC8291BF43E9E1098DF5
|
||||||
|
23359DA91CEEA46327F139E9FD77F948FABB02524564957FBB427A940773F369
|
||||||
|
B2A37330AD18966C853FE924609FA48B70FB5EB0269C1E4DABA81F2FEF788B5A
|
||||||
|
DDC3F4CD628000E6D43766A73D146EC7F4965AB006A855550D630407957F947F
|
||||||
|
28FD64BE11454BDB5E726AA93B3518EAA3259BE783F5947AEE25D8D96335AE4D
|
||||||
|
ADCEC8A70326109E34D450A6CD5D8A5C77869EBEF163E44F84AFD771335356AB
|
||||||
|
80CC72E3F49557F15B9F22BEE0F4904BB33E58E4E64E8B5D25F40BB4D621DD4A
|
||||||
|
F3ACE6986188F29D4E954B68C313B721FCA7316FF15BDE1099C1DC2EA4A93F88
|
||||||
|
103DE5EABE475C78CE5AA735D8AC3C0CBEED79916E5DD5FAFA1F1133E4C77DAF
|
||||||
|
8DD278B4737F7D66F4B8671B63F29522DC7B4D8B6EDD661715FC96A6DEE6E73C
|
||||||
|
A719F396FF00167DFF0006D06A17700E09F71FF93955BB62B99D15370E23F095
|
||||||
|
B4039B34E4301EC7F6335E29ADC572BB73604CC4C44CC4D5993C332990A2D650
|
||||||
|
CB53953B0217AC25A803DEC3F27748CFA79493C329A802F5D763EA33855C6140
|
||||||
|
F139F39E6A784EA1E945C8018E49073896DA0D3AE92A14D5B9FE666F1FD84CF3
|
||||||
|
E492749895AA3D8F05BEE728ACE37E41B2E4AA803E40CE078870FD5576359623
|
||||||
|
10770713B8D7BA5BC21B24F202A5B07C989FDA614DB46B34C2C41CC87BAC8DE1
|
||||||
|
173B8496C2FB7CE48C759BF4749D46A12B1E266DE2B48A75AEAA303326704A79
|
||||||
|
79B5047E1E9EA66CAAE9D174FA4755395446DFE83F4338FB0E6C63EB2EB8C6B8
|
||||||
|
D63B0ACF551CC7CE51C8812569358D43004064F1523322C49172852C19AEE5F6
|
||||||
|
6D8CCC57675054FB30946091D0CC858E3A3195F189DAF025B9C853F212C783EB
|
||||||
|
5F43AAEFA1ECEC186044E546A2D1D1CCCD35DA84208B0ED1E26DD3EAE814DE42
|
||||||
|
6F5B6EA7D26A91B47C62BBAB156A76F592B349194B908F53893A427F0DD3A387
|
||||||
|
B6C50C077541F396B5B2AAF2E30074C74FA4AAE17A9AF9CD06E420EEABEB2CB1
|
||||||
|
8F1236F94E3E6DF976B47A0AAB1E52541F21913D28194E5762082C9EA3CA62C0
|
||||||
|
72631B13D67ADDC000DBCB7992CABBBB6A6A1A6652D5DB9039467C8FE8248D0E
|
||||||
|
87EC3A76A5CF7D8E48F2F2935C9C8E61CC48F622189C72160DCBE0FF00BCD72E
|
||||||
|
5B94D234E378CE95AEE29841B1336AB269A9D8E2BAFF00FA33A2D669EBB118F6
|
||||||
|
6CAFD76F1F39C5F14BAC6BCD657915760B3A78F299456C44D45CD7DCCEC77266
|
||||||
|
B889A208888088880888809E8761FCC6791036D173D772B2939067D134B7769A
|
||||||
|
5A6D6C86B101DB7DFA6E27CE2B38B149F39F44D162FD2E9BB307BE800037E9B4
|
||||||
|
C39FF94C48E52775DCF9A1DFE919CB750C7A7919E354F5FE35618F113C160200
|
||||||
|
60187AF59C6B3D077F6D883B1F9420E56392727A89E8C153CAD9F47FDE787600
|
||||||
|
312A0FFAB712462848CF87963A4E63E2BD361D751DDEFF0094E9ED7AA9C768E1
|
||||||
|
01E8C7A19C97C4BAF4D45AB554C19136C8F19BF0CBE5B4550C444EB548888088
|
||||||
|
88088880888819D201B541E999F56E014228A026084AF9B3E18F0FA9C9F94F93
|
||||||
|
A6EC009F54F85E97D2F0AA5493CD68E63EDE139FE47F0B6337567C55929D0BBB
|
||||||
|
28663B2FA4E76B73664BA679464B0DB6965F106AB75AF242A8DFD4C87A4A01A6
|
||||||
|
9A5F67D55A398FFC44E49D45EC6CFB359A74466E960E65CF53395E3BC66DAAC7
|
||||||
|
D3E9DF0BE38963F1BF16C6A8D143639072EC7A4E2598BB658E4CEBE1E3D4F2AA
|
||||||
|
5BF4DB66AEFB061AC623DE69249EB113A1522220222202222022220222206480
|
||||||
|
971CBD67D47E196B1783D4FA807BA0F2FB784F9E703466E29472A07C38D88C83
|
||||||
|
BCFA8EADD69D2851804F80E989CDF22F531FD5F09DED49AD2FA9E20A83725B27
|
||||||
|
FBFACA8F8BF881AF50B550E40AC0518973A1608FA9D737441DDF5F01384E2BA8
|
||||||
|
3A8D63B139DE57831DE5BFC4E57A45B2D7B5B99D893EB30889D6CC8888088880
|
||||||
|
8888088880888808899D2336A83E703BDF82349459A2ED0D03B60FB587F2965C
|
||||||
|
775180C89FF518FA7EF257074AB4BC26BB2A4ECD790103D48954C3ED9C492B3F
|
||||||
|
857BCDE9FD89E7E796F3B97E3693A44E337FD8782D748D99C7337E938463CCC4
|
||||||
|
9F19D17C5BADEDB58C8A7BA0E00F2139C9D7C58F8E319E57748889AAA4444044
|
||||||
|
4404444044440444404BDF8534156BB8905B9199402769453ABF8135089AF6A5
|
||||||
|
B01AC1804FBCAE76CC6D899EDD8F13B174DA4AEA5D86327DA5469DFB0D16A358
|
||||||
|
E4067CAAFCFF00F26DE3579BF50403B31E51ED2AFE25D50D2E8134CBB1037F73
|
||||||
|
38B0C77646B6E9C8EBEE37EA9DCF9C8F04E4E6277B1222202222022220222202
|
||||||
|
22202222024AE1DAA3A3D65770FE539916207616718D30D5D7A8ED39AB5C1E5F
|
||||||
|
1F6941C67899E23AA6B31852738CCAECC4A6384C6EE26DB48889741111011110
|
||||||
|
111103FFD9}
|
||||||
|
end
|
||||||
|
object lb_login: TLabel
|
||||||
|
Left = 144
|
||||||
|
Top = 8
|
||||||
|
Width = 68
|
||||||
|
Height = 20
|
||||||
|
Caption = 'Usuario:'
|
||||||
|
end
|
||||||
|
object lb_pass: TLabel
|
||||||
|
Left = 144
|
||||||
|
Top = 72
|
||||||
|
Width = 99
|
||||||
|
Height = 20
|
||||||
|
Caption = 'Contrase'#241'a:'
|
||||||
|
end
|
||||||
|
object user: TEdit
|
||||||
|
Left = 144
|
||||||
|
Top = 32
|
||||||
|
Width = 217
|
||||||
|
Height = 28
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object pass: TEdit
|
||||||
|
Left = 144
|
||||||
|
Top = 104
|
||||||
|
Width = 217
|
||||||
|
Height = 28
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
PasswordChar = 'o'
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object BitBtn1: TBitBtn
|
||||||
|
Left = 144
|
||||||
|
Top = 152
|
||||||
|
Width = 105
|
||||||
|
Height = 25
|
||||||
|
Caption = '&Cancelar'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = BitBtn1Click
|
||||||
|
Kind = bkCancel
|
||||||
|
end
|
||||||
|
object BitBtn2: TBitBtn
|
||||||
|
Left = 256
|
||||||
|
Top = 152
|
||||||
|
Width = 105
|
||||||
|
Height = 25
|
||||||
|
Caption = '&Aceptar'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 3
|
||||||
|
OnClick = BitBtn2Click
|
||||||
|
Kind = bkOK
|
||||||
|
end
|
||||||
|
end
|
38
src/login_dlg.h
Normal file
38
src/login_dlg.h
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef login_dlgH
|
||||||
|
#define login_dlgH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include <Buttons.hpp>
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <jpeg.hpp>
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class Tlogin : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TImage *Image1;
|
||||||
|
TLabel *lb_login;
|
||||||
|
TLabel *lb_pass;
|
||||||
|
TEdit *user;
|
||||||
|
TEdit *pass;
|
||||||
|
TBitBtn *BitBtn1;
|
||||||
|
TBitBtn *BitBtn2;
|
||||||
|
void __fastcall BitBtn1Click(TObject *Sender);
|
||||||
|
void __fastcall FormShow(TObject *Sender);
|
||||||
|
void __fastcall BitBtn2Click(TObject *Sender);
|
||||||
|
private: // User declarations
|
||||||
|
bool __fastcall validateUserPass(AnsiString user, AnsiString pass);
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall Tlogin(TComponent* Owner);
|
||||||
|
bool auth;
|
||||||
|
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE Tlogin *login;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
62
src/login_dlg.~cpp
Normal file
62
src/login_dlg.~cpp
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "login_dlg.h"
|
||||||
|
#include "clientes.h"
|
||||||
|
#include "tsplash.h"
|
||||||
|
#include "ZDataset.hpp"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
Tlogin *login;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall Tlogin::Tlogin(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
auth = false;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall Tlogin::BitBtn1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall Tlogin::FormShow(TObject *Sender)
|
||||||
|
{
|
||||||
|
if(Splash){
|
||||||
|
delete Splash;
|
||||||
|
Splash = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
bool __fastcall Tlogin::validateUserPass(AnsiString user, AnsiString pass) {
|
||||||
|
bool auth = false;
|
||||||
|
|
||||||
|
if ( !gestionClientes->ZConnection1->Connected ) return false;
|
||||||
|
|
||||||
|
TZQuery *zq;
|
||||||
|
zq = new TZQuery(this);
|
||||||
|
zq->Connection = gestionClientes->ZConnection1;
|
||||||
|
|
||||||
|
|
||||||
|
zq->SQL->Clear();
|
||||||
|
zq->SQL->Add("SELECT id FROM usuarios WHERE usuario='"+user+"' AND password='"+pass+"'");
|
||||||
|
zq->Active = true;
|
||||||
|
if ( zq->RecordCount>0 ) {
|
||||||
|
auth = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( auth ) {
|
||||||
|
// Registrar acceso OK
|
||||||
|
} else {
|
||||||
|
// Registrar acceso !OK
|
||||||
|
}
|
||||||
|
|
||||||
|
return auth;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
BIN
src/login_dlg.~ddp
Normal file
BIN
src/login_dlg.~ddp
Normal file
Binary file not shown.
192
src/login_dlg.~dfm
Normal file
192
src/login_dlg.~dfm
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
object login: Tlogin
|
||||||
|
Left = 346
|
||||||
|
Top = 452
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'Login...'
|
||||||
|
ClientHeight = 188
|
||||||
|
ClientWidth = 368
|
||||||
|
Color = clBlack
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clCream
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 20
|
||||||
|
object Image1: TImage
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 140
|
||||||
|
Height = 171
|
||||||
|
AutoSize = True
|
||||||
|
Picture.Data = {
|
||||||
|
0A544A504547496D616765360B0000FFD8FFE000104A46494600010101006000
|
||||||
|
600000FFDB004300100B0C0E0C0A100E0D0E1211101318281A18161618312325
|
||||||
|
1D283A333D3C3933383740485C4E404457453738506D51575F626768673E4D71
|
||||||
|
797064785C656763FFDB0043011112121815182F1A1A2F634238426363636363
|
||||||
|
6363636363636363636363636363636363636363636363636363636363636363
|
||||||
|
63636363636363636363636363FFC000110800AB008C03012200021101031101
|
||||||
|
FFC4001B00010002030101000000000000000000000004050203060107FFC400
|
||||||
|
3810000202010203060306040701000000000102000311042105123113224151
|
||||||
|
6171068191142332B1C1D13342A1F0152452536272E1A2FFC400190101000301
|
||||||
|
010000000000000000000000000102030405FFC4001F11010100020202030100
|
||||||
|
00000000000000000102110321123104415132FFDA000C03010002110311003F
|
||||||
|
00F9FC44D9452F7B854192606B8C1F29714E968A46E058DE39E93785ABFDA4C7
|
||||||
|
B4ADCA274A0C1F28C1F29D07253FED27D20D74FF00B49F48F386942A8CC70A09
|
||||||
|
32751C1F5570C84C0F59D0697455D54FDA6DA9517C36DCC36A19CEDB2F801276
|
||||||
|
85159C0F548B9001F632BEDA9EA6C3A9067566E5AF1CEC067A64CC751453ADAB
|
||||||
|
0D827C1846C727126DBC3350B714084F919B2BE17CCEA86E50E4E3946FBC9101
|
||||||
|
11AC6E55193270E1BCA076D6046233CBE32C74BA3A74E01049DC9761D420EA47
|
||||||
|
B9DA6A50755AB24E143B16623A28F1FA091B15BAAD13E9D55FF1237469167577
|
||||||
|
D696E86E0D9E66516227FA17A0FE93956186224C1E44440F40C9C0975A7A0514
|
||||||
|
2A8D9DC65BDBCA57F0DA85BAB50DF846E65A35773317C0DCCAE5749918F2E3A1
|
||||||
|
199B16BCF423EB3C146A361D9F5F59B129D42824D2481EB31B57D3D1564EDF9C
|
||||||
|
99C2B86BEBB882D5CA7913769A74696A5C0D9537CC4E9B40BFE1BF0EEAF5E7F8
|
||||||
|
966CA4FAED270EE97D28F8BEA56ED59AA9FE0D5DD5F5F332228C2938CE0749A4
|
||||||
|
1DF324D1CA56D66CE2BA99C63CF181F9CD6B2B7EDE7F87EAFB137332A2B6F927
|
||||||
|
73FF00920D01B9D9C12C876383D7D62ED6EAAFAFB27BDD90ED82662A8B532AD4
|
||||||
|
E49C6FFB48EC8DF5E2BED3524EC830A0F8B1E9F4EB3CE1F5611EECE1F3D9D5FF
|
||||||
|
0062376F90C9FA46B68353F6639B9970187FCBC7F69219151574F9014028CE3E
|
||||||
|
B637E43E50B691B53605A404C8ED7C3CAB1F87EA72665A3A94540D99FBDC96C7
|
||||||
|
5158EBF53B4D079B5BADC7E00E703C9547EC24E27EEC15CAF698E5F4AC7E11F3
|
||||||
|
3BFCA4A1A175B6D7A8B5AC4C2D87BC08E83C87B0951AED29ADBB44EF56DB8227
|
||||||
|
425681A7B15BCB3BF5CF84F6AD357F61297216E61CC7CC7944A9D391893788E8
|
||||||
|
4E96CCA9E6ADB706429642CF82AFDEBB792CBDE501401BE7ACA4E0A7F8ABE240
|
||||||
|
FCC4BE423233E739F9BDB5C3D36D6A4104E3CA6F15E141F01B4D28E07286DB0D
|
||||||
|
93372B0EC8F97319CF5A466C9F76B939E624CB1F89CFD9BE1CD1E99760E413F2
|
||||||
|
19FD657B05EEC9DF1B9FF2DA11E1BFE4274707DA9C9F4E44493A5601DD08CF69
|
||||||
|
5B20F7236FEA2470265CB91D48F51E136608EE948A50A3B35AC4961CA4041FA9
|
||||||
|
9BB466B4B56C6500D632A078B787F58C30D8A927CC78CC8291BF43E9E1098DF5
|
||||||
|
23359DA91CEEA46327F139E9FD77F948FABB02524564957FBB427A940773F369
|
||||||
|
B2A37330AD18966C853FE924609FA48B70FB5EB0269C1E4DABA81F2FEF788B5A
|
||||||
|
DDC3F4CD628000E6D43766A73D146EC7F4965AB006A855550D630407957F947F
|
||||||
|
28FD64BE11454BDB5E726AA93B3518EAA3259BE783F5947AEE25D8D96335AE4D
|
||||||
|
ADCEC8A70326109E34D450A6CD5D8A5C77869EBEF163E44F84AFD771335356AB
|
||||||
|
80CC72E3F49557F15B9F22BEE0F4904BB33E58E4E64E8B5D25F40BB4D621DD4A
|
||||||
|
F3ACE6986188F29D4E954B68C313B721FCA7316FF15BDE1099C1DC2EA4A93F88
|
||||||
|
103DE5EABE475C78CE5AA735D8AC3C0CBEED79916E5DD5FAFA1F1133E4C77DAF
|
||||||
|
8DD278B4737F7D66F4B8671B63F29522DC7B4D8B6EDD661715FC96A6DEE6E73C
|
||||||
|
A719F396FF00167DFF0006D06A17700E09F71FF93955BB62B99D15370E23F095
|
||||||
|
B4039B34E4301EC7F6335E29ADC572BB73604CC4C44CC4D5993C332990A2D650
|
||||||
|
CB53953B0217AC25A803DEC3F27748CFA79493C329A802F5D763EA33855C6140
|
||||||
|
F139F39E6A784EA1E945C8018E49073896DA0D3AE92A14D5B9FE666F1FD84CF3
|
||||||
|
E492749895AA3D8F05BEE728ACE37E41B2E4AA803E40CE078870FD5576359623
|
||||||
|
10770713B8D7BA5BC21B24F202A5B07C989FDA614DB46B34C2C41CC87BAC8DE1
|
||||||
|
173B8496C2FB7CE48C759BF4749D46A12B1E266DE2B48A75AEAA303326704A79
|
||||||
|
79B5047E1E9EA66CAAE9D174FA4755395446DFE83F4338FB0E6C63EB2EB8C6B8
|
||||||
|
D63B0ACF551CC7CE51C8812569358D43004064F1523322C49172852C19AEE5F6
|
||||||
|
6D8CCC57675054FB30946091D0CC858E3A3195F189DAF025B9C853F212C783EB
|
||||||
|
5F43AAEFA1ECEC186044E546A2D1D1CCCD35DA84208B0ED1E26DD3EAE814DE42
|
||||||
|
6F5B6EA7D26A91B47C62BBAB156A76F592B349194B908F53893A427F0DD3A387
|
||||||
|
B6C50C077541F396B5B2AAF2E30074C74FA4AAE17A9AF9CD06E420EEABEB2CB1
|
||||||
|
8F1236F94E3E6DF976B47A0AAB1E52541F21913D28194E5762082C9EA3CA62C0
|
||||||
|
72631B13D67ADDC000DBCB7992CABBBB6A6A1A6652D5DB9039467C8FE8248D0E
|
||||||
|
87EC3A76A5CF7D8E48F2F2935C9C8E61CC48F622189C72160DCBE0FF00BCD72E
|
||||||
|
5B94D234E378CE95AEE29841B1336AB269A9D8E2BAFF00FA33A2D669EBB118F6
|
||||||
|
6CAFD76F1F39C5F14BAC6BCD657915760B3A78F299456C44D45CD7DCCEC77266
|
||||||
|
B889A208888088880888809E8761FCC6791036D173D772B2939067D134B7769A
|
||||||
|
5A6D6C86B101DB7DFA6E27CE2B38B149F39F44D162FD2E9BB307BE800037E9B4
|
||||||
|
C39FF94C48E52775DCF9A1DFE919CB750C7A7919E354F5FE35618F113C160200
|
||||||
|
60187AF59C6B3D077F6D883B1F9420E56392727A89E8C153CAD9F47FDE787600
|
||||||
|
312A0FFAB712462848CF87963A4E63E2BD361D751DDEFF0094E9ED7AA9C768E1
|
||||||
|
01E8C7A19C97C4BAF4D45AB554C19136C8F19BF0CBE5B4550C444EB548888088
|
||||||
|
88088880888819D201B541E999F56E014228A026084AF9B3E18F0FA9C9F94F93
|
||||||
|
A6EC009F54F85E97D2F0AA5493CD68E63EDE139FE47F0B6337567C55929D0BBB
|
||||||
|
28663B2FA4E76B73664BA679464B0DB6965F106AB75AF242A8DFD4C87A4A01A6
|
||||||
|
9A5F67D55A398FFC44E49D45EC6CFB359A74466E960E65CF53395E3BC66DAAC7
|
||||||
|
D3E9DF0BE38963F1BF16C6A8D143639072EC7A4E2598BB658E4CEBE1E3D4F2AA
|
||||||
|
5BF4DB66AEFB061AC623DE69249EB113A1522220222202222022220222206480
|
||||||
|
971CBD67D47E196B1783D4FA807BA0F2FB784F9E703466E29472A07C38D88C83
|
||||||
|
BCFA8EADD69D2851804F80E989CDF22F531FD5F09DED49AD2FA9E20A83725B27
|
||||||
|
FBFACA8F8BF881AF50B550E40AC0518973A1608FA9D737441DDF5F01384E2BA8
|
||||||
|
3A8D63B139DE57831DE5BFC4E57A45B2D7B5B99D893EB30889D6CC8888088880
|
||||||
|
8888088880888808899D2336A83E703BDF82349459A2ED0D03B60FB587F2965C
|
||||||
|
775180C89FF518FA7EF257074AB4BC26BB2A4ECD790103D48954C3ED9C492B3F
|
||||||
|
857BCDE9FD89E7E796F3B97E3693A44E337FD8782D748D99C7337E938463CCC4
|
||||||
|
9F19D17C5BADEDB58C8A7BA0E00F2139C9D7C58F8E319E57748889AAA4444044
|
||||||
|
4404444044440444404BDF8534156BB8905B9199402769453ABF8135089AF6A5
|
||||||
|
B01AC1804FBCAE76CC6D899EDD8F13B174DA4AEA5D86327DA5469DFB0D16A358
|
||||||
|
E4067CAAFCFF00F26DE3579BF50403B31E51ED2AFE25D50D2E8134CBB1037F73
|
||||||
|
38B0C77646B6E9C8EBEE37EA9DCF9C8F04E4E6277B1222202222022220222202
|
||||||
|
22202222024AE1DAA3A3D65770FE539916207616718D30D5D7A8ED39AB5C1E5F
|
||||||
|
1F6941C67899E23AA6B31852738CCAECC4A6384C6EE26DB48889741111011110
|
||||||
|
111103FFD9}
|
||||||
|
end
|
||||||
|
object lb_login: TLabel
|
||||||
|
Left = 144
|
||||||
|
Top = 8
|
||||||
|
Width = 68
|
||||||
|
Height = 20
|
||||||
|
Caption = 'Usuario:'
|
||||||
|
end
|
||||||
|
object lb_pass: TLabel
|
||||||
|
Left = 144
|
||||||
|
Top = 72
|
||||||
|
Width = 99
|
||||||
|
Height = 20
|
||||||
|
Caption = 'Contrase'#241'a:'
|
||||||
|
end
|
||||||
|
object user: TEdit
|
||||||
|
Left = 144
|
||||||
|
Top = 32
|
||||||
|
Width = 217
|
||||||
|
Height = 28
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object pass: TEdit
|
||||||
|
Left = 144
|
||||||
|
Top = 104
|
||||||
|
Width = 217
|
||||||
|
Height = 28
|
||||||
|
Color = clWhite
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
PasswordChar = 'o'
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object BitBtn1: TBitBtn
|
||||||
|
Left = 144
|
||||||
|
Top = 152
|
||||||
|
Width = 105
|
||||||
|
Height = 25
|
||||||
|
Caption = '&Cancelar'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = BitBtn1Click
|
||||||
|
Kind = bkCancel
|
||||||
|
end
|
||||||
|
object BitBtn2: TBitBtn
|
||||||
|
Left = 256
|
||||||
|
Top = 152
|
||||||
|
Width = 105
|
||||||
|
Height = 25
|
||||||
|
Caption = '&Aceptar'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -16
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 3
|
||||||
|
Kind = bkOK
|
||||||
|
end
|
||||||
|
end
|
37
src/login_dlg.~h
Normal file
37
src/login_dlg.~h
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef login_dlgH
|
||||||
|
#define login_dlgH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include <Buttons.hpp>
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <jpeg.hpp>
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class Tlogin : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TImage *Image1;
|
||||||
|
TLabel *lb_login;
|
||||||
|
TLabel *lb_pass;
|
||||||
|
TEdit *user;
|
||||||
|
TEdit *pass;
|
||||||
|
TBitBtn *BitBtn1;
|
||||||
|
TBitBtn *BitBtn2;
|
||||||
|
void __fastcall BitBtn1Click(TObject *Sender);
|
||||||
|
void __fastcall FormShow(TObject *Sender);
|
||||||
|
private: // User declarations
|
||||||
|
bool __fastcall validateUserPass(AnsiString user, AnsiString pass);
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall Tlogin(TComponent* Owner);
|
||||||
|
bool auth;
|
||||||
|
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE Tlogin *login;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
88
src/tsplash.cpp
Normal file
88
src/tsplash.cpp
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#include <windows.h>
|
||||||
|
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "tsplash.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TSplash *Splash;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TSplash::TSplash(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
pressKeyToClose = false;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TSplash::GetNextSpan(PByteArray row, int SpanLeft, int *SpanRight, TColor *SpanColor, int y)
|
||||||
|
{
|
||||||
|
int column;
|
||||||
|
TColor TempColor;
|
||||||
|
|
||||||
|
column = SpanLeft;
|
||||||
|
TempColor = MaskColor(SpanLeft,y);
|
||||||
|
while ( column <= ImageMap->Width && TempColor == MaskColor(column,y) ) column = column + 1;;
|
||||||
|
|
||||||
|
*SpanRight = column - 1;
|
||||||
|
*SpanColor = TempColor;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
TColor __fastcall TSplash::MaskColor(int x,int y)
|
||||||
|
{
|
||||||
|
if ( ImageMap->Canvas->Pixels[x][y] == 0x00FF00FF ) return clFuchsia; else return clBlack;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TSplash::FormCreate(TObject *Sender)
|
||||||
|
{
|
||||||
|
int y;
|
||||||
|
PByteArray row;
|
||||||
|
HRGN YRgn;
|
||||||
|
HRGN SpanRgn;
|
||||||
|
int SpanLeft;
|
||||||
|
int SpanRight;
|
||||||
|
TColor SpanColor;
|
||||||
|
|
||||||
|
Canvas->Brush->Style = bsClear;
|
||||||
|
ImageMap = Image1->Picture->Bitmap;
|
||||||
|
WindowRgn = CreateRectRgn(0, 0, 0, 0);
|
||||||
|
for (y=0;y<ImageMap->Height;y++) {
|
||||||
|
YRgn = CreateRectRgn(0, y, 0, y);
|
||||||
|
// row = (PByteArray)ImageMap->ScanLine[y];
|
||||||
|
|
||||||
|
SpanLeft = 0;
|
||||||
|
SpanRight = 0;
|
||||||
|
do {
|
||||||
|
GetNextSpan(row, SpanLeft, &SpanRight, &SpanColor,y);
|
||||||
|
if ( SpanColor != clFuchsia ) {
|
||||||
|
SpanRgn = CreateRectRgn(SpanLeft, y, SpanRight + 1, y + 1);
|
||||||
|
CombineRgn(YRgn, YRgn, SpanRgn, RGN_OR);
|
||||||
|
DeleteObject(SpanRgn);
|
||||||
|
}
|
||||||
|
SpanLeft = SpanRight + 1;
|
||||||
|
} while ( SpanRight < (ImageMap->Width-1));
|
||||||
|
CombineRgn(WindowRgn, WindowRgn, YRgn, RGN_OR);
|
||||||
|
DeleteObject(YRgn);
|
||||||
|
}
|
||||||
|
SetWindowRgn(Handle,WindowRgn,true);
|
||||||
|
DeleteObject(WindowRgn);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TSplash::FormPaint(TObject *Sender)
|
||||||
|
{
|
||||||
|
Canvas->Draw(0, 0, ImageMap);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TSplash::Image1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
if (pressKeyToClose) Close();
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
BIN
src/tsplash.ddp
Normal file
BIN
src/tsplash.ddp
Normal file
Binary file not shown.
1505
src/tsplash.dfm
Normal file
1505
src/tsplash.dfm
Normal file
File diff suppressed because it is too large
Load Diff
33
src/tsplash.h
Normal file
33
src/tsplash.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef tsplashH
|
||||||
|
#define tsplashH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <jpeg.hpp>
|
||||||
|
#include <Graphics.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TSplash : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TImage *Image1;
|
||||||
|
void __fastcall FormCreate(TObject *Sender);
|
||||||
|
void __fastcall FormPaint(TObject *Sender);
|
||||||
|
void __fastcall Image1Click(TObject *Sender);
|
||||||
|
private: // User declarations
|
||||||
|
HRGN WindowRgn;
|
||||||
|
Graphics::TBitmap *ImageMap;
|
||||||
|
void __fastcall TSplash::GetNextSpan(PByteArray row, int SpanLeft, int *SpanRight, TColor *SpanColor,int y);
|
||||||
|
TColor __fastcall TSplash::MaskColor(int x,int y);
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TSplash(TComponent* Owner);
|
||||||
|
bool pressKeyToClose;
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TSplash *Splash;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
88
src/tsplash.~cpp
Normal file
88
src/tsplash.~cpp
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include <vcl.h>
|
||||||
|
#include <windows.h>
|
||||||
|
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
|
#pragma hdrstop
|
||||||
|
|
||||||
|
#include "tsplash.h"
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#pragma package(smart_init)
|
||||||
|
#pragma resource "*.dfm"
|
||||||
|
TSplash *Splash;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
__fastcall TSplash::TSplash(TComponent* Owner)
|
||||||
|
: TForm(Owner)
|
||||||
|
{
|
||||||
|
pressKeyToClose = false;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TSplash::GetNextSpan(PByteArray row, int SpanLeft, int *SpanRight, TColor *SpanColor, int y)
|
||||||
|
{
|
||||||
|
int column;
|
||||||
|
TColor TempColor;
|
||||||
|
|
||||||
|
column = SpanLeft;
|
||||||
|
TempColor = MaskColor(SpanLeft,y);
|
||||||
|
while ( column <= ImageMap->Width && TempColor == MaskColor(column,y) ) column = column + 1;;
|
||||||
|
|
||||||
|
*SpanRight = column - 1;
|
||||||
|
*SpanColor = TempColor;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
TColor __fastcall TSplash::MaskColor(int x,int y)
|
||||||
|
{
|
||||||
|
if ( ImageMap->Canvas->Pixels[x][y] == 0x00FF00FF ) return clFuchsia; else return clBlack;
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void __fastcall TSplash::FormCreate(TObject *Sender)
|
||||||
|
{
|
||||||
|
int y;
|
||||||
|
PByteArray row;
|
||||||
|
HRGN YRgn;
|
||||||
|
HRGN SpanRgn;
|
||||||
|
int SpanLeft;
|
||||||
|
int SpanRight;
|
||||||
|
TColor SpanColor;
|
||||||
|
|
||||||
|
Canvas->Brush->Style = bsClear;
|
||||||
|
ImageMap = Image1->Picture->Bitmap;
|
||||||
|
WindowRgn = CreateRectRgn(0, 0, 0, 0);
|
||||||
|
for (y=0;y<ImageMap->Height;y++) {
|
||||||
|
YRgn = CreateRectRgn(0, y, 0, y);
|
||||||
|
// row = (PByteArray)ImageMap->ScanLine[y];
|
||||||
|
|
||||||
|
SpanLeft = 0;
|
||||||
|
SpanRight = 0;
|
||||||
|
do {
|
||||||
|
GetNextSpan(row, SpanLeft, &SpanRight, &SpanColor,y);
|
||||||
|
if ( SpanColor != clFuchsia ) {
|
||||||
|
SpanRgn = CreateRectRgn(SpanLeft, y, SpanRight + 1, y + 1);
|
||||||
|
CombineRgn(YRgn, YRgn, SpanRgn, RGN_OR);
|
||||||
|
DeleteObject(SpanRgn);
|
||||||
|
}
|
||||||
|
SpanLeft = SpanRight + 1;
|
||||||
|
} while ( SpanRight < (ImageMap->Width-1));
|
||||||
|
CombineRgn(WindowRgn, WindowRgn, YRgn, RGN_OR);
|
||||||
|
DeleteObject(YRgn);
|
||||||
|
}
|
||||||
|
SetWindowRgn(Handle,WindowRgn,true);
|
||||||
|
DeleteObject(WindowRgn);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void __fastcall TSplash::FormPaint(TObject *Sender)
|
||||||
|
{
|
||||||
|
Canvas->Draw(0, 0, ImageMap);
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void __fastcall TSplash::Image1Click(TObject *Sender)
|
||||||
|
{
|
||||||
|
if (pressKeyToClose) Close();
|
||||||
|
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
BIN
src/tsplash.~ddp
Normal file
BIN
src/tsplash.~ddp
Normal file
Binary file not shown.
1555
src/tsplash.~dfm
Normal file
1555
src/tsplash.~dfm
Normal file
File diff suppressed because it is too large
Load Diff
38
src/tsplash.~h
Normal file
38
src/tsplash.~h
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef tsplashH
|
||||||
|
#define tsplashH
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#include <Classes.hpp>
|
||||||
|
#include <Controls.hpp>
|
||||||
|
#include <StdCtrls.hpp>
|
||||||
|
#include <Forms.hpp>
|
||||||
|
#include <ExtCtrls.hpp>
|
||||||
|
#include <jpeg.hpp>
|
||||||
|
#include <Graphics.hpp>
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
class TSplash : public TForm
|
||||||
|
{
|
||||||
|
__published: // IDE-managed Components
|
||||||
|
TImage *Image1;
|
||||||
|
TLabel *Label1;
|
||||||
|
TEdit *Edit1;
|
||||||
|
TEdit *Edit2;
|
||||||
|
TLabel *Label2;
|
||||||
|
TButton *Button1;
|
||||||
|
void __fastcall FormCreate(TObject *Sender);
|
||||||
|
void __fastcall FormPaint(TObject *Sender);
|
||||||
|
void __fastcall Image1Click(TObject *Sender);
|
||||||
|
private: // User declarations
|
||||||
|
HRGN WindowRgn;
|
||||||
|
Graphics::TBitmap *ImageMap;
|
||||||
|
void __fastcall TSplash::GetNextSpan(PByteArray row, int SpanLeft, int *SpanRight, TColor *SpanColor,int y);
|
||||||
|
TColor __fastcall TSplash::MaskColor(int x,int y);
|
||||||
|
public: // User declarations
|
||||||
|
__fastcall TSplash(TComponent* Owner);
|
||||||
|
bool pressKeyToClose;
|
||||||
|
};
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
extern PACKAGE TSplash *Splash;
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
#endif
|
11
tipoServicios.csv
Normal file
11
tipoServicios.csv
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
id,nombre,
|
||||||
|
1,Hogar,
|
||||||
|
2,Acc.Individual,
|
||||||
|
3,Vida Riesgo,
|
||||||
|
4,Comercio,
|
||||||
|
5,Decesos,
|
||||||
|
6,Ret.Carnet,
|
||||||
|
7,Pyme,
|
||||||
|
8,Autos,
|
||||||
|
9,Jubilaci<EFBFBD>n,
|
||||||
|
10,Salud,
|
|
Reference in New Issue
Block a user