217 lines
7.4 KiB
C++
217 lines
7.4 KiB
C++
//---------------------------------------------------------------------------
|
|
#ifndef TpvProductosH
|
|
#define TpvProductosH
|
|
//---------------------------------------------------------------------------
|
|
#include <Classes.hpp>
|
|
#include <Controls.hpp>
|
|
#include <StdCtrls.hpp>
|
|
#include <Forms.hpp>
|
|
#include <ComCtrls.hpp>
|
|
#include <DBCtrls.hpp>
|
|
#include <ExtCtrls.hpp>
|
|
#include <DBTables.hpp>
|
|
#include <DB.hpp>
|
|
#include <DBGrids.hpp>
|
|
#include "Grids.hpp"
|
|
#include <Mask.hpp>
|
|
#include <Buttons.hpp>
|
|
#include <Menus.hpp>
|
|
#include <Db.hpp>
|
|
#include "TDlgBuscar.h"
|
|
#include "ElastFrm.hpp"
|
|
#include <Dialogs.hpp>
|
|
#include <ExtDlgs.hpp>
|
|
#include <ImgList.hpp>
|
|
#include <jpeg.hpp>
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
class TProductos : public TForm
|
|
{
|
|
__published: // IDE-managed Components
|
|
TStatusBar *StatusBar1;
|
|
TDBGrid *DBGrid1;
|
|
TDataSource *InfoProductos;
|
|
TTreeView *Indices;
|
|
TPopupMenu *PopupMenu1;
|
|
TMenuItem *SubFamilia;
|
|
TMenuItem *Familia;
|
|
TMenuItem *Eliminar;
|
|
TImageList *ImageList1;
|
|
TPanel *Panel2;
|
|
TSpeedButton *SpeedButton4;
|
|
TSpeedButton *SpeedButton5;
|
|
TSpeedButton *SpeedButton6;
|
|
TSpeedButton *BusqAnt;
|
|
TSpeedButton *BuscarFicha;
|
|
TSpeedButton *BusqSig;
|
|
TSpeedButton *SpeedButton11;
|
|
TDBNavigator *DBNavigator1;
|
|
TTable *TbProductos;
|
|
TEdit *Edit1;
|
|
TTable *TbProdInfC;
|
|
TElasticForm *ElasticForm1;
|
|
TAutoIncField *TbProductosForcedIndex;
|
|
TIntegerField *TbProductosCdigodeBarras;
|
|
TStringField *TbProductosIDProducto;
|
|
TIntegerField *TbProductosFamilia;
|
|
TIntegerField *TbProductosFamilia2;
|
|
TSmallintField *TbProductosEsNodo;
|
|
TStringField *TbProductosNombredelProducto;
|
|
TFloatField *TbProductosCantUnitaria;
|
|
TCurrencyField *TbProductosPrecioCosto;
|
|
TFloatField *TbProductosIVA;
|
|
TCurrencyField *TbProductosPrecioVenta1;
|
|
TFloatField *TbProductosCantidVenta1;
|
|
TCurrencyField *TbProductosPrecioVenta2;
|
|
TFloatField *TbProductosCantidVenta2;
|
|
TCurrencyField *TbProductosPrecioVenta3;
|
|
TFloatField *TbProductosCantidVenta3;
|
|
TCurrencyField *TbProductosPrecioVenta4;
|
|
TFloatField *TbProductosCantidVenta4;
|
|
TCurrencyField *TbProductosPrecioVenta5;
|
|
TFloatField *TbProductosCantidVenta5;
|
|
TFloatField *TbProductosStockActual;
|
|
TBooleanField *TbProductosCOMBINADO;
|
|
TIntegerField *TbProductosStockMinimo;
|
|
TIntegerField *TbProductosProveedorActual;
|
|
TFloatField *TbProductosIVACosto;
|
|
TStringField *TbProductosLocalizacion;
|
|
TSmallintField *TbProductosEnviarA;
|
|
TBooleanField *TbProductosSeguimiento;
|
|
TTable *TbSeguimiento;
|
|
TTable *TbProductosC;
|
|
TDataSource *ProductosC;
|
|
TIntegerField *TbProductosCCodProdC;
|
|
TIntegerField *TbProductosCCodProdE;
|
|
TFloatField *TbProductosCCantidad;
|
|
TStringField *TbProductosCNombreProd;
|
|
TPageControl *PageControl1;
|
|
TTabSheet *TabSheet1;
|
|
TTabSheet *TabSheet2;
|
|
TLabel *Label2;
|
|
TGroupBox *ListPrecios;
|
|
TDBEdit *DBEdit11;
|
|
TDBEdit *DBEdit12;
|
|
TDBEdit *DBEdit13;
|
|
TDBEdit *DBEdit14;
|
|
TDBEdit *DBEdit16;
|
|
TDBEdit *DBEdit17;
|
|
TDBEdit *DBEdit18;
|
|
TDBEdit *DBEdit19;
|
|
TComboBox *ComboBox1;
|
|
TDBGrid *DBGrid2;
|
|
TLabel *Label1;
|
|
TDBEdit *DBEdit15;
|
|
TImage *Image1;
|
|
TLabel *Label3;
|
|
TDBEdit *DBEdit1;
|
|
TOpenPictureDialog *OpenPictureDialog1;
|
|
TStringField *TbProductosPathImagen;
|
|
TStringField *TbProductosURLinfo;
|
|
TLabel *Label4;
|
|
TDBEdit *DBEdit2;
|
|
TStringField *TbProductosFabricante;
|
|
TBevel *ImgRef;
|
|
void __fastcall TProductosIVASetText(TField *Sender, const AnsiString Text);
|
|
|
|
void __fastcall DBEdit11KeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
void __fastcall DBEdit12KeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
void __fastcall DBEdit13KeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
void __fastcall DBEdit14KeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
|
|
void __fastcall InfoProductosDataChange(TObject *Sender, TField *Field);
|
|
|
|
void __fastcall DBGrid1DrawColumnCell(TObject *Sender, const TRect &Rect,
|
|
int DataCol, TColumn *Column, TGridDrawState State);
|
|
|
|
void __fastcall DBGrid1KeyPress(TObject *Sender, char &Key);
|
|
|
|
void __fastcall SpeedButton2Click(TObject *Sender);
|
|
void __fastcall SpeedButton1Click(TObject *Sender);
|
|
void __fastcall SpeedButton3Click(TObject *Sender);
|
|
void __fastcall BusqAntClick(TObject *Sender);
|
|
void __fastcall BuscarFichaClick(TObject *Sender);
|
|
void __fastcall BusqSigClick(TObject *Sender);
|
|
void __fastcall SpeedButton7Click(TObject *Sender);
|
|
|
|
|
|
|
|
void __fastcall FamiliaClick(TObject *Sender);
|
|
void __fastcall SubFamiliaClick(TObject *Sender);
|
|
void __fastcall IndicesCollapsing(TObject *Sender, TTreeNode *Node,
|
|
bool &AllowCollapse);
|
|
void __fastcall IndicesExpanding(TObject *Sender, TTreeNode *Node,
|
|
bool &AllowExpansion);
|
|
|
|
|
|
void __fastcall EliminarClick(TObject *Sender);
|
|
void __fastcall TbProductosBeforeDelete(TDataSet *DataSet);
|
|
void __fastcall TbProductosCalcFields(TDataSet *DataSet);
|
|
void __fastcall TbProductosNewRecord(TDataSet *DataSet);
|
|
void __fastcall IndicesChange(TObject *Sender, TTreeNode *Node);
|
|
void __fastcall IndicesDeletion(TObject *Sender, TTreeNode *Node);
|
|
void __fastcall TbProductosAfterOpen(TDataSet *DataSet);
|
|
|
|
void __fastcall IndicesEdited(TObject *Sender, TTreeNode *Node, AnsiString &S);
|
|
|
|
|
|
|
|
void __fastcall DBEdit16KeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
void __fastcall DBEdit17KeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
void __fastcall DBEdit18KeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
void __fastcall DBEdit19KeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
|
|
|
|
|
|
|
void __fastcall IndicesDragDrop(TObject *Sender, TObject *Source, int X, int Y);
|
|
void __fastcall IndicesDragOver(TObject *Sender, TObject *Source, int X, int Y,
|
|
TDragState State, bool &Accept);
|
|
|
|
|
|
|
|
|
|
void __fastcall DBGrid1CellClick(TColumn *Column);
|
|
|
|
void __fastcall DBGrid2DblClick(TObject *Sender);
|
|
|
|
|
|
void __fastcall TbProductosCAfterDelete(TDataSet *DataSet);
|
|
|
|
void __fastcall DBGrid1Exit(TObject *Sender);
|
|
void __fastcall DBGrid1Enter(TObject *Sender);
|
|
void __fastcall DBGrid2Enter(TObject *Sender);
|
|
void __fastcall TbProductosCantUnitariaChange(TField *Sender);
|
|
void __fastcall TbProductosPrecioCostoChange(TField *Sender);
|
|
void __fastcall TbProductosPrecioVenta1Change(TField *Sender);
|
|
void __fastcall TbProductosCAfterInsert(TDataSet *DataSet);
|
|
void __fastcall TbProductosIVASetText(TField *Sender,
|
|
const AnsiString Text);
|
|
void __fastcall Image1DblClick(TObject *Sender);
|
|
void __fastcall TabSheet2Show(TObject *Sender);
|
|
void __fastcall TbProductosPrecioCostoSetText(TField *Sender,
|
|
const AnsiString Text);
|
|
void __fastcall TbProductosPrecioVenta1SetText(TField *Sender,
|
|
const AnsiString Text);
|
|
private: // User declarations
|
|
Graphics::TBitmap *BtmOK; // Imagen OK!
|
|
|
|
TDlgBuscar *DlgBuscar; // Dialogo de busquedas
|
|
|
|
void CambiaEstadoCombinados(void);
|
|
int __fastcall TProductos::NuevoHeredero( TTreeNode *Padre, bool EsHijo );
|
|
void __fastcall TProductos::ActualizaHistorico(void);
|
|
public: // User declarations
|
|
__fastcall TProductos(TComponent* Owner);
|
|
|
|
bool AArbol; // Bandera para mostrar o no el mensaje de que esta apunto
|
|
// de borrar un producto ( INDICE )
|
|
};
|
|
//---------------------------------------------------------------------------
|
|
extern TProductos *Productos;
|
|
//---------------------------------------------------------------------------
|
|
|
|
#endif
|