First commit 16/08/1996
This commit is contained in:
82
Builder/agenda/telefonos.cpp
Normal file
82
Builder/agenda/telefonos.cpp
Normal 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();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
Reference in New Issue
Block a user