diff --git a/cg/cg5400.cpp b/cg/cg5400.cpp index 357683ed8..192df5392 100755 --- a/cg/cg5400.cpp +++ b/cg/cg5400.cpp @@ -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)