Corrazzioni alla conversione

git-svn-id: svn://10.65.10.50/trunk@2559 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1996-02-05 14:50:57 +00:00
parent 92b5b6e8a4
commit e8ea9f39ec
2 changed files with 40 additions and 12 deletions

View File

@ -539,6 +539,7 @@ void TManutenzione_app::update_dir()
prefix().set("");
d.get(i, _nolock, _nordir, _sysdirop);
bool is_firm = d.is_firm();
bool to_create = (is_com ? d.is_com() : d.is_firm());
TString desc(d.des());
TString s(d.name());
bool towrite = FALSE;
@ -582,21 +583,23 @@ void TManutenzione_app::update_dir()
}
}
else
{
remove(d.filename());
TToken_string idx_names;
get_idx_names(i, idx_names);
for (const char * idx_name = idx_names.get(); idx_name != NULL; idx_name = idx_names.get())
remove(idx_name);
d.get(i, _nolock, _nordir, _sysdirop);
d.eod() = 0L;
d.eox() = 0L;
d.put(i, _nordir, _sysdirop);
{
if (to_create)
{
remove(d.filename());
TToken_string idx_names;
get_idx_names(i, idx_names);
for (const char * idx_name = idx_names.get(); idx_name != NULL; idx_name = idx_names.get())
remove(idx_name);
d.get(i, _nolock, _nordir, _sysdirop);
d.eod() = 0L;
d.eox() = 0L;
d.put(i, _nordir, _sysdirop);
}
}
}
}
d.get(i, _nolock, _nordir, _sysdirop);
bool to_create = (is_com ? d.is_com() : d.is_firm());
if (to_create)
{
TDir d1;

View File

@ -340,7 +340,32 @@ void TRec_sheet::edit()
in >> *_rec;
nfields = _rec->fields();
f1.reset();
for (i = 0; i < nfields; i++) f1.row(i) = _rec->fielddef(i);
for (int i = 0; i < nfields; i++)
{
f1.row(i) = _rec->fielddef(i);
if (_descr)
f1.row(i).add(_descr->get(_rec->rec()->Fd[i].Name));
else
f1.row(i).add("");
const TFieldtypes type = (TFieldtypes) f1.row(i).get_int(1);
switch (type)
{
case _datefld :
case _wordfld :
case _charfld :
case _boolfld :
case _memofld:
f1.disable_cell(i, 2);
case _alfafld :
case _intfld :
case _longfld :
case _intzerofld :
case _longzerofld:
f1.disable_cell(i, 3);
default:
break;
}
}
nkeys = _rec->keys();
f2.reset();
for (i = 0; i < nkeys; i++) f2.row(i) = _rec->keydef(i);