campo-sirio/include/modtbapp.cpp
guy 81534d006f Patch level : 10.0
Files correlati     : tutti
Ricompilazione Demo : [ ]
Commento            :
0001213: mappa di login, fuoco
Lla mappa di login si apre ma per poter digitare la password bisogna cliccare sul campo col mouse. Stesso problema richiamando le ricerche, per esempio quella clienti.


git-svn-id: svn://10.65.10.50/trunk@18591 c028cbd2-c16b-5b4b-a496-9718f37d4682
2009-03-23 15:16:49 +00:00

83 lines
1.7 KiB
C++
Executable File

#include <execp.h>
#include <modtbapp.h>
#include <tabmod.h>
// @cmember Richiede la maschera da usare
TMask* TTable_module_application::get_mask(int)
{
CHECK(_msk, "Null mask");
return _msk;
}
// @cmember Ritorna la relazione da modificare
TRelation* TTable_module_application::get_relation() const
{
CHECK(_rel, "Null relation");
return _rel;
}
void TTable_module_application::print()
{
const TModule_table& tab = (const TModule_table&)file();
TString16 cmd;
cmd << tab.module() << "1 -0 " << tab.name();
TExternal_app stampa(cmd);
stampa.run();
}
bool TTable_module_application::protected_record(TRectype& rec)
{
return rec.get_bool("FPC");
}
TMask* TTable_module_application::user_create_mask()
{
TModule_table& tab = (TModule_table&)file();
TString16 name = tab.module();
if (tab.customer() > 0)
{
TString8 c;
c.format("%06ld", tab.customer());
name << c;
}
name << "tb" << tab.name();
return new TMask(name);
}
bool TTable_module_application::user_create()
{
if (argc() < 3)
return false;
TString4 tabname;
tabname.strncpy(argv(2), 4);
tabname.upper();
if (tabname[0] != '&')
tabname.insert("&"); // Forza la tabella di modulo
_rel = new TRelation(tabname);
_msk = user_create_mask();
TFilename rep = _msk->source_file().name();
const int tb = rep.find("tb");
if (tb > 0)
rep.overwrite("st", tb);
if (rep.custom_path())
{
enable_menu_item(M_FILE_PREVIEW);
enable_menu_item(M_FILE_PRINT);
}
TString title;
_msk->get_caption(title);
set_title(title);
return true;
}
bool TTable_module_application::user_destroy()
{
if (_msk) delete _msk;
if (_rel) delete _rel;
return true;
}