//--------------------------------------------------------------------------- #include #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ó los datos ¿Desea Guardarlos?", "Atención" ,MB_YESNOCANCEL)) { case 6: Table1->Post(); break; default: Table1->Cancel(); break; } } } //--------------------------------------------------------------------------- void __fastcall TForm3::FormCreate(TObject *Sender) { Table1->Insert(); } //---------------------------------------------------------------------------