1997-02-17 11:14:01 +00:00
|
|
|
#include <tabapp.h>
|
1999-04-06 15:34:39 +00:00
|
|
|
|
1997-02-17 11:14:01 +00:00
|
|
|
#include "batbbnp.h"
|
|
|
|
|
1997-02-18 15:10:08 +00:00
|
|
|
////////////////////////////////////////////////////
|
|
|
|
// Classe per la gestione della Tabella di Ditta //
|
|
|
|
// "Banche di presentazione" //
|
|
|
|
////////////////////////////////////////////////////
|
1999-04-06 15:34:39 +00:00
|
|
|
class TBnp_table_app : public TTable_application
|
1997-02-17 11:14:01 +00:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
virtual bool user_create() ;
|
|
|
|
virtual void init_query_insert_mode(TMask& m) ;
|
|
|
|
virtual void init_insert_mode(TMask& m) ;
|
|
|
|
virtual void init_query_mode (TMask&);
|
1999-04-06 15:34:39 +00:00
|
|
|
|
1997-02-17 11:14:01 +00:00
|
|
|
public:
|
1998-01-23 09:57:34 +00:00
|
|
|
// @cmember Disabilita la verifica del modulo : essendo una anagrafica, va sempre abilitata
|
1999-10-22 10:00:18 +00:00
|
|
|
virtual bool check_autorization() const { return FALSE; }
|
|
|
|
|
|
|
|
TBnp_table_app() { }
|
|
|
|
virtual ~TBnp_table_app() { }
|
1997-02-17 11:14:01 +00:00
|
|
|
};
|
|
|
|
|
1999-10-22 10:00:18 +00:00
|
|
|
HIDDEN inline TBnp_table_app& app() { return (TBnp_table_app&) main_app(); }
|
1997-02-17 11:14:01 +00:00
|
|
|
|
|
|
|
void TBnp_table_app::init_query_insert_mode(TMask& m)
|
|
|
|
{
|
1999-10-22 10:00:18 +00:00
|
|
|
if (get_tabname() == "BNP")
|
|
|
|
{
|
|
|
|
m.show(F_CODICEABI);
|
|
|
|
m.show(F_CODICECAB);
|
|
|
|
m.field(F_CODICEABI).check_type(CHECK_REQUIRED);
|
|
|
|
m.field(F_CODICECAB).check_type(CHECK_REQUIRED);
|
|
|
|
m.hide(F_ABI);
|
|
|
|
m.hide(F_CAB);
|
|
|
|
m.field(F_ABI).check_type(CHECK_NONE);
|
|
|
|
m.field(F_CAB).check_type(CHECK_NONE);
|
|
|
|
}
|
1997-02-17 11:14:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void TBnp_table_app::init_insert_mode(TMask& m)
|
|
|
|
{
|
1999-10-22 10:00:18 +00:00
|
|
|
if (get_tabname() == "BNP")
|
|
|
|
{
|
|
|
|
m.show(F_CODICEABI);
|
|
|
|
m.show(F_CODICECAB);
|
|
|
|
m.field(F_CODICEABI).check_type(CHECK_REQUIRED);
|
|
|
|
m.field(F_CODICECAB).check_type(CHECK_REQUIRED);
|
|
|
|
m.hide(F_ABI);
|
|
|
|
m.hide(F_CAB);
|
|
|
|
m.field(F_ABI).check_type(CHECK_NONE);
|
|
|
|
m.field(F_CAB).check_type(CHECK_NONE);
|
|
|
|
}
|
1997-02-17 11:14:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void TBnp_table_app::init_query_mode(TMask& m)
|
|
|
|
{
|
1999-04-06 15:34:39 +00:00
|
|
|
TTable_application::init_query_mode(m);
|
1999-10-22 10:00:18 +00:00
|
|
|
if (get_tabname() == "BNP")
|
|
|
|
{
|
|
|
|
m.show(F_ABI);
|
|
|
|
m.show(F_CAB);
|
|
|
|
m.field(F_ABI).check_type(CHECK_REQUIRED);
|
|
|
|
m.field(F_CAB).check_type(CHECK_REQUIRED);
|
|
|
|
m.hide(F_CODICEABI);
|
|
|
|
m.hide(F_CODICECAB);
|
|
|
|
//m.field(F_CODICEABI).check_type(CHECK_NONE);
|
|
|
|
m.field(F_CODICECAB).check_type(CHECK_NONE);
|
|
|
|
}
|
1997-02-17 11:14:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool TBnp_table_app::user_create()
|
|
|
|
{
|
1999-04-06 15:34:39 +00:00
|
|
|
TTable_application::user_create();
|
1997-02-17 11:14:01 +00:00
|
|
|
const TString& name = get_tabname();
|
1997-05-14 10:32:26 +00:00
|
|
|
if (name.empty())
|
2003-05-19 14:15:13 +00:00
|
|
|
return error_box(TR("Specificare la tabella sulla linea di comando."));
|
1997-02-17 11:14:01 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
int ef0700(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
TBnp_table_app a ;
|
2003-05-19 14:15:13 +00:00
|
|
|
a.run(argc, argv, TR("Gestione tabelle"));
|
1997-02-17 11:14:01 +00:00
|
|
|
return 0;
|
|
|
|
}
|