First commit 14/02/1999
This commit is contained in:
121
TpvProductosPrint1.cpp
Normal file
121
TpvProductosPrint1.cpp
Normal file
@ -0,0 +1,121 @@
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "TpvProductosPrint1.h"
|
||||
#include "TpvRefQRs.h"
|
||||
#include "TpvRefQRc.h"
|
||||
#include "TpvRefBarras.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
TInformesProducto *InformesProducto;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TInformesProducto::TInformesProducto(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TInformesProducto::RadioButton1Click(TObject *Sender)
|
||||
{
|
||||
try {
|
||||
Image1 -> Picture -> LoadFromFile( "systm\\IProd_s.bmp" );
|
||||
} catch(...) {
|
||||
ShowMessage("No es posible cargar el archivo.\nTpvProductosPrint1.cpp\nTOKRightDlg::RadioButton1Click" );
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TInformesProducto::RadioButton2Click(TObject *Sender)
|
||||
{
|
||||
try {
|
||||
Image1 -> Picture -> LoadFromFile( "systm\\IProd_c.bmp" );
|
||||
} catch(...) {
|
||||
ShowMessage("No es posible cargar el archivo.\nTpvProductosPrint1.cpp\nTOKRightDlg::RadioButton1Click" );
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TInformesProducto::RadioButton3Click(TObject *Sender)
|
||||
{
|
||||
try {
|
||||
Image1 -> Picture -> LoadFromFile( "systm\\IProd_b.bmp" );
|
||||
} catch(...) {
|
||||
ShowMessage("No es posible cargar el archivo.\nTpvProductosPrint1.cpp\nTOKRightDlg::RadioButton1Click" );
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TInformesProducto::OKBtnClick(TObject *Sender)
|
||||
{
|
||||
if ( RadioButton1 -> Checked )
|
||||
{
|
||||
TRefQR *RefQRs;
|
||||
// Creamos una ficha del tipo TProductos
|
||||
// Guardando la referencia en la variable TProductos
|
||||
RefQRs = new TRefQR(this);
|
||||
// Mostrarla como modal y seg<65>n el valor devuelto
|
||||
#ifdef DEBUG
|
||||
RefQRs -> QuickRep1 -> Preview();
|
||||
#else
|
||||
RefQRs -> QuickRep1 -> Print();
|
||||
#endif
|
||||
// Destruimos la ficha
|
||||
delete RefQRs;
|
||||
} else
|
||||
if ( RadioButton2 -> Checked )
|
||||
{
|
||||
TRefQRc *RefQRc;
|
||||
// Creamos una ficha del tipo TProductos
|
||||
// Guardando la referencia en la variable TProductos
|
||||
RefQRc = new TRefQRc(this);
|
||||
// Mostrarla como modal y seg<65>n el valor devuelto
|
||||
#ifdef DEM001
|
||||
ShowMessage( "Esta funci<63>n ha sido deshabilitada para esta versi<73>n.\nPongase en contacto con el autor, si desea\nel m<>dulo correspondiente: Jose-David.Guillen@cs.us.es" );
|
||||
#else
|
||||
#ifdef DEBUG
|
||||
RefQRc -> QuickRep1 -> Preview();
|
||||
#else
|
||||
RefQRc -> QuickRep1 -> Print();
|
||||
#endif
|
||||
#endif
|
||||
// Destruimos la ficha
|
||||
delete RefQRc;
|
||||
} else
|
||||
if ( RadioButton3 -> Checked )
|
||||
{
|
||||
TRefBarras *RefBarras;
|
||||
// Creamos una ficha del tipo TProductos
|
||||
// Guardando la referencia en la variable TProductos
|
||||
RefBarras = new TRefBarras(this);
|
||||
// Mostrarla como modal y seg<65>n el valor devuelto
|
||||
#ifdef DEM001
|
||||
ShowMessage( "Esta funci<63>n ha sido deshabilitada para esta versi<73>n.\nPongase en contacto con el autor, si desea\nel m<>dulo correspondiente: Jose-David.Guillen@cs.us.es" );
|
||||
#else
|
||||
RefBarras ->QuickRep1-> Preview();
|
||||
#endif
|
||||
// Destruimos la ficha
|
||||
delete RefBarras;
|
||||
} else {
|
||||
#ifdef DEM001
|
||||
ShowMessage( "Esta funci<63>n ha sido deshabilitada para esta versi<73>n.\nPongase en contacto con el autor, si desea\nel m<>dulo correspondiente: Jose-David.Guillen@cs.us.es" );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TInformesProducto::FormShow(TObject *Sender)
|
||||
{
|
||||
try {
|
||||
Image1 -> Picture -> LoadFromFile( "systm\\IProd_s.bmp" );
|
||||
} catch(...) {
|
||||
ShowMessage("No es posible cargar el archivo.\nTpvProductosPrint1.cpp\nTOKRightDlg::RadioButton1Click" );
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TInformesProducto::CancelBtnClick(TObject *Sender)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user