//--------------------------------------------------------------------- #include #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ú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ún el valor devuelto #ifdef DEM001 ShowMessage( "Esta función ha sido deshabilitada para esta versió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ún el valor devuelto #ifdef DEM001 ShowMessage( "Esta función ha sido deshabilitada para esta versió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ón ha sido deshabilitada para esta versió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(); } //---------------------------------------------------------------------------