From 265260b080e06e5d3c4570787a007009f801e797 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 9 Dec 2008 12:43:15 +0000 Subject: [PATCH] Patch level : 10.0 186 Files correlati : cg0.exe lv0.exe Ricompilazione Demo : [ ] Commento : Bug 0001007: Aggiunta pulsante Contratti in anagrafica clienti Aggiungere un pulsante di collegamento ai contratti (visibile e attivabile solo se gestito e attivo il modulo delle lavanderie) lv0.exe Navigazione con invio. Ora la navigazione con invio cambia riga e sull'ultima ne aggiunge una nuova git-svn-id: svn://10.65.10.50/trunk@17833 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg0200.cpp | 37 ++++++++++++++++++++++++++++++++++++- cg/cg0200.h | 1 + cg/cg0200a.uml | 6 ++++++ lv/lv0400.cpp | 13 ++++++++++++- 4 files changed, 55 insertions(+), 2 deletions(-) diff --git a/cg/cg0200.cpp b/cg/cg0200.cpp index f57354409..b5db80a17 100755 --- a/cg/cg0200.cpp +++ b/cg/cg0200.cpp @@ -3,11 +3,13 @@ #include "cg0201.h" #include +#include #include #include #include #include #include +#include #include #include @@ -519,6 +521,36 @@ HIDDEN bool codalleg_handler(TMask_field& f, KEY key) return true; } +HIDDEN bool contrlav_handler(TMask_field& f, KEY key) +{ + if (key == K_SPACE) + { + TFilename tempfile; + + tempfile.temp("cg0"); + tempfile.ext("ini"); + + { + TConfig configfile(tempfile); + TString8 para; + + para << LF_LVCONDV; + configfile.set("Action", "Run", "Transaction"); + configfile.set("Mode", "R", "Transaction"); + configfile.set(CLI_CODCF, f.mask().get(F_CODCF), para); + } + + TString commandline; + + commandline.format("lv0 -3 /i%s",(const char*)tempfile); + + TExternal_app lv(commandline); + lv.run(); + + remove_file(tempfile); + } + return true; +} void TClifo_application::on_config_change() { TConfig cnf(CONFIG_DITTA); @@ -529,6 +561,7 @@ void TClifo_application::on_config_change() init_pages(*_msk); _msk->show(-9, _gessal); // Mostra campi Estratti conto + _msk->enable(DLG_CONTRLAV, main_app().has_module(LVAUT)); } @@ -950,7 +983,9 @@ bool TClifo_application::user_create() // initvar e arrmask _msk->set_handler(F_CODALLEG, codalleg_handler); _msk->set_handler(DLG_EMAIL, email_handler); _msk->set_handler(F_RAGSOC, rsoc_handler); - + _msk->set_handler(DLG_CONTRLAV, contrlav_handler); + _msk->enable(DLG_CONTRLAV, main_app().has_module(LVAUT)); + TSheet_field& ind = _msk->sfield(F_SHEET_G_VEN); ind.set_notify(indsp_notify); diff --git a/cg/cg0200.h b/cg/cg0200.h index 5a7d1bfd9..d506f2d07 100755 --- a/cg/cg0200.h +++ b/cg/cg0200.h @@ -167,6 +167,7 @@ #define F_BYMAIL 306 #define F_DOCMAIL 307 #define DLG_ANAG 308 +#define DLG_CONTRLAV 309 ////////////////////////////////////// diff --git a/cg/cg0200a.uml b/cg/cg0200a.uml index 15e572a3c..71f2447d1 100755 --- a/cg/cg0200a.uml +++ b/cg/cg0200a.uml @@ -4,6 +4,12 @@ TOOLBAR "topbar" 0 0 0 2 #include +BUTTON DLG_CONTRLAV +BEGIN + PROMPT 13 1 "Cont.Lav." + PICTURE 116 +END + ENDPAGE PAGE "Pag.1" -1 -1 78 19 diff --git a/lv/lv0400.cpp b/lv/lv0400.cpp index f6942f006..97232d70a 100755 --- a/lv/lv0400.cpp +++ b/lv/lv0400.cpp @@ -137,6 +137,7 @@ protected: virtual int write(const TMask& m); virtual int rewrite(const TMask& m); virtual bool remove(); + virtual void init_query_mode(TMask& m); virtual void init_insert_mode(TMask& m); }; @@ -144,7 +145,12 @@ bool TContratti_app:: user_create() { _rel=new TRelation (LF_LVCONDV); _msk= new TContratti_msk; - return true; + + TSheet_field& ss=_msk->sfield(F_RIGHE); + + ss.set_auto_append(); + + return true; } bool TContratti_app:: user_destroy() @@ -285,6 +291,11 @@ void TContratti_app::save_rows(const TMask& m) } +void TContratti_app::init_query_mode(TMask& m) +{ + m.field(F_RAGSOC).enable(m.field(F_CODCF).enabled()); +} + void TContratti_app::init_insert_mode(TMask& m) { TSheet_field& ss=m.sfield(F_RIGHE);