67 lines
2.0 KiB
C++
67 lines
2.0 KiB
C++
//---------------------------------------------------------------------------
|
|
#include <vcl\vcl.h>
|
|
#pragma hdrstop
|
|
|
|
#include "articulos.h"
|
|
//---------------------------------------------------------------------------
|
|
#pragma resource "*.dfm"
|
|
TForm2 *Form2;
|
|
//---------------------------------------------------------------------------
|
|
__fastcall TForm2::TForm2(TComponent* Owner)
|
|
: TForm(Owner)
|
|
{
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall TForm2::Button6Click(TObject *Sender)
|
|
{
|
|
Panel3->Caption = "Busca Artículo";
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall TForm2::Button1Click(TObject *Sender)
|
|
{
|
|
Panel3->Caption = "Crea Artículo";
|
|
Table1->Edit();
|
|
Table1->Insert();
|
|
DBEdit1->SetFocus();
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall TForm2::Button2Click(TObject *Sender)
|
|
{
|
|
Panel3->Caption = "Modifica Artículo";
|
|
Table1->Edit();
|
|
Table1->Post();
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall TForm2::Button3Click(TObject *Sender)
|
|
{
|
|
Panel3->Caption = "Borra Artículo";
|
|
Table1->Edit();
|
|
Table1->Delete();
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall TForm2::Button4Click(TObject *Sender)
|
|
{
|
|
int registro;
|
|
Panel3->Caption = "Siguiente Artículo";
|
|
Table1->Next();
|
|
registro = Table1->RecNo;
|
|
Label3->Caption = registro;
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall TForm2::Button5Click(TObject *Sender)
|
|
{
|
|
int registro;
|
|
Panel3->Caption = "Anterior Artículo";
|
|
Table1->Prior();
|
|
registro = Table1->RecNo;
|
|
Label3->Caption = registro;
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall TForm2::FormActivate(TObject *Sender)
|
|
{
|
|
int registro;
|
|
registro = Table1->RecNo;
|
|
Label3->Caption = registro;
|
|
}
|
|
//---------------------------------------------------------------------------
|