campo-sirio/sc/sc2101.cpp
guy 2fc3b68c9d Corretto asterisco di salvo buon fine
git-svn-id: svn://10.65.10.50/trunk@2367 c028cbd2-c16b-5b4b-a496-9718f37d4682
1995-12-29 11:58:43 +00:00

59 lines
1.2 KiB
C++
Executable File

#include <prefix.h>
#include "sc2101.h"
#include "sc2100a.h"
#include <comuni.h>
TEC_mask::TEC_mask(const char* name) : TSelection_mask(name), _ditta(LF_NDITTE)
{
_ditta.add(LF_ANAG, "TIPOA==TIPOA|CODANAGR==CODANAGR");
_ditta.add(LF_COMUNI, "COM==COMRF(COMRES)", 1, LF_ANAG, 101);
_ditta.add(LF_COMUNI, "COM==COMRES", 1, LF_ANAG, 102);
}
TEC_mask::~TEC_mask()
{
}
void TEC_mask::on_firm_change()
{
TMask::on_firm_change();
_ditta[0].put("CODDITTA", prefix().get_codditta());
if (_ditta.read() == NOERR)
{
const int alias = _ditta[LF_ANAG].get_char("TIPOA") == 'F' ? -101 : -102;
set(F_LUOGOSEND, _ditta.lfile(alias).get("DENCOM"));
}
}
void TEC_mask::start_run()
{
on_firm_change();
}
const char* TEC_mask::get_prof_base() const
{
return BASE_EC_PROFILE;
}
const TString& TEC_mask::get_prof_code() const
{
return get(F_CODPROF);
}
const TString& TEC_mask::get_prof_lang() const
{
return get(F_LINPROF);
}
const char* TEC_mask::get_prof_name() const
{
TFixed_string tmp(__tmp_string, 16);
tmp = get_prof_code();
tmp << get_prof_lang();
return __tmp_string;
}