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
This commit is contained in:
parent
3a0384a62d
commit
df862da7f5
79
ve/tclifor.cpp
Executable file
79
ve/tclifor.cpp
Executable file
@ -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" ) );
|
||||||
|
}
|
||||||
|
}
|
46
ve/tclifor.h
Executable file
46
ve/tclifor.h
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
#ifndef __TCLIFOR_H
|
||||||
|
#define __TCLIFOR_H
|
||||||
|
|
||||||
|
#ifndef __CHECKS_H
|
||||||
|
#include <checks.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __RELATION_H
|
||||||
|
#include <relation.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MASK_H
|
||||||
|
#include <mask.h>
|
||||||
|
#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
|
Loading…
x
Reference in New Issue
Block a user