From df862da7f594f21c4ef19505745f2cdbe6e564c0 Mon Sep 17 00:00:00 2001 From: matteo Date: Wed, 6 Sep 1995 15:44:06 +0000 Subject: [PATCH] Aggiunta la prima versione dell'oggetto cliente, serve solo per compilare git-svn-id: svn://10.65.10.50/trunk@1791 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ve/tclifor.cpp | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ ve/tclifor.h | 46 +++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100755 ve/tclifor.cpp create mode 100755 ve/tclifor.h diff --git a/ve/tclifor.cpp b/ve/tclifor.cpp new file mode 100755 index 000000000..1bb1796b6 --- /dev/null +++ b/ve/tclifor.cpp @@ -0,0 +1,79 @@ +#ifndef __TCLIFOR_H +#include "tclifor.h" +#endif + +#ifndef __VEUML1_H +#include "veuml1.h" +#endif + +TCliFor::TCliFor( ) : TRelation( LF_CLIFO ) +{ + add( LF_CFVEN, "TIPOCF=TIPOCF|CODCF=CODCF" ); +} + +void TCliFor::load( const char tipocf, const long codcf ) +{ + _tipocf = tipocf; + _codcf = codcf; + zero( ); + curr( ).put( "TIPOCF", tipocf ); + curr( ).put( "CODCF", codcf ); + read( ); +} + +const TString& TCliFor::get( const int file, const TString& fieldname ) +{ + return lfile( file ).get( fieldname ); +} + +int TCliFor::get_int( const int file, const TString& fieldname ) +{ + return lfile( file ).get_int( fieldname ); +} + +long TCliFor::get_long( const int file, const TString& fieldname ) +{ + return lfile( file ).get_long( fieldname ); +} + +bool TCliFor::get_bool( const int file, const TString& fieldname ) +{ + return lfile( file ).get_bool( fieldname ); +} + +void TCliForVendite::set_mask( TMask* mask ) +{ + _mask = mask; +}; + +void TCliForVendite::update_mask( ) +{ + TMask& m = *_mask; + + // Setta i campi che appartengono al file LF_CLIFO + + if ( occasionale ( ) ) + { + } + else + { + if( m.id2pos( F_RAGSOC ) >= 0 ) + m.set( F_RAGSOC, get( LF_CLIFO, "RAGSOC" ) ); + if( m.id2pos( F_INDCF ) >= 0 ) + m.set( F_INDCF, get( LF_CLIFO, "INDCF" ) ); + if( m.id2pos( F_CIVCF ) >= 0 ) + m.set( F_CIVCF, get( LF_CLIFO, "CIVCF" ) ); + if( m.id2pos( F_STATOPAIVA ) >= 0 ) + m.set( F_STATOPAIVA, get( LF_CLIFO, "STATOPAIVA" ) ); + if( m.id2pos( F_LOCALITACF ) >= 0 ) + m.set( F_LOCALITACF, get( LF_CLIFO, "LOCALITACF" ) ); + if( m.id2pos( F_CAPCF ) >= 0 ) + m.set( F_CAPCF, get( LF_CLIFO, "CAPCF" ) ); + if( m.id2pos( F_COMCF ) >= 0 ) + m.set( F_COMCF, get( LF_CLIFO, "COMCF" ) ); + if( m.id2pos( F_PROVCOM ) >= 0 ) + m.set( F_PROVCOM, get( LF_CLIFO, "PROVCOM" ) ); + if( m.id2pos( F_STATOCF ) >= 0 ) + m.set( F_STATOCF, get( LF_CLIFO, "STATOCF" ) ); + } +} \ No newline at end of file diff --git a/ve/tclifor.h b/ve/tclifor.h new file mode 100755 index 000000000..34b7efaf3 --- /dev/null +++ b/ve/tclifor.h @@ -0,0 +1,46 @@ +#ifndef __TCLIFOR_H +#define __TCLIFOR_H + +#ifndef __CHECKS_H +#include +#endif + +#ifndef __RELATION_H +#include +#endif + +#ifndef __MASK_H +#include +#endif + +class TCliFor : public TRelation +{ + private: + + char _tipocf; + long _codcf; + + public: + + TCliFor( ); + void load( const char tipocf, const long codcf ); + 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 TRUE; }; +}; + +class TCliForVendite : public TCliFor +{ + private: + + TMask * _mask; + + public: + + void set_mask( TMask* mask ); + void update_mask( ); +}; + +#endif