First commit 16/08/1996

This commit is contained in:
2021-09-12 19:50:38 +02:00
commit 0f24b3477e
129 changed files with 10926 additions and 0 deletions

131
Builder/agenda/Agenda.cpp Normal file
View File

@ -0,0 +1,131 @@
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "Agenda.h"
#include "bdiario.h"
#include "diario.h"
#include "dos.h"
#include "listado.h"
#include "recuerda.h"
#include "telefonos.h"
//---------------------------------------------------------------------------
#pragma link "Grids"
#pragma resource "*.dfm"
int dia;
AnsiString fecha;
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Salir1Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Introducir2Click(TObject *Sender)
{
TForm2 *Telefonos;
Telefonos = new TForm2(this);
Telefonos->ShowModal();
delete Telefonos;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Creditos2Click(TObject *Sender)
{
ShowMessage("Programa Realizado por OGA");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ListaClick(TObject *Sender)
{
TForm5 *Listado;
Listado = new TForm5(this);
Listado->ShowModal();
delete Listado;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Introducir3Click(TObject *Sender)
{
TForm3 *Recordatorio;
Recordatorio = new TForm3(this);
Recordatorio->ShowModal();
delete Recordatorio;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Vertodos1Click(TObject *Sender)
{
Table1->Refresh();
Panel1->Visible=true;
DBGrid1->Visible=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormActivate(TObject *Sender)
{
TLocateOptions relacion;
relacion << loPartialKey;
int dia;
int mes;
int ano;
struct date d;
getdate(&d);
dia = d.da_day;
mes = d.da_mon;
ano = d.da_year;
fecha = AnsiString(dia) + '/' + AnsiString(mes) + '/' + AnsiString(ano);
if (Table1->Locate("Fecha", fecha ,relacion) == true)
{
Label1->Visible=true;
Panel1->Visible=true;
Panel1->Caption=Table1->FieldValues["Recordatorio"];
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::DBGrid1KeyPress(TObject *Sender, char &Key)
{
DBGrid1->Visible=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Panel1->Visible=false;
DBGrid1->Visible=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Introducir1Click(TObject *Sender)
{
TForm6 *Diario;
Diario = new TForm6(this);
Diario->ShowModal();
delete Diario;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::PorFecha1Click(TObject *Sender)
{
TForm7 *BDiario;
BDiario = new TForm7(this);
BDiario->Label1->Caption = "Introduzca Fecha:";
BDiario->Edit1->Visible=true;
BDiario->DBEdit1->Visible=false;
BDiario->DBMemo1->Clear();
dia=1;
BDiario->ShowModal();
delete BDiario;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::TodaAgenda1Click(TObject *Sender)
{
TForm7 *BDiario;
BDiario = new TForm7(this);
BDiario->Label1->Caption = "Fecha";
BDiario->Edit1->Visible=false;
BDiario->DBEdit1->Visible=true;
dia=2;
BDiario->ShowModal();
delete BDiario;
}
//---------------------------------------------------------------------------

BIN
Builder/agenda/Agenda.dfm Normal file

Binary file not shown.

66
Builder/agenda/Agenda.h Normal file
View File

@ -0,0 +1,66 @@
//---------------------------------------------------------------------------
#ifndef AgendaH
#define AgendaH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\Menus.hpp>
#include <vcl\ExtCtrls.hpp>
#include <vcl\DBGrids.hpp>
#include "Grids.hpp"
#include <vcl\DB.hpp>
#include <vcl\DBTables.hpp>
#include <Db.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TMainMenu *MainMenu1;
TMenuItem *Diario1;
TMenuItem *Telfonos1;
TMenuItem *Recordatorios1;
TMenuItem *Archivo1;
TMenuItem *Introducir1;
TMenuItem *Visualizar1;
TMenuItem *Introducir2;
TMenuItem *Lista;
TMenuItem *PorFecha1;
TMenuItem *TodaAgenda1;
TMenuItem *Salir1;
TMenuItem *Creditos2;
TMenuItem *Introducir3;
TMenuItem *Vertodos1;
TPanel *Panel1;
TLabel *Label1;
TDBGrid *DBGrid1;
TButton *Button1;
TDataSource *DataSource1;
TTable *Table1;
void __fastcall Salir1Click(TObject *Sender);
void __fastcall Introducir2Click(TObject *Sender);
void __fastcall Creditos2Click(TObject *Sender);
void __fastcall ListaClick(TObject *Sender);
void __fastcall Introducir3Click(TObject *Sender);
void __fastcall Vertodos1Click(TObject *Sender);
void __fastcall FormActivate(TObject *Sender);
void __fastcall DBGrid1KeyPress(TObject *Sender, char &Key);
void __fastcall Button1Click(TObject *Sender);
void __fastcall Introducir1Click(TObject *Sender);
void __fastcall PorFecha1Click(TObject *Sender);
void __fastcall TodaAgenda1Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern int dia;
extern AnsiString fecha;
extern TForm1 *Form1;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,28 @@
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USEFORM("Agenda.cpp", Form1);
USERES("Agendas.res");
USEFORM("Recuerda.cpp", Form3);
USEFORM("busqueda.cpp", Form4);
USEFORM("telefonos.cpp", Form2);
USEFORM("listado.cpp", Form5);
USEFORM("diario.cpp", Form6);
USEFORM("bdiario.cpp", Form7);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->CreateForm(__classid(TForm1), &Form1);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
return 0;
}
//---------------------------------------------------------------------------

144
Builder/agenda/Agendas.dsk Normal file
View File

@ -0,0 +1,144 @@
[MainWindow]
Create=1
Visible=1
State=0
Left=0
Top=0
Width=1027
Height=111
MaxLeft=-1
MaxTop=-1
ClientWidth=1019
ClientHeight=60
[PropertyInspector]
Create=1
Visible=1
State=0
Left=0
Top=113
Width=414
Height=502
MaxLeft=-1
MaxTop=-1
ClientWidth=406
ClientHeight=473
SplitPos=199
[ProjectManager]
LargeButtons=1
[Closed Files]
File_0=SourceModule,'L:\Programaci<63>n (-CBuilder-)\TpvWin\WebWizard\WebWizard.cpp',0,1,169,3,181,0,1
File_1=SourceModule,'L:\Programaci<63>n (-CBuilder-)\TAlarcon\TAlarconFichas.cpp',0,1,1,1,1,0,0
File_2=SourceModule,'L:\Programaci<63>n (-CBuilder-)\TAlarcon\TAlarcon.cpp',0,1,235,1,247,0,0
File_3=SourceModule,'L:\Programaci<63>n (-CBuilder-)\TAlarcon\TAlarconRegLlamadasSIMPLE.cpp',0,1,1,1,1,0,0
File_4=SourceModule,'L:\Programaci<63>n (-CBuilder-)\TAlarcon\TAlarconRegLlamadas.cpp',0,1,1,1,1,0,0
File_5=SourceModule,'L:\Programaci<63>n (-CBuilder-)\TAlarcon\LSPrecios2.cpp',0,1,1,12,2,0,0
[Modules]
Module0=C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\telefonos.cpp
Module1=C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\diario.cpp
Module2=J:\CBuilder3\Projects\ProjectGroup1.bpg
Module3=C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\Agendas.mak
Module4=C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\Agenda.cpp
Module5=C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\Recuerda.cpp
Count=6
EditWindowCount=1
[C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\telefonos.cpp]
ModuleType=SourceModule
FormState=1
FormOnTop=1
[C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\diario.cpp]
ModuleType=SourceModule
FormState=1
FormOnTop=0
[J:\CBuilder3\Projects\ProjectGroup1.bpg]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\Agendas.mak]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\Agenda.cpp]
ModuleType=SourceModule
FormState=3
FormOnTop=0
[C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\Recuerda.cpp]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[EditWindow0]
Create=1
Visible=1
State=0
Left=317
Top=258
Width=640
Height=376
MaxLeft=-1
MaxTop=-1
ClientWidth=632
ClientHeight=347
SplitPos=50
MessagePane=0
ViewCount=5
CurrentView=1
View0=0
View1=1
View2=2
View3=3
View4=4
[View0]
Module=C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\Agenda.cpp
CursorX=22
CursorY=106
TopLine=92
LeftCol=1
[View1]
Module=C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\diario.cpp
CursorX=52
CursorY=62
TopLine=56
LeftCol=1
[View2]
Module=C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\Agendas.cpp
CursorX=69
CursorY=4
TopLine=1
LeftCol=1
[View3]
Module=C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\telefonos.cpp
CursorX=1
CursorY=18
TopLine=15
LeftCol=1
[View4]
Module=C:\program\SRC_DOS\VARIOS\OSCAR\Builder\agenda\diario.h
CursorX=1
CursorY=1
TopLine=1
LeftCol=1
[Breakpoints]
Count=0
[AddressBreakpoints]
Count=0
[Watches]
Count=0

BIN
Builder/agenda/Agendas.exe Normal file

Binary file not shown.

View File

@ -0,0 +1,94 @@
# ---------------------------------------------------------------------------
VERSION = BCB.03
# ---------------------------------------------------------------------------
!ifndef BCB
BCB = $(MAKEDIR)\..
!endif
# ---------------------------------------------------------------------------
PROJECT = Agendas.exe
OBJFILES = Agendas.obj Agenda.obj Recuerda.obj busqueda.obj telefonos.obj \
listado.obj diario.obj bdiario.obj
RESFILES = Agendas.res
RESDEPEN = $(RESFILES) Agenda.dfm Recuerda.dfm busqueda.dfm telefonos.dfm \
listado.dfm diario.dfm bdiario.dfm
LIBFILES =
LIBRARIES = vcldbx35.lib vcldb35.lib vclx35.lib vcl35.lib
SPARELIBS = vcl35.lib vclx35.lib vcldb35.lib vcldbx35.lib
PACKAGES =
PATHASM = .;
PATHCPP = .;
PATHPAS = .;
PATHRC = .;
DEBUGLIBPATH = $(BCB)\lib\debug
RELEASELIBPATH = $(BCB)\lib\release
DEFFILE =
# ---------------------------------------------------------------------------
CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx
CFLAG2 = -I$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl -H=$(BCB)\lib\vcld.csm
CFLAG3 =
PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \
-U$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \
-I$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl -$Y -$W -$O- -v -JPHNV -M
RFLAGS = -i$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl
AFLAGS = /i$(BCB)\projects /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zd
LFLAGS = -L$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) -aa -Tpe -x -v
IFLAGS =
LINKER = ilink32
# ---------------------------------------------------------------------------
ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES)
ALLRES = $(RESFILES)
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
# ---------------------------------------------------------------------------
.autodepend
!ifdef IDEOPTIONS
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=3082
CodePage=1252
[Debugging]
DebugSourceDirs=
[Parameters]
RunParams=
HostApplication=
!endif
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
$(BCB)\BIN\$(LINKER) @&&!
$(LFLAGS) +
$(ALLOBJ), +
$(PROJECT),, +
$(ALLLIB), +
$(DEFFILE), +
$(ALLRES)
!
.pas.hpp:
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
.pas.obj:
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
.cpp.obj:
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
.c.obj:
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
.rc.res:
$(BCB)\BIN\brcc32 $(RFLAGS) $<
#-----------------------------------------------------------------------------

BIN
Builder/agenda/Agendas.res Normal file

Binary file not shown.

55
Builder/agenda/RS.mak Normal file
View File

@ -0,0 +1,55 @@
# ---------------------------------------------------------------------------
VERSION = BCB.01
# ---------------------------------------------------------------------------
!ifndef BCB
BCB = $(MAKEDIR)\..
!endif
# ---------------------------------------------------------------------------
PROJECT = RS.exe
OBJFILES = RS.obj R.obj
RESFILES = RS.res
RESDEPEN = $(RESFILES) R.dfm
LIBFILES =
DEFFILE =
# ---------------------------------------------------------------------------
CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x
CFLAG2 = -I$(BCB)\include;$(BCB)\include\vcl -H=$(BCB)\lib\vcld.csm
PFLAGS = -U$(BCB)\lib\obj;$(BCB)\lib -I$(BCB)\include;$(BCB)\include\vcl \
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \
-$Y -$W -$O- -JPHNV -M
RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl
LFLAGS = -L$(BCB)\lib\obj;$(BCB)\lib -aa -Tpe -x -v -V4.0
IFLAGS =
LINKER = ilink32
# ---------------------------------------------------------------------------
ALLOBJ = c0w32.obj $(OBJFILES)
ALLRES = $(RESFILES)
ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib
# ---------------------------------------------------------------------------
.autodepend
$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
$(BCB)\BIN\$(LINKER) @&&!
$(LFLAGS) +
$(ALLOBJ), +
$(PROJECT),, +
$(ALLLIB), +
$(DEFFILE), +
$(ALLRES)
!
.pas.hpp:
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
.pas.obj:
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
.cpp.obj:
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
.c.obj:
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
.rc.res:
$(BCB)\BIN\brcc32 $(RFLAGS) $<
#-----------------------------------------------------------------------------

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,85 @@
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "busqueda.h"
#include "Recuerda.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TForm3 *Form3;
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button1Click(TObject *Sender)
{
Table1->Post();
Table1->Insert();
DBEdit1->SetFocus();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button5Click(TObject *Sender)
{
Table1->Prior();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button2Click(TObject *Sender)
{
Table1->Edit();
Table1->Delete();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button4Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::FormKeyPress(TObject *Sender, char &Key)
{
if (Key=='\r')
Table1->Next();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button3Click(TObject *Sender)
{
TForm4 *Busqueda;
Busqueda = new TForm4(this);
busca = 2;
Busqueda->Table1->TableName = "recordatorio.db";
Busqueda->Table1->Active=true;
Busqueda->ShowModal();
delete Busqueda;
Table1->First();
Table1->MoveBy(direccion);
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button6Click(TObject *Sender)
{
Table1->Next();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::FormClose(TObject *Sender, TCloseAction &Action)
{
if(Table1->State == dsInsert && Table1->Modified == true)
{
switch(MessageBox(Handle,"No guard<72> los datos <20>Desea Guardarlos?", "Atenci<EFBFBD>n" ,MB_YESNOCANCEL))
{
case 6:
Table1->Post();
break;
default:
Table1->Cancel();
break;
}
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::FormCreate(TObject *Sender)
{
Table1->Insert();
}
//---------------------------------------------------------------------------

BIN
Builder/agenda/Recuerda.dfm Normal file

Binary file not shown.

52
Builder/agenda/Recuerda.h Normal file
View File

@ -0,0 +1,52 @@
//---------------------------------------------------------------------------
#ifndef RecuerdaH
#define RecuerdaH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\DBCtrls.hpp>
#include <vcl\Mask.hpp>
#include <vcl\DB.hpp>
#include <vcl\DBTables.hpp>
#include <vcl\ExtCtrls.hpp>
#include <Db.hpp>
//---------------------------------------------------------------------------
class TForm3 : public TForm
{
__published: // IDE-managed Components
TLabel *Label1;
TLabel *Label2;
TDBEdit *DBEdit1;
TDBEdit *DBEdit2;
TDataSource *DataSource1;
TTable *Table1;
TButton *Button1;
TButton *Button2;
TButton *Button4;
TButton *Button5;
TPanel *Panel1;
TButton *Button3;
TButton *Button6;
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button5Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall Button4Click(TObject *Sender);
void __fastcall FormKeyPress(TObject *Sender, char &Key);
void __fastcall Button3Click(TObject *Sender);
void __fastcall Button6Click(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall FormCreate(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm3(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm3 *Form3;
extern busca;
//---------------------------------------------------------------------------
#endif

BIN
Builder/agenda/agenda.MB Normal file

Binary file not shown.

BIN
Builder/agenda/agenda.PX Normal file

Binary file not shown.

BIN
Builder/agenda/agenda.db Normal file

Binary file not shown.

View File

@ -0,0 +1,41 @@
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "agenda.h"
#include "bdiario.h"
#include "diario.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TForm7 *Form7;
//---------------------------------------------------------------------------
__fastcall TForm7::TForm7(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm7::FormKeyPress(TObject *Sender, char &Key)
{
if (dia==2 && Key=='+')
Table1->Next();
if (dia==2 && Key=='-')
Table1->Prior();
}
//---------------------------------------------------------------------------
void __fastcall TForm7::FormActivate(TObject *Sender)
{
if (dia==2)
{
Table1->First();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm7::Edit1KeyPress(TObject *Sender, char &Key)
{
TLocateOptions SearchOptions;
SearchOptions << loPartialKey;
if(Key=='\r')
if(Table1->Locate("Fecha", Edit1->Text, SearchOptions)==false)
ShowMessage("Fecha no encontrada");
}
//---------------------------------------------------------------------------

BIN
Builder/agenda/bdiario.dfm Normal file

Binary file not shown.

38
Builder/agenda/bdiario.h Normal file
View File

@ -0,0 +1,38 @@
//---------------------------------------------------------------------------
#ifndef bdiarioH
#define bdiarioH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
#include <vcl\DBCtrls.hpp>
#include <vcl\DB.hpp>
#include <vcl\DBTables.hpp>
#include <vcl\Mask.hpp>
//---------------------------------------------------------------------------
class TForm7 : public TForm
{
__published: // IDE-managed Components
TPanel *Panel1;
TLabel *Label1;
TDBMemo *DBMemo1;
TDBEdit *DBEdit1;
TDataSource *DataSource1;
TTable *Table1;
TEdit *Edit1;
void __fastcall FormKeyPress(TObject *Sender, char &Key);
void __fastcall FormActivate(TObject *Sender);
void __fastcall Edit1KeyPress(TObject *Sender, char &Key);
private: // User declarations
public: // User declarations
__fastcall TForm7(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm7 *Form7;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,82 @@
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "busqueda.h"
#include "diario.h"
#include "recuerda.h"
#include "telefonos.h"
//---------------------------------------------------------------------------
#pragma link "Grids"
#pragma resource "*.dfm"
int direccion;
TForm4 *Form4;
//---------------------------------------------------------------------------
__fastcall TForm4::TForm4(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm4::ComboBox1Change(TObject *Sender)
{
Edit1->SetFocus();
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Edit1KeyPress(TObject *Sender, char &Key)
{
TLocateOptions SearchOptions;
SearchOptions << loPartialKey;
switch(busca)
{
case 0:
if(Key=='\r')
Table1->Locate("Fecha", Edit1->Text, SearchOptions);
break;
case 1:
if (ComboBox1->Text == "Nombre")
Table1->Locate("Nombre", Edit1->Text, SearchOptions);
else
Table1->Locate("Apodo", Edit1->Text, SearchOptions);
break;
case 2:
if(Key=='\r')
Table1->Locate("Fecha", Edit1->Text, SearchOptions);
break;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::FormActivate(TObject *Sender)
{
ComboBox1->Clear();
Edit1->Clear();
switch(busca)
{
case 0:
ComboBox1->Text="Fecha";
ComboBox1->Items->Add("Fecha");
break;
case 1:
ComboBox1->Text="Nombre";
ComboBox1->Items->Add("Apodo");
ComboBox1->Items->Add("Nombre");
break;
case 2:
ComboBox1->Text="Fecha";
ComboBox1->Items->Add("Fecha");
break;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm4::FormClose(TObject *Sender, TCloseAction &Action)
{
direccion = (Table1->RecNo) -1;
}
//---------------------------------------------------------------------------

BIN
Builder/agenda/busqueda.dfm Normal file

Binary file not shown.

43
Builder/agenda/busqueda.h Normal file
View File

@ -0,0 +1,43 @@
//---------------------------------------------------------------------------
#ifndef busquedaH
#define busquedaH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\DBGrids.hpp>
#include "Grids.hpp"
#include <vcl\DB.hpp>
#include <vcl\DBTables.hpp>
//---------------------------------------------------------------------------
class TForm4 : public TForm
{
__published: // IDE-managed Components
TComboBox *ComboBox1;
TLabel *Label1;
TLabel *Label2;
TDBGrid *DBGrid1;
TEdit *Edit1;
TDataSource *DataSource1;
TTable *Table1;
void __fastcall ComboBox1Change(TObject *Sender);
void __fastcall Edit1KeyPress(TObject *Sender, char &Key);
void __fastcall FormActivate(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
private: // User declarations
public: // User declarations
__fastcall TForm4(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern int direccion;
extern TForm4 *Form4;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,3 @@
del *.~*
del *.tds
del *.obj

93
Builder/agenda/diario.cpp Normal file
View File

@ -0,0 +1,93 @@
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "agenda.h"
#include "busqueda.h"
#include "diario.h"
#include "dos.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TForm6 *Form6;
int busca;
//---------------------------------------------------------------------------
__fastcall TForm6::TForm6(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm6::Button1Click(TObject *Sender)
{
Table1->FieldValues["Fecha"] = fecha;
Table1->Post();
Table1->Insert();
}
//---------------------------------------------------------------------------
void __fastcall TForm6::Button3Click(TObject *Sender)
{
Table1->Prior();
}
//---------------------------------------------------------------------------
void __fastcall TForm6::Button2Click(TObject *Sender)
{
Table1->Edit();
Table1->Delete();
}
//---------------------------------------------------------------------------
void __fastcall TForm6::Button5Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm6::Button4Click(TObject *Sender)
{
TForm4 *Busqueda;
Busqueda = new TForm4(this);
busca = 0;
Busqueda->Table1->TableName = "agenda.db";
Busqueda->Table1->Active=true;
Busqueda->ShowModal();
delete Busqueda;
Table1->First();
Table1->MoveBy(direccion);
}
//---------------------------------------------------------------------------
void __fastcall TForm6::Button6Click(TObject *Sender)
{
Table1->Next();
}
//---------------------------------------------------------------------------
void __fastcall TForm6::FormClose(TObject *Sender, TCloseAction &Action)
{
if(Table1->State == dsInsert && DBMemo1 -> Modified )
{
switch(MessageBox(Handle,"No guard<72> los datos <20>Desea Guardarlos?", "Atenci<EFBFBD>n" ,MB_YESNOCANCEL))
{
case 6:
Table1->Post();
break;
default:
Table1->Cancel();
break;
}
}
}
//---------------------------------------------------------------------------
void __fastcall TForm6::Table1NewRecord(TDataSet *DataSet)
{
/* TLocateOptions SearchOptions;
SearchOptions << loPartialKey;
if(Table1->Locate("Fecha",Table1->FieldValues["Fecha"],SearchOptions)==true)
{
ShowMessage("Esta referencia ya existe");
Table1->Cancel();
}*/
}
//---------------------------------------------------------------------------
void __fastcall TForm6::FormCreate(TObject *Sender)
{
Table1->Insert();
}
//---------------------------------------------------------------------------

BIN
Builder/agenda/diario.dfm Normal file

Binary file not shown.

58
Builder/agenda/diario.h Normal file
View File

@ -0,0 +1,58 @@
//---------------------------------------------------------------------------
#ifndef diarioH
#define diarioH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
#include <vcl\DBCtrls.hpp>
#include <vcl\DBTables.hpp>
#include <vcl\DB.hpp>
#include <vcl\Mask.hpp>
#include <Db.hpp>
//---------------------------------------------------------------------------
class TForm6 : public TForm
{
__published: // IDE-managed Components
TPanel *Panel1;
TPanel *Panel2;
TLabel *Label2;
TPanel *Panel3;
TButton *Button1;
TButton *Button2;
TButton *Button3;
TButton *Button4;
TButton *Button5;
TDBMemo *DBMemo1;
TDataSource *DataSource1;
TTable *Table1;
TDBEdit *DBEdit1;
TButton *Button6;
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button3Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall Button5Click(TObject *Sender);
void __fastcall Button4Click(TObject *Sender);
void __fastcall Button6Click(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall Table1NewRecord(TDataSet *DataSet);
void __fastcall FormCreate(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm6(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm6 *Form6;
extern busca;
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,17 @@
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "telefonos.h"
#include "listado.h"
//---------------------------------------------------------------------------
#pragma link "Grids"
#pragma resource "*.dfm"
TForm5 *Form5;
//---------------------------------------------------------------------------
__fastcall TForm5::TForm5(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------

BIN
Builder/agenda/listado.dfm Normal file

Binary file not shown.

30
Builder/agenda/listado.h Normal file
View File

@ -0,0 +1,30 @@
//---------------------------------------------------------------------------
#ifndef listadoH
#define listadoH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
#include <vcl\DBGrids.hpp>
#include "Grids.hpp"
#include <vcl\DB.hpp>
#include <vcl\DBTables.hpp>
//---------------------------------------------------------------------------
class TForm5 : public TForm
{
__published: // IDE-managed Components
TPanel *Panel1;
TPanel *Panel2;
TDBGrid *DBGrid1;
TDataSource *DataSource1;
TTable *Table1;
private: // User declarations
public: // User declarations
__fastcall TForm5(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm5 *Form5;
//---------------------------------------------------------------------------
#endif

BIN
Builder/agenda/telefonos.PX Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,82 @@
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "busqueda.h"
#include "telefonos.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button4Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button5Click(TObject *Sender)
{
Table1->Prior();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button1Click(TObject *Sender)
{
Table1->Post();
Table1->Insert();
DBEdit1->SetFocus();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button2Click(TObject *Sender)
{
Table1->Delete();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button3Click(TObject *Sender)
{
TForm4 *Busqueda;
Busqueda = new TForm4(this);
busca = 1;
Busqueda->Table1->TableName = "telefonos.db";
Busqueda->Table1->Active=true;
Busqueda->ShowModal();
delete Busqueda;
Table1->First();
Table1->MoveBy(direccion);
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button6Click(TObject *Sender)
{
Table1->Next();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FormClose(TObject *Sender, TCloseAction &Action)
{
if(Table1->State == dsInsert && Table1->Modified == true)
{
switch(MessageBox(Handle,"No guard<72> los datos <20>Desea Guardarlos?", "Atenci<EFBFBD>n" ,MB_YESNOCANCEL))
{
case 6:
Table1->Post();
break;
default:
Table1->Cancel();
break;
}
}
else
{
Table1->Cancel();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FormCreate(TObject *Sender)
{
Table1->Insert();
}
//---------------------------------------------------------------------------

BIN
Builder/agenda/telefonos.db Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,69 @@
//---------------------------------------------------------------------------
#ifndef telefonosH
#define telefonosH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
#include <vcl\DB.hpp>
#include <vcl\DBTables.hpp>
#include <vcl\DBCtrls.hpp>
#include <vcl\Mask.hpp>
#include <Db.hpp>
//---------------------------------------------------------------------------
class TForm2 : public TForm
{
__published: // IDE-managed Components
TPanel *Panel1;
TPanel *Panel2;
TLabel *Label1;
TLabel *Label2;
TLabel *Label3;
TDataSource *DataSource1;
TDBEdit *DBEdit1;
TDBEdit *DBEdit2;
TDBEdit *DBEdit3;
TPanel *Panel3;
TButton *Button1;
TButton *Button2;
TButton *Button3;
TButton *Button4;
TButton *Button5;
TTable *Table1;
TButton *Button6;
void __fastcall Button4Click(TObject *Sender);
void __fastcall Button5Click(TObject *Sender);
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall Button3Click(TObject *Sender);
void __fastcall Button6Click(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall FormCreate(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm2(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm2 *Form2;
extern busca;
//---------------------------------------------------------------------------
#endif