Patch level : 10 ha
Files correlati : Ricompilazione Demo : [ ] Commento : file che non serve piu avendo fatto hacnvlib git-svn-id: svn://10.65.10.50/branches/R_10_00@21242 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
96de826dbc
commit
7d8701029d
251
ha/hacnv100.h
251
ha/hacnv100.h
@ -1,251 +0,0 @@
|
||||
#ifndef __HACNV100_H
|
||||
#define __HACNV100_H
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef __DICTION_H
|
||||
#include <diction.h>
|
||||
#endif
|
||||
|
||||
#ifndef __ISAM_H
|
||||
#include <isam.h>
|
||||
#endif
|
||||
|
||||
#ifndef __ODBCRECSET_H
|
||||
#include <odbcrset.h>
|
||||
#endif
|
||||
|
||||
#ifndef __PROGIND_H
|
||||
class TProgind;
|
||||
#endif
|
||||
|
||||
#ifndef __MODAUT_H
|
||||
#include <modaut.h>
|
||||
#endif
|
||||
|
||||
#ifndef __CLIFOR_H
|
||||
#include "../ve/clifor.h"
|
||||
#endif
|
||||
|
||||
#include "../ve/velib.h"
|
||||
|
||||
class THardy_log;
|
||||
class TCache_th;
|
||||
|
||||
class THardy_transfer : public TObject
|
||||
{
|
||||
TString _query_header;
|
||||
THardy_log* _log;
|
||||
TConfig _config;
|
||||
|
||||
TRecordset* _recset;
|
||||
bool _write_enabled;
|
||||
TODBC_recordset* _outset;
|
||||
TCache_th* _tab;
|
||||
|
||||
protected:
|
||||
const TString& build_insert_query(const char* table, const char* f, const char* v) const;
|
||||
|
||||
TRecordset& create_recordset(const char* query);
|
||||
long odbc_exec(const char* command);
|
||||
|
||||
const TString& decode_value(const char* tab, const TString& field_value);
|
||||
const TString& decode_field(const char* tab, const char* recset_field);
|
||||
|
||||
THardy_transfer();
|
||||
virtual bool trasferisci() pure;
|
||||
void aggiorna_record(TRectype& rec, const TString_array& lista_campi);
|
||||
|
||||
public:
|
||||
void init(const char* rh, const char* qh, THardy_log& log);
|
||||
const TString& title() const;
|
||||
TConfig& config() { return _config; }
|
||||
const TString& query_header() const { return _query_header; }
|
||||
|
||||
void log(const char* msg, int sev = 0) const;
|
||||
bool log_error(const char* msg);
|
||||
bool log_cancelled();
|
||||
const TRecordset& recordset() const;
|
||||
TRecordset& recordset();
|
||||
|
||||
const TString& get_str(const char* campo) const; // Get string from current recordset
|
||||
const TString& get_real_str(const char* campo) const; // Get eventually empty string from numeric field
|
||||
long get_long(const char* campo) const;
|
||||
|
||||
bool write_enabled() const { return _write_enabled; }
|
||||
|
||||
bool test_write(TBaseisamfile& file);
|
||||
|
||||
virtual ~THardy_transfer();
|
||||
};
|
||||
|
||||
class THardy_iterator
|
||||
{
|
||||
THardy_transfer* _ht;
|
||||
TProgind* _pi;
|
||||
TRecnotype _rec;
|
||||
|
||||
public:
|
||||
bool ok() const;
|
||||
bool cancelled() const;
|
||||
THardy_iterator& operator=(TRecnotype n);
|
||||
THardy_iterator& operator++();
|
||||
operator int() const { return ok(); }
|
||||
|
||||
THardy_iterator(THardy_transfer* ht);
|
||||
~THardy_iterator();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Cache generica per il trasferimento
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TCache_th : public TCache
|
||||
{
|
||||
THardy_transfer* _ht;
|
||||
|
||||
protected:
|
||||
void log(const char* msg, int sev) const { _ht->log(msg, sev); }
|
||||
bool test_write(TBaseisamfile& file) const { return _ht->test_write(file); }
|
||||
const TRecordset& recordset() const { return _ht->recordset(); }
|
||||
TConfig& config() const { return _ht->config(); }
|
||||
const TString& query_header() const { return _ht->query_header(); }
|
||||
|
||||
public:
|
||||
const TString& get_str(const char* campo) const { return _ht->get_str(campo); }
|
||||
const TString& get_real_str(const char* campo) const { return _ht->get_real_str(campo); }
|
||||
long get_long(const char* campo) const { return _ht->get_long(campo); }
|
||||
virtual const TString& decode(const TToken_string& tokens) pure;
|
||||
|
||||
TCache_th(THardy_transfer* ht) : _ht(ht) {}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Trasferimenti veri e propri
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class THardy_pag : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_iva : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_catmerc : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_catfisc : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_ban : public THardy_transfer
|
||||
{
|
||||
protected:
|
||||
bool trasferisci_abi();
|
||||
bool trasferisci_cab();
|
||||
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_caucont : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_caumag : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_um : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_art : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_pcon : public THardy_transfer
|
||||
{
|
||||
protected:
|
||||
bool trasferisci_gruppi();
|
||||
bool trasferisci_conti();
|
||||
bool trasferisci_sottoconti();
|
||||
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_clienti : public THardy_transfer
|
||||
{
|
||||
protected:
|
||||
bool is_piva_doppia(const long codcf);
|
||||
int get_next_key_indsped(const char tipocf, const long codcf) const;
|
||||
bool trasferisci_clienti();
|
||||
bool trasferisci_destinazioni();
|
||||
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_fornitori : public THardy_transfer
|
||||
{
|
||||
protected:
|
||||
long key2forn(const TString& key) const;
|
||||
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_agenti : public THardy_transfer
|
||||
{
|
||||
protected:
|
||||
const TString& get_codage(const TString& key) const;
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_listini : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_contratti : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_movcont : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
class THardy_moviva : public THardy_transfer
|
||||
{
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
};
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user