Aggiustamenti scelta profilo e implementazione cancellazione
git-svn-id: svn://10.65.10.50/trunk@1455 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4e664d14c0
commit
1801ffd419
@ -59,7 +59,9 @@ bool TForm_editor::create()
|
|||||||
if (code == 0)
|
if (code == 0)
|
||||||
code = atol(argv(a));
|
code = atol(argv(a));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool go = FALSE;
|
||||||
|
|
||||||
if ((form && code) || (form && code == 0 && _extra))
|
if ((form && code) || (form && code == 0 && _extra))
|
||||||
{
|
{
|
||||||
_form = new TForm(form, code, _extra ? 2 : 1);
|
_form = new TForm(form, code, _extra ? 2 : 1);
|
||||||
@ -88,22 +90,43 @@ bool TForm_editor::create()
|
|||||||
|
|
||||||
if (k == K_ENTER)
|
if (k == K_ENTER)
|
||||||
{
|
{
|
||||||
m.stop_run(K_ENTER);
|
|
||||||
_form = new TForm(fform, fcode, _extra ? 2 :1, fdesc);
|
_form = new TForm(fform, fcode, _extra ? 2 :1, fdesc);
|
||||||
_form->set_description(m.get(F_DESC));
|
go = TRUE;
|
||||||
enable_menu_item(M_FILE_PRINT);
|
break;
|
||||||
if (!_extra) dispatch_e_menu(MENU_ITEM(31));
|
|
||||||
}
|
}
|
||||||
else if (k == K_DEL)
|
else if (k == K_DEL)
|
||||||
{
|
{
|
||||||
if (yesno_box("Confermare la cancellazione del "
|
if (yesno_box("Confermare la cancellazione del "
|
||||||
"profilo %05ld", fcode))
|
"profilo %05ld", fcode))
|
||||||
{
|
{
|
||||||
// TBI remove form
|
TLocalisamfile frm(LF_FORM);
|
||||||
|
frm.zero();
|
||||||
|
frm.put("TIPOPROF", fform);
|
||||||
|
frm.put("CODPROF", fcode);
|
||||||
|
if (frm.read() == NOERR)
|
||||||
|
frm.remove();
|
||||||
|
TLocalisamfile rfr(LF_RFORM);
|
||||||
|
rfr.zero();
|
||||||
|
rfr.put("TIPOPROF", fform);
|
||||||
|
rfr.put("CODPROF", fcode);
|
||||||
|
if (rfr.read() == NOERR)
|
||||||
|
{
|
||||||
|
for (; rfr.get_long("CODPROF") == fcode && rfr.get("TIPOPROF")
|
||||||
|
== fform; rfr.next())
|
||||||
|
rfr.remove();
|
||||||
|
}
|
||||||
|
m.set(F_CODE,"");
|
||||||
|
m.set(F_BASE,"");
|
||||||
|
m.set(F_DESC,"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// error_box("Specificare il form da modificare!");
|
}
|
||||||
|
|
||||||
|
if (go)
|
||||||
|
{
|
||||||
|
enable_menu_item(M_FILE_PRINT);
|
||||||
|
if (!_extra) dispatch_e_menu(MENU_ITEM(31));
|
||||||
}
|
}
|
||||||
|
|
||||||
return form != NULL;
|
return form != NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user