Cambiate leggermente maschere e sheet di manutenzione
git-svn-id: svn://10.65.10.50/trunk@1173 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9b6114e284
commit
ab49a4f5d7
@ -371,7 +371,6 @@ bool TMenu_application::menu_find_handler(TMask_field&f, KEY k)
|
||||
}
|
||||
|
||||
|
||||
|
||||
int TMenu_application::do_level()
|
||||
{
|
||||
const int first = _first[_level];
|
||||
|
@ -55,7 +55,7 @@ BEGIN
|
||||
ITEM "Tipo"
|
||||
ITEM "Lunghezza"
|
||||
ITEM "Decimali"
|
||||
ITEM "Descrizione@50"
|
||||
ITEM "Descrizione@70"
|
||||
END
|
||||
|
||||
SPREADSHEET F_KEYS
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <stdio.h>
|
||||
#include <fstream.h>
|
||||
|
||||
|
||||
#include <applicat.h>
|
||||
#include <files.h>
|
||||
#include <utility.h>
|
||||
@ -99,7 +98,7 @@ TRec_sheet::TRec_sheet(int logicnum, const char * tab)
|
||||
FILE * fd = NULL;
|
||||
|
||||
if (!fexist(_descfname) && (fd = fopen(_descfname, "w")) == NULL)
|
||||
error_box("Non riesco a creare il file delle descrizioni");
|
||||
error_box("Impossibile creare il file delle descrizioni");
|
||||
else
|
||||
{
|
||||
if (fd != NULL)
|
||||
|
@ -24,12 +24,15 @@ bool TEdit_file::browse(int logicnum, const char* name)
|
||||
for(int i = 0; (n = curr.fieldname(i)) != NULL; i++)
|
||||
{
|
||||
trac.add(n);
|
||||
head.add(n);
|
||||
|
||||
TString16 name(n); name.lower(); name[0] = toupper(name[0]);
|
||||
head.add(name);
|
||||
|
||||
TFieldtypes t = curr.type(n);
|
||||
const int len = (t == _datefld) ? 10 : curr.length(n);
|
||||
head << '@' << max(len, (int)strlen(n));
|
||||
if (t == _realfld) head << 'R';
|
||||
if (t == _realfld || t == _intfld || t == _longfld || t == _wordfld || t == _realfld)
|
||||
head << 'R';
|
||||
}
|
||||
|
||||
KEY ch;
|
||||
@ -117,8 +120,9 @@ KEY TEdit_file::edit_record(TRectype& rec, bool readonly)
|
||||
{
|
||||
for(int recs = 0; rec.fieldname(recs) != NULL; recs++);
|
||||
|
||||
int rows = recs > 15 ? 20 : recs+4;
|
||||
int pages = recs/15 + (recs % 15 ? 1 : 0);
|
||||
const int fpp = 16; // Fields per page
|
||||
const int rows = recs > fpp ? 20 : recs+4;
|
||||
const int pages = recs/fpp + (recs % fpp ? 1 : 0);
|
||||
TMask m("Modifica record", pages, 78, rows);
|
||||
|
||||
int curpage = 0, currow = 1, nid = 100;
|
||||
@ -128,19 +132,17 @@ KEY TEdit_file::edit_record(TRectype& rec, bool readonly)
|
||||
{
|
||||
// add fields ONE by ONE
|
||||
TString16 s(cp); s.left_just(16);
|
||||
int len = rec.length(cp);
|
||||
const int len = rec.length(cp);
|
||||
switch (rec.type(cp))
|
||||
{
|
||||
case _alfafld:
|
||||
m.add_string(nid++,curpage, s, 3, currow, len, "",
|
||||
len > 50 ? 50 : len);
|
||||
m.add_string(nid++,curpage, s, 3, currow, len, "", len > 50 ? 50 : len);
|
||||
break;
|
||||
case _intfld:
|
||||
case _longfld:
|
||||
case _wordfld:
|
||||
case _realfld:
|
||||
m.add_number(nid++, curpage, s, 3, currow, len, "",
|
||||
rec.ndec(cp));
|
||||
m.add_number(nid++, curpage, s, 3, currow, len, "R", rec.ndec(cp));
|
||||
break;
|
||||
case _datefld:
|
||||
m.add_date(nid++, curpage, s, 3, currow);
|
||||
@ -151,8 +153,7 @@ KEY TEdit_file::edit_record(TRectype& rec, bool readonly)
|
||||
break;
|
||||
case _intzerofld:
|
||||
case _longzerofld:
|
||||
m.add_number(nid++, curpage, s, 3, currow, len, "Z",
|
||||
rec.ndec(cp));
|
||||
m.add_number(nid++, curpage, s, 3, currow, len, "Z", rec.ndec(cp));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -160,7 +161,7 @@ KEY TEdit_file::edit_record(TRectype& rec, bool readonly)
|
||||
|
||||
m.field(nid-1).set(rec.get(cp));
|
||||
|
||||
if (((i+1) % 15) == 0 || i == recs-1)
|
||||
if (((i+1) % fpp) == 0 || i == recs-1)
|
||||
{
|
||||
m.add_button(DLG_OK, curpage, "", -12, -1, 9, 2);
|
||||
m.add_button(DLG_CANCEL, curpage, "", -22, -1, 9, 2);
|
||||
|
@ -2,7 +2,8 @@
|
||||
0|Anagrafiche|1
|
||||
0|Contabilita'|4|7
|
||||
0|Terreni e fabbricati|tefa -t
|
||||
0|Modello 740|740 -t
|
||||
0|Modello 740|740 -t -cCONF740.FPW
|
||||
0|Modello 760|760 -t -cCONF760.FPW
|
||||
0|Modello 770|17|4
|
||||
0|Manutenzione|15
|
||||
1|Gestione Anagrafiche|1
|
||||
@ -154,4 +155,4 @@
|
||||
18|Schede percipienti|772 -0
|
||||
18|Certificazioni|772 -1
|
||||
18|Lista movimenti percipienti|772 -2
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user