Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Migliorato controllo errori e gestito utente GUEST in DEBUG git-svn-id: svn://10.65.10.50/trunk@7049 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
76d7579132
commit
1c13f8586c
@ -24,6 +24,8 @@ int main(int argc,char** argv)
|
||||
ba1700(argc,argv); break;
|
||||
case 7:
|
||||
ba1800(argc,argv); break;
|
||||
case 8:
|
||||
ba1900(argc,argv); break;
|
||||
default:
|
||||
ba1100(argc,argv); break; // Manutenzione
|
||||
}
|
||||
|
1
ba/ba1.h
1
ba/ba1.h
@ -9,6 +9,7 @@ int ba1500(int argc, char** argv);
|
||||
int ba1600(int argc, char* argv[]);
|
||||
int ba1700(int argc, char* argv[]);
|
||||
int ba1800(int argc, char* argv[]);
|
||||
int ba1900(int argc, char* argv[]);
|
||||
|
||||
#endif // __BA1_H
|
||||
|
||||
|
@ -337,8 +337,11 @@ bool TManutenzione_app::create() // initvar e arrmask
|
||||
#endif
|
||||
load_des();
|
||||
|
||||
|
||||
#ifdef DBG
|
||||
const bool superprassi = user() == "PRASSI" || user() == "GUEST";
|
||||
#else
|
||||
const bool superprassi = user() == "PRASSI";
|
||||
#endif
|
||||
_mask = new TMask ("ba1100a");
|
||||
_browse = new TDir_sheet ("Manutenzione file di sistema", superprassi ? 0xC : 0x8);
|
||||
|
||||
@ -502,11 +505,15 @@ const char* TManutenzione_app::dumpfilename(const FileDes& dep) const
|
||||
|
||||
void TManutenzione_app::edit_riga (const TString& name)
|
||||
{
|
||||
TExternisamfile* f = new TExternisamfile(name);
|
||||
TFilename n(name);
|
||||
KEY tasto;
|
||||
const TFilename n(name);
|
||||
TExternisamfile* f = new TExternisamfile(n);
|
||||
|
||||
#ifdef DBG
|
||||
const bool superprassi = user() == "PRASSI" || user() == "GUEST";
|
||||
#else
|
||||
const bool superprassi = user() == "PRASSI";
|
||||
#endif
|
||||
|
||||
_mask->set (FLD_NUM, "");
|
||||
_mask->set (FLD_NOME, n);
|
||||
_mask->set (FLD_EOD, f->items());
|
||||
@ -519,7 +526,8 @@ void TManutenzione_app::edit_riga (const TString& name)
|
||||
_mask->reset (F_TAB);
|
||||
_mask->disable(-1);
|
||||
_mask->enable(DLG_RECORD, superprassi);
|
||||
tasto = _mask->run();
|
||||
|
||||
KEY tasto = _mask->run();
|
||||
switch (tasto)
|
||||
{
|
||||
case K_F4:
|
||||
@ -547,7 +555,11 @@ void TManutenzione_app::edit_riga (long riga_sel, TToken_string& riga)
|
||||
TDir d;
|
||||
const int logicnum = int(riga_sel) + 1;
|
||||
|
||||
#ifdef DBG
|
||||
const bool superprassi = user() == "PRASSI" || user() == "GUEST";
|
||||
#else
|
||||
const bool superprassi = user() == "PRASSI";
|
||||
#endif
|
||||
|
||||
_mask->enable(DLG_PACK, superprassi);
|
||||
_mask->enable(DLG_RECORD, superprassi);
|
||||
@ -629,8 +641,7 @@ void TManutenzione_app::edit_riga (long riga_sel, TToken_string& riga)
|
||||
if (logicnum > 1)
|
||||
{
|
||||
TSystemisamfile f(logicnum);
|
||||
f.packfile();
|
||||
f.packindex();
|
||||
f.pack();
|
||||
//Pack supplementare tramite FOXPRO (da togliere con CodeBase 6)
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
|
||||
if (logicnum > 2 && logicnum < 6 && f.status() == NOERR)
|
||||
@ -727,7 +738,7 @@ void TManutenzione_app::delete_riga ()
|
||||
|
||||
bool TManutenzione_app::recover(TSystemisamfile& f, int err)
|
||||
{
|
||||
if (err == -60 || err == _ispatherr ||
|
||||
if (err == -60 || err == -64 || err == _ispatherr ||
|
||||
(err > -600 && err <= -300))
|
||||
{
|
||||
err = f.packindex();
|
||||
@ -1074,8 +1085,8 @@ void TManutenzione_app::convert_dir()
|
||||
if (to_create && has_module(module, CHK_DONGLE))
|
||||
{
|
||||
d.get(i);
|
||||
TFilename s(d.filename());
|
||||
if (!fexist(s))
|
||||
const TFilename s(d.filename());
|
||||
if (!s.exist() && d.len() > 0)
|
||||
{
|
||||
TSystemisamfile f(i);
|
||||
set_autoload_new_files(actual_create);
|
||||
@ -1086,7 +1097,6 @@ void TManutenzione_app::convert_dir()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TSystemisamfile f(i);
|
||||
|
||||
f.update(rs);
|
||||
@ -1418,6 +1428,9 @@ bool TManutenzione_app::menu(MENU_TAG m)
|
||||
key = 0;
|
||||
}
|
||||
|
||||
// Si assicura di chiudere tutto prima di conversioni o altro
|
||||
prefix().close_closeable_isamfiles();
|
||||
|
||||
switch (key)
|
||||
{
|
||||
case K_F6:
|
||||
|
@ -63,7 +63,7 @@ bool TEdit_file::_browse(TCursor& cursor, const TFilename& name)
|
||||
const long checked = sheet.checked();
|
||||
if (checked && yesno_box("Si desidera cancellare i %ld record indicati?", checked))
|
||||
{
|
||||
begin_wait();
|
||||
TWait_cursor hourglass;
|
||||
for (j = 0, cursor = 0; j < items; j++)
|
||||
{
|
||||
if (sheet.checked(j))
|
||||
@ -84,16 +84,15 @@ bool TEdit_file::_browse(TCursor& cursor, const TFilename& name)
|
||||
sheet.uncheck(j);
|
||||
}
|
||||
}
|
||||
end_wait();
|
||||
}
|
||||
if (pind) delete pind;
|
||||
cursor.freeze(FALSE);
|
||||
|
||||
{
|
||||
if (cursor.items() > 0)
|
||||
sheet.select(1);
|
||||
continue;
|
||||
}
|
||||
// Forza update del cursore
|
||||
cursor.set_filterfunction(NULL, TRUE);
|
||||
if (cursor.items() > 0)
|
||||
sheet.select(1);
|
||||
continue;
|
||||
}
|
||||
if (ch == K_ENTER || ch == K_DEL)
|
||||
{
|
||||
@ -141,6 +140,16 @@ bool TEdit_file::_browse(TCursor& cursor, const TFilename& name)
|
||||
|
||||
bool TEdit_file::browse(int logicnum, const TFilename& name, const TString& tab)
|
||||
{
|
||||
if (logicnum > 2)
|
||||
{
|
||||
TSystemisamfile test(logicnum);
|
||||
int err = test.open_ex();
|
||||
if (err != NOERR)
|
||||
return error_box("Impossibile aprire il file %d: errore %d", logicnum, err);
|
||||
test.close();
|
||||
}
|
||||
|
||||
|
||||
TRelation relation(logicnum);
|
||||
TCursor cursor(&relation);
|
||||
if (logicnum == LF_TAB || logicnum == LF_TABCOM || logicnum == LF_TABGEN)
|
||||
|
Loading…
x
Reference in New Issue
Block a user