ImpDEx/Main.h
2021-09-12 22:10:49 +02:00

137 lines
4.8 KiB
C++

//---------------------------------------------------------------------------
#ifndef MainH
#define MainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Db.hpp>
#include <DBGrids.hpp>
#include <DBTables.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include <Dialogs.hpp>
#include <Menus.hpp>
#include <ComCtrls.hpp>
#include <ToolWin.hpp>
#include <ImgList.hpp>
#include <Graphics.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TDataSource *DsImp;
TTable *TbImp;
TOpenDialog *OpenDialog1;
TStringField *TbImpidS;
TStringField *TbImpDescS;
TCurrencyField *TbImpPVD;
TIntegerField *TbImpstatus;
TIntegerField *TbImpidT;
TIntegerField *TbImpDescT;
TTable *TbDatosT;
TStringField *TbImpdescr;
TCurrencyField *TbImpPVDa;
TCurrencyField *TbImpinc;
TCurrencyField *TbImpnewPVP;
TCurrencyField *TbImpPVP;
TMainMenu *MainMenu1;
TMenuItem *Archivo1;
TMenuItem *Acercade1;
TMenuItem *Cargarasociaciones1;
TMenuItem *NuevaAsociacion1;
TMenuItem *CargarDatosacotejar1;
TMenuItem *N1;
TMenuItem *Salir1;
TMenuItem *Ver1;
TMenuItem *BarradeHerramientas1;
TMenuItem *BarradeEstado1;
TStatusBar *StatusBar1;
TCoolBar *CoolBar1;
TToolBar *ToolBar1;
TToolButton *ToolButton1;
TImageList *ImageList1;
TToolButton *ToolButton2;
TToolButton *ToolButton3;
TToolButton *ToolButton4;
TToolButton *ToolButton5;
TToolButton *ToolButton6;
TToolButton *ToolButton7;
TMenuItem *Ejecutar1;
TMenuItem *ConfigurarImportacin1;
TMenuItem *FusionarNuevosdatos1;
TPageControl *PageControl1;
TTabSheet *TabSheet1;
TTabSheet *TabSheet2;
TDBGrid *DBGrid1;
TComboBox *ComboBox2;
TComboBox *ComboBox1;
TLabel *Label1;
TLabel *Label2;
TComboBox *ComboBox3;
TComboBox *ComboBox4;
TCheckBox *anuevos;
TCheckBox *viudos;
TLabel *Label3;
TLabel *Label4;
TLabel *Label5;
TBevel *Bevel1;
TBevel *Bevel2;
TEdit *FileToImport;
TToolButton *ToolButton8;
TSaveDialog *SaveDialog1;
TLabel *AsociacionActual;
TBevel *Bevel3;
TLabel *Label6;
TLabel *Label7;
TLabel *Label8;
TLabel *Label9;
TLabel *Label10;
TLabel *Label11;
TImage *DsO;
TImage *OsD;
TShape *Shape1;
TMenuItem *N2;
TMenuItem *FiltrarporAsociados1;
TMenuItem *FiltrarporNoAsociados1;
TMenuItem *VersoloNOAsociados1;
void __fastcall TbImpBeforeOpen(TDataSet *DataSet);
void __fastcall TbImpCalcFields(TDataSet *DataSet);
void __fastcall Salir1Click(TObject *Sender);
void __fastcall Acercade1Click(TObject *Sender);
void __fastcall BarradeEstado1Click(TObject *Sender);
void __fastcall BarradeHerramientas1Click(TObject *Sender);
void __fastcall ToolButton1Click(TObject *Sender);
void __fastcall ConfigurarImportacin1Click(TObject *Sender);
void __fastcall CargarDatosacotejar1Click(TObject *Sender);
void __fastcall NuevaAsociacion1Click(TObject *Sender);
void __fastcall Cargarasociaciones1Click(TObject *Sender);
void __fastcall DBGrid1DrawColumnCell(TObject *Sender,
const TRect &Rect, int DataCol, TColumn *Column,
TGridDrawState State);
void __fastcall FusionarNuevosdatos1Click(TObject *Sender);
void __fastcall VersoloNOAsociados1Click(TObject *Sender);
void __fastcall FiltrarporNoAsociados1Click(TObject *Sender);
void __fastcall FiltrarporAsociados1Click(TObject *Sender);
private: // User declarations
void __fastcall MergeImport( AnsiString Fich );
bool __fastcall DecoCampos( char *datos,
int posID, AnsiString &ID,
int posDesc, AnsiString &Desc,
int posPVD, Currency &PVD );
bool __fastcall ObtenCampo( char *datos, int pos, char *dest );
bool __fastcall EliminaCaracter( char *datos, char c );
public: // User declarations
__fastcall TForm1(TComponent* Owner);
AnsiString BaseDir, ImpName;
void __fastcall SaveCFG( AnsiString DB );
void __fastcall LoadDataBase( AnsiString DB );
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif