Patch level : 12.0 604

Files correlati     : fp
Commento            : Aggiunto controllo bottoni
This commit is contained in:
Tolla 2018-07-19 09:33:30 +02:00
parent 278e579e67
commit 242d192aa2

View File

@ -113,6 +113,8 @@ bool TParametri_mask::on_field_event(TOperable_field& o, TField_event e, long jo
tipi_import(); tipi_import();
break; break;
case F_SETPATCH: case F_SETPATCH:
{
if (e == fe_button)
{ {
TMask & m = get_tmp_msk("Livello patch"); TMask & m = get_tmp_msk("Livello patch");
m.add_string(101, 0, "Versione ", 1, 1, 5, ""); m.add_string(101, 0, "Versione ", 1, 1, 5, "");
@ -129,25 +131,34 @@ bool TParametri_mask::on_field_event(TOperable_field& o, TField_event e, long jo
else else
error_box("Errore durante la scrittura del DB Campo"); error_box("Errore durante la scrittura del DB Campo");
} }
}
break; break;
} }
case F_ENPTYTABLE: case F_ENPTYTABLE:
if (e == fe_button)
{
if (yesno_box("Sei sicuro di voler svuotare tutte le tabelle del database? Questa procedura NON É REVERSIBILE")) if (yesno_box("Sei sicuro di voler svuotare tutte le tabelle del database? Questa procedura NON É REVERSIBILE"))
{ {
db().sq_set_exec("EXEC sp_MSforeachtable @command1 = 'TRUNCATE TABLE ? '"); db().sq_set_exec("EXEC sp_MSforeachtable @command1 = 'TRUNCATE TABLE ? '");
db().sq_commit(); db().sq_commit();
message_box("Procedura terminata"); message_box("Procedura terminata");
} }
}
break; break;
case F_DROPTABLE: case F_DROPTABLE:
if (e == fe_button)
{
if (yesno_box("Sei sicuro di voler cancellare tutte le tabelle del database? Questa procedura NON É REVERSIBILE")) if (yesno_box("Sei sicuro di voler cancellare tutte le tabelle del database? Questa procedura NON É REVERSIBILE"))
{ {
db().sq_set_exec("EXEC sp_MSforeachtable @command1 = 'DROP TABLE ?'"); db().sq_set_exec("EXEC sp_MSforeachtable @command1 = 'DROP TABLE ?'");
db().sq_commit(); db().sq_commit();
message_box("Procedura terminata"); message_box("Procedura terminata");
} }
}
break; break;
case F_REBORNDB: case F_REBORNDB:
if (e == fe_button)
{
if (yesno_box("Sei sicuro di voler ricreare tutte le tabelle del database? Questa procedura NON É REVERSIBILE")) if (yesno_box("Sei sicuro di voler ricreare tutte le tabelle del database? Questa procedura NON É REVERSIBILE"))
{ {
db().sq_set_exec("EXEC sp_MSforeachtable @command1 = 'DROP TABLE ?'"); db().sq_set_exec("EXEC sp_MSforeachtable @command1 = 'DROP TABLE ?'");
@ -160,6 +171,7 @@ bool TParametri_mask::on_field_event(TOperable_field& o, TField_event e, long jo
db().sq_commit(); db().sq_commit();
message_box("Procedura terminata"); message_box("Procedura terminata");
} }
}
break; break;
default: default:
break; break;