Patch level : 2.2
Files correlati : ca0 Ricompilazione Demo : [ ] Commento : Aggiunto programma gestione centri di costo git-svn-id: svn://10.65.10.50/trunk@12556 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
262d21cbdf
commit
722ba971c2
@ -11,36 +11,11 @@ protected:
|
||||
virtual int get_logicnum() const { return LF_PCONANA; }
|
||||
virtual const char* get_key_var() const { return "Pdci"; }
|
||||
virtual const char* get_des_var() const { return "PdciDes"; }
|
||||
virtual short get_field_id(int n, int k) const;
|
||||
|
||||
public:
|
||||
TPiano_conti_anal_msk();
|
||||
virtual ~TPiano_conti_anal_msk();
|
||||
TPiano_conti_anal_msk() { read("ca0400a"); }
|
||||
};
|
||||
|
||||
short TPiano_conti_anal_msk::get_field_id(int n, int k) const
|
||||
{
|
||||
const int tot = fieldrefs(1);
|
||||
short id = 0;
|
||||
if (n >= 0 && n < tot)
|
||||
{
|
||||
if (k == 2)
|
||||
id = F_DES_1+n;
|
||||
else
|
||||
id = F_KEY_1+n;
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
TPiano_conti_anal_msk::TPiano_conti_anal_msk()
|
||||
{
|
||||
read("ca0400a");
|
||||
}
|
||||
|
||||
TPiano_conti_anal_msk::~TPiano_conti_anal_msk()
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TAnalisi_app
|
||||
///////////////////////////////////////////////////////////
|
||||
|
@ -5,16 +5,16 @@
|
||||
#include "calib01.h"
|
||||
#include "ca0500a.h"
|
||||
|
||||
/*//identificatori dei campi automatici delle maschere (messi qui per evitare di ripeterli nel .h
|
||||
//di ogni maschera)
|
||||
#define F_KEY1 101
|
||||
#define F_KEY2 102
|
||||
#define F_KEY3 103
|
||||
#define F_KEY4 104
|
||||
#define F_DES1 111
|
||||
#define F_DES2 112
|
||||
#define F_DES3 113
|
||||
#define F_DES4 114*/
|
||||
class TCdc_anal_msk : public TSimple_anal_msk
|
||||
{
|
||||
protected:
|
||||
virtual int get_logicnum() const { return LF_CDC; }
|
||||
virtual const char* get_key_var() const { return "CdC"; }
|
||||
virtual const char* get_des_var() const { return "CdCDes"; }
|
||||
|
||||
public:
|
||||
TCdc_anal_msk() { read("ca0500a"); }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//APPLICAZIONE
|
||||
@ -23,14 +23,9 @@
|
||||
class TCdC_app : public TAnal_app
|
||||
{
|
||||
protected:
|
||||
virtual bool create();
|
||||
virtual TAnal_msk* create_mask() const { return new TCdc_anal_msk; }
|
||||
};
|
||||
|
||||
bool TCdC_app::create()
|
||||
{
|
||||
return TCdC_app::create();
|
||||
}
|
||||
|
||||
int ca0500(int argc, char* argv[])
|
||||
{
|
||||
TCdC_app a;
|
||||
|
@ -11,12 +11,6 @@ BEGIN
|
||||
PROMPT 1 0 "@bCodici"
|
||||
END
|
||||
|
||||
STRING F_CDC_DESCRIZ 50
|
||||
BEGIN
|
||||
PROMPT 2 7 "Descrizione "
|
||||
FIELD DESCRIZ
|
||||
END
|
||||
|
||||
MEMO F_CDC_DESCRAGG 78 6
|
||||
BEGIN
|
||||
PROMPT 2 8 "Descrizione aggiuntiva"
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "calib01.h"
|
||||
#include "calibmsk.h"
|
||||
|
||||
#include <tabutil.h>
|
||||
#include <tree.h>
|
||||
@ -72,6 +73,19 @@ public:
|
||||
|
||||
#define F_TREE 99
|
||||
|
||||
short TAnal_msk::get_field_id(int n, int k) const
|
||||
{
|
||||
short id = 0;
|
||||
if (n >= 0 && n < fieldrefs(1))
|
||||
{
|
||||
if (k == 2)
|
||||
id = F_DES1+n;
|
||||
else
|
||||
id = F_KEY1+n;
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
bool TAnal_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
@ -138,11 +152,11 @@ void TAnal_msk::read(const char* name)
|
||||
switch (status)
|
||||
{
|
||||
case 0:
|
||||
if (line.starts_with("PA "))
|
||||
status = 1;
|
||||
if (line.starts_with("PA"))
|
||||
status = 1; // Ho trovato la prima pagina
|
||||
break;
|
||||
case 1:
|
||||
if (line.starts_with("PR "))
|
||||
if (line.starts_with("PR")) // Ho trovato un prompt sulla prima pagina
|
||||
{
|
||||
TToken_string l(line, ' ');
|
||||
l.strip_d_spaces();
|
||||
@ -154,7 +168,7 @@ void TAnal_msk::read(const char* name)
|
||||
line = l;
|
||||
}
|
||||
} else
|
||||
if (line.starts_with("PA "))
|
||||
if (line.starts_with("PA")) // Ho finito la prima pagina
|
||||
{
|
||||
status = 2;
|
||||
}
|
||||
@ -334,7 +348,7 @@ bool TAnal_tree::repos() const
|
||||
if (_curr.level() > 0)
|
||||
{
|
||||
if (_file->recno() != _curr._recno)
|
||||
ok = ((TLocalisamfile&)_file).readat(_curr._recno) == NOERR;
|
||||
ok = ((TLocalisamfile*)_file)->readat(_curr._recno) == NOERR;
|
||||
else
|
||||
ok = true;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
|
||||
virtual int get_logicnum() const pure;
|
||||
virtual const char* get_tabname() const { return ""; }
|
||||
virtual short get_field_id(int n, int key = 1) const pure;
|
||||
virtual short get_field_id(int n, int key = 1) const;
|
||||
|
||||
virtual const TToken_string& get_key_value(const TRectype& rec, int k = 1) const;
|
||||
virtual const TToken_string& get_key_value(int k = 1) const;
|
||||
|
8
ca/calibmsk.h
Executable file
8
ca/calibmsk.h
Executable file
@ -0,0 +1,8 @@
|
||||
#define F_KEY1 101
|
||||
#define F_KEY2 102
|
||||
#define F_KEY3 103
|
||||
#define F_KEY4 104
|
||||
#define F_DES1 111
|
||||
#define F_DES2 112
|
||||
#define F_DES3 113
|
||||
#define F_DES4 114
|
Loading…
x
Reference in New Issue
Block a user