90 lines
3.3 KiB
C++
90 lines
3.3 KiB
C++
//---------------------------------------------------------------------------
|
|
|
|
#include <vcl.h>
|
|
#pragma hdrstop
|
|
|
|
#include "SAT.h"
|
|
#include "TPV_SATprint.h"
|
|
//---------------------------------------------------------------------------
|
|
#pragma package(smart_init)
|
|
#pragma resource "*.dfm"
|
|
TSATform *SATform;
|
|
//---------------------------------------------------------------------------
|
|
__fastcall TSATform::TSATform(TComponent* Owner)
|
|
: TForm(Owner)
|
|
{
|
|
TabSheet2->TabVisible = false;
|
|
TabSheet1->TabVisible = false;
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall TSATform::Button2Click(TObject *Sender)
|
|
{
|
|
Close();
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
void __fastcall TSATform::Button1Click(TObject *Sender)
|
|
{
|
|
TabSheet1->TabVisible = true;
|
|
PageControl1->ActivePage = TabSheet1;
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
|
|
void __fastcall TSATform::Button3Click(TObject *Sender)
|
|
{
|
|
// Imprimimos el parte...
|
|
AnsiString SN = AnsiString( ((double)TDateTime::CurrentTime()) );
|
|
TForm3 *Printing;
|
|
Printing = new TForm3(this);
|
|
Printing->QRLabel9->Caption= "Nº de Recogida: " + SN;
|
|
Printing->Fecha->Caption = DateToStr(Date()) + " - " + SN;
|
|
Printing->Nombre->Caption = "Nombre: " + Nombre->Text;
|
|
Printing->Dir1->Caption = "Dirección: " +Dir1->Text;
|
|
Printing->Dir2->Caption = Dir2->Text;
|
|
Printing->Telefono->Caption = "Teléfono: " + Tlf1->Text + " - " + Tlf2->Text;
|
|
Printing->email->Caption = "e-Mail: " + email->Text;
|
|
Printing->QRMemo1->Lines = Memo1->Lines;
|
|
|
|
Printing->CPU->Caption = "CPU: " + ComboBox1->Text + " - " + CPUmhz->Text;
|
|
Printing->RAM->Caption = "RAM: " + ComboBox2->Text;
|
|
Printing->HD->Caption = "HD: " + ComboBox3->Text + " - " + ComboBox4->Text;
|
|
Printing->VIDEO->Caption = "Video: " + TVideo->Text + " (" + ComboBox5->Text + ")";
|
|
|
|
Printing->CD->Caption = (CheckBox1->Checked ? AnsiString("CD") : AnsiString(""))+
|
|
(CheckBox3->Checked ? AnsiString(", CDRW") : AnsiString(""))+
|
|
(CheckBox4->Checked ? AnsiString(", DVD") : AnsiString(""))+
|
|
(CheckBox6->Checked ? AnsiString("+ Desc") : AnsiString(""));
|
|
Printing->TSonido->Caption = (CheckBox2->Checked ? AnsiString("Tarjeta de Sonido") : AnsiString(""));
|
|
Printing->TTV->Caption = (CheckBox5->Checked ? AnsiString("Tarjeta Sintonizadora") : AnsiString(""));
|
|
Printing->TRED->Caption = (CheckBox7->Checked ? AnsiString("Tarjeta de Red") : AnsiString(""));
|
|
|
|
|
|
Printing->QuickRep1->Print();
|
|
delete Printing;
|
|
TabSheet2->TabVisible = true;
|
|
PageControl1->ActivePage = TabSheet2;
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
|
|
void __fastcall TSATform::NombreKeyPress(TObject *Sender, char &Key)
|
|
{
|
|
if ( Key == VK_RETURN )
|
|
Dir1->SetFocus();
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
|
|
void __fastcall TSATform::Dir1KeyPress(TObject *Sender, char &Key)
|
|
{
|
|
if ( Key == VK_RETURN )
|
|
Tlf1->SetFocus();
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
void __fastcall TSATform::Tlf1KeyPress(TObject *Sender, char &Key)
|
|
{
|
|
if ( Key == VK_RETURN )
|
|
email->SetFocus();
|
|
}
|
|
//---------------------------------------------------------------------------
|
|
|