campo-sirio/ve/tclifor.h
alex c6e62a9f9e Modifiche al 01/02/97 per Beta4
git-svn-id: svn://10.65.10.50/trunk@4113 c028cbd2-c16b-5b4b-a496-9718f37d4682
1997-02-03 15:28:53 +00:00

65 lines
1.5 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_indirizzo_spedizione( TMask& m );
void imposta_sconto_testa( TMask& m );
void imposta_spese( TMask& m );
};
#endif