campo-sirio/ve/tclifor.h
guy 5ca00d943d Continua il clamoroso lavoro di sviluppo della librerie delle vendite
git-svn-id: svn://10.65.10.50/trunk@3347 c028cbd2-c16b-5b4b-a496-9718f37d4682
1996-08-08 15:57:44 +00:00

66 lines
1.6 KiB
C++
Executable File

#ifndef __TCLIFOR_H
#define __TCLIFOR_H
#ifndef __RELATION_H
#include <relation.h>
#endif
#ifndef __VARMASK_H
#include <varmask.h>
#endif
class TData_picker : public TRelation
{
public:
TData_picker( const int mainfile ) : TRelation ( mainfile ) { }
virtual ~TData_picker() {}
const TString& get( const TString& table, const TString& codtab, const TString& field );
const TString& get( const int file, const TString& fieldname );
int get_int( const int file, const TString& fieldname );
long get_long( const int file, const TString& fieldname );
bool get_bool( const int file, const TString& fieldname );
void set( TMask& m, const int mskfield, const int file, const TString& filefield ){ m.set( mskfield, get( file, filefield ) ); };
};
class TCliFor : public TData_picker
{
private:
bool _occas;
TMask _occas_mask;
bool _valid;
protected:
char _tipocf;
long _codcf;
public:
TCliFor( );
bool load( const char tipocf, const long codcf, const TString& ocfpi );
bool occasionale( ){ return get_bool( LF_CLIFO, "OCCAS" ); };
TMask& occas_mask( ){ return _occas_mask; };
static bool occas_code_handler(TMask_field& f, KEY key);
int write_occas( );
void edita_occasionale( );
char tipocf( ){ return _tipocf; }
long codcf( ){ return _codcf; }
bool ok() { return _valid;}
};
class TCliForVendite : public TCliFor
{
public:
void update_mask( TMask& m, bool onload = FALSE );
void imposta_dati_comune( TMask& m );
void imposta_valuta( TMask& m );
void imposta_indirizzo_spedizione( TMask& m );
void imposta_sconto_testa( TMask& m );
};
#endif