Patch level : 2.0 nopatch
Files correlati : ba0.exe ba6.exe Ricompilazione Demo : [ ] Commento : Allineato uso di process_link git-svn-id: svn://10.65.10.50/trunk@11558 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
42a8d1e1ff
commit
b3963c9baf
@ -178,7 +178,7 @@ bool TMenuitem::enabled() const
|
|||||||
if (is_submenu())
|
if (is_submenu())
|
||||||
{
|
{
|
||||||
TSubmenu* mnu = menu().find(_action);
|
TSubmenu* mnu = menu().find(_action);
|
||||||
yes = mnu && mnu->enabled();
|
yes = mnu && mnu->enabled() && mnu->items() > 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -489,6 +489,8 @@ bool TMenu::set_firm(long firm) const
|
|||||||
{
|
{
|
||||||
cur = 0L;
|
cur = 0L;
|
||||||
firm = rel.curr().get_long("CODDITTA");
|
firm = rel.curr().get_long("CODDITTA");
|
||||||
|
if (!prefix().exist(firm))
|
||||||
|
firm = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return main_app().set_firm(firm);
|
return main_app().set_firm(firm);
|
||||||
|
@ -2,22 +2,23 @@
|
|||||||
// Stampa anagrafiche
|
// Stampa anagrafiche
|
||||||
// Control code
|
// Control code
|
||||||
// ***********************************************************************
|
// ***********************************************************************
|
||||||
#include <recarray.h>
|
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <mailbox.h>
|
#include <recarray.h>
|
||||||
#include <execp.h>
|
|
||||||
|
|
||||||
#include "ba6100.h"
|
#include "ba6100.h"
|
||||||
|
|
||||||
// ------- utils --------------------------------------------
|
#include "anagr.h"
|
||||||
|
#include "nditte.h"
|
||||||
|
|
||||||
|
// ------- utils --------------------------------------------
|
||||||
|
|
||||||
const TRectype& TAnaprint_app::look_com(const char* cod, const char* sta)
|
const TRectype& TAnaprint_app::look_com(const char* cod, const char* sta)
|
||||||
{
|
{
|
||||||
TString16 key;
|
TString8 key;
|
||||||
if (sta && *sta)
|
if (sta && *sta)
|
||||||
key << sta;
|
key << sta;
|
||||||
key << "|";
|
key << '|';
|
||||||
if (cod && *cod)
|
if (cod && *cod)
|
||||||
key << cod;
|
key << cod;
|
||||||
return cache().get(LF_COMUNI, key);
|
return cache().get(LF_COMUNI, key);
|
||||||
@ -38,24 +39,24 @@ const char* TAnaprint_app::look_tab(const char* tabname, const char* cod,
|
|||||||
|
|
||||||
// link
|
// link
|
||||||
|
|
||||||
void TAnaprint_app::process_link(int id, const char* txt)
|
bool TAnaprint_app::process_link(int id, const char* txt)
|
||||||
{
|
{
|
||||||
|
bool reload = false;
|
||||||
if (id == _ana_link)
|
if (id == _ana_link)
|
||||||
{
|
{
|
||||||
TString80 ss = "1|"; ss << txt;
|
TRectype persona(LF_ANAG);
|
||||||
TMessage fs(cmd2name("ba4","-1"), MSG_LN, ss);
|
persona.put(ANA_TIPOA, _pr_what == anafis ? 'F' : 'G');
|
||||||
fs.send();
|
persona.put(ANA_CODANAGR, atol(txt));
|
||||||
TExternal_app ba4(_pr_what == anafis ? "ba4 -1 F" : "ba4 -1 G");
|
TString8 hint; hint.format("ba4 -1 %c", _pr_what == anafis ? 'F' : 'G');
|
||||||
if (ba4.run()) beep();
|
reload = persona.edit(LF_ANAG, NULL, hint);
|
||||||
}
|
}
|
||||||
else if (id == _dit_link)
|
else if (id == _dit_link)
|
||||||
{
|
{
|
||||||
TString80 ss = "1|"; ss << txt << "|" << txt;
|
TRectype ditta(LF_NDITTE);
|
||||||
TMessage fs(cmd2name("ba4","-2"), MSG_LN, ss);
|
ditta.put(NDT_CODDITTA, atol(txt));
|
||||||
fs.send();
|
reload = ditta.edit(LF_NDITTE, NULL, "ba4 -2");
|
||||||
TExternal_app ba4("ba4 -2");
|
|
||||||
if (ba4.run()) beep();
|
|
||||||
}
|
}
|
||||||
|
return reload;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- here we go -------------------------------------------------
|
// ---- here we go -------------------------------------------------
|
||||||
|
@ -56,7 +56,7 @@ protected:
|
|||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
virtual bool user_destroy();
|
virtual bool user_destroy();
|
||||||
virtual bool set_print(int n);
|
virtual bool set_print(int n);
|
||||||
virtual void process_link(int id, const char* txt);
|
virtual bool process_link(int id, const char* txt);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user