Eliminato handler ditta che provocava solamente bordello
git-svn-id: svn://10.65.10.50/trunk@1100 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
61b126dc3a
commit
821cfdaec8
@ -25,33 +25,10 @@ protected: // TApplication
|
||||
public:
|
||||
bool reg_restore(const TString& reg, int year, int month, int day, bool giornale);
|
||||
bool inl_restore(const TString& lbu, int year, int month);
|
||||
static bool firm_handler(TMask_field& f, KEY key);
|
||||
|
||||
TRipristina_stampa() : _op(restore_reg) {}
|
||||
};
|
||||
|
||||
bool TRipristina_stampa::firm_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (f.to_check(key))
|
||||
{
|
||||
const long firm = atol(f.get());
|
||||
|
||||
if (firm <= 0)
|
||||
return f.error_box("Codice ditta errato");
|
||||
else
|
||||
if (!prefhndl->exist(firm))
|
||||
return f.error_box("Gli archivi della ditta %ld non sono stati ancora generati", firm);
|
||||
else
|
||||
{
|
||||
main_app().set_firm(firm);
|
||||
TMask_field& r = f.mask().field(F_REG);
|
||||
r.set_dirty();
|
||||
r.on_key(K_TAB);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TRipristina_stampa::reg_restore(const TString& regist,
|
||||
int year, int month, int day,
|
||||
bool giornale)
|
||||
@ -237,7 +214,6 @@ bool TRipristina_stampa::create()
|
||||
bool TRipristina_stampa::menu(MENU_TAG)
|
||||
{
|
||||
TMask msk(_op == restore_inl ? "cg5400b" : "cg5400a") ;
|
||||
if (_op == restore_reg) msk.set_handler(F_FIRM, firm_handler);
|
||||
|
||||
while (msk.run() == K_ENTER)
|
||||
{
|
||||
@ -256,7 +232,7 @@ bool TRipristina_stampa::menu(MENU_TAG)
|
||||
int day = giornale ? msk.get_int(F_DAY) : 1;
|
||||
if (day < 1) day = 1;
|
||||
|
||||
if (prefhndl->exist(firm))
|
||||
if (prefix().exist(firm))
|
||||
{
|
||||
TString256 mess("Attenzione ripristino della stampa de");
|
||||
if (_op == restore_reg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user