62 lines
1.7 KiB
C++
Executable File
62 lines
1.7 KiB
C++
Executable File
#ifndef __TCLIFOR_H
|
|
#define __TCLIFOR_H
|
|
|
|
#ifndef __CHECKS_H
|
|
#include <checks.h>
|
|
#endif
|
|
|
|
#ifndef __RELATION_H
|
|
#include <relation.h>
|
|
#endif
|
|
|
|
#ifndef __TABUTIL_H
|
|
#include <tabutil.h>
|
|
#endif
|
|
|
|
|
|
#ifndef __MASK_H
|
|
#include <mask.h>
|
|
#endif
|
|
|
|
class TCliFor : public TRelation
|
|
{
|
|
private:
|
|
|
|
char _tipocf;
|
|
long _codcf;
|
|
TTable* _table;
|
|
TString16 _tablename;
|
|
|
|
TMask _occas_mask;
|
|
|
|
public:
|
|
|
|
TCliFor( );
|
|
void load( const char tipocf, const long codcf );
|
|
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 );
|
|
bool occasionale( ){ return get_bool( LF_CLIFO, "OCCAS" ); };
|
|
TMask& occas_mask( ){ return _occas_mask; };
|
|
static bool occas_code_handler(TMask_field& f, KEY key);
|
|
bool present( TMask& m, const int mskfield ){ return ( m.id2pos( mskfield ) >= 0 ); }
|
|
void set( TMask& m, const int mskfield, const int file, const TString& filefield ){ set( m, mskfield, get( file, filefield ) ); };
|
|
void set( TMask& m, const int mskfield, const TString& value );
|
|
void show( TMask& m, const int mskfield, const bool show = TRUE ){ if( present( m, mskfield ) ) m.show( mskfield, show ); };
|
|
void hide( TMask& m, const int mskfield ){ show( m, mskfield, FALSE ); };
|
|
int write_occas( );
|
|
void edita_occasionale( );
|
|
|
|
};
|
|
|
|
class TCliForVendite : public TCliFor
|
|
{
|
|
public:
|
|
|
|
void update_mask( TMask& m );
|
|
};
|
|
|
|
#endif
|