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:
guy 1995-03-27 14:34:07 +00:00
parent 9b6114e284
commit ab49a4f5d7
5 changed files with 18 additions and 18 deletions

View File

@ -371,7 +371,6 @@ bool TMenu_application::menu_find_handler(TMask_field&f, KEY k)
} }
int TMenu_application::do_level() int TMenu_application::do_level()
{ {
const int first = _first[_level]; const int first = _first[_level];

View File

@ -55,7 +55,7 @@ BEGIN
ITEM "Tipo" ITEM "Tipo"
ITEM "Lunghezza" ITEM "Lunghezza"
ITEM "Decimali" ITEM "Decimali"
ITEM "Descrizione@50" ITEM "Descrizione@70"
END END
SPREADSHEET F_KEYS SPREADSHEET F_KEYS

View File

@ -2,7 +2,6 @@
#include <stdio.h> #include <stdio.h>
#include <fstream.h> #include <fstream.h>
#include <applicat.h> #include <applicat.h>
#include <files.h> #include <files.h>
#include <utility.h> #include <utility.h>
@ -99,7 +98,7 @@ TRec_sheet::TRec_sheet(int logicnum, const char * tab)
FILE * fd = NULL; FILE * fd = NULL;
if (!fexist(_descfname) && (fd = fopen(_descfname, "w")) == 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 else
{ {
if (fd != NULL) if (fd != NULL)

View File

@ -24,12 +24,15 @@ bool TEdit_file::browse(int logicnum, const char* name)
for(int i = 0; (n = curr.fieldname(i)) != NULL; i++) for(int i = 0; (n = curr.fieldname(i)) != NULL; i++)
{ {
trac.add(n); trac.add(n);
head.add(n);
TString16 name(n); name.lower(); name[0] = toupper(name[0]);
head.add(name);
TFieldtypes t = curr.type(n); TFieldtypes t = curr.type(n);
const int len = (t == _datefld) ? 10 : curr.length(n); const int len = (t == _datefld) ? 10 : curr.length(n);
head << '@' << max(len, (int)strlen(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; KEY ch;
@ -117,8 +120,9 @@ KEY TEdit_file::edit_record(TRectype& rec, bool readonly)
{ {
for(int recs = 0; rec.fieldname(recs) != NULL; recs++); for(int recs = 0; rec.fieldname(recs) != NULL; recs++);
int rows = recs > 15 ? 20 : recs+4; const int fpp = 16; // Fields per page
int pages = recs/15 + (recs % 15 ? 1 : 0); const int rows = recs > fpp ? 20 : recs+4;
const int pages = recs/fpp + (recs % fpp ? 1 : 0);
TMask m("Modifica record", pages, 78, rows); TMask m("Modifica record", pages, 78, rows);
int curpage = 0, currow = 1, nid = 100; 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 // add fields ONE by ONE
TString16 s(cp); s.left_just(16); TString16 s(cp); s.left_just(16);
int len = rec.length(cp); const int len = rec.length(cp);
switch (rec.type(cp)) switch (rec.type(cp))
{ {
case _alfafld: case _alfafld:
m.add_string(nid++,curpage, s, 3, currow, len, "", m.add_string(nid++,curpage, s, 3, currow, len, "", len > 50 ? 50 : len);
len > 50 ? 50 : len);
break; break;
case _intfld: case _intfld:
case _longfld: case _longfld:
case _wordfld: case _wordfld:
case _realfld: case _realfld:
m.add_number(nid++, curpage, s, 3, currow, len, "", m.add_number(nid++, curpage, s, 3, currow, len, "R", rec.ndec(cp));
rec.ndec(cp));
break; break;
case _datefld: case _datefld:
m.add_date(nid++, curpage, s, 3, currow); m.add_date(nid++, curpage, s, 3, currow);
@ -151,8 +153,7 @@ KEY TEdit_file::edit_record(TRectype& rec, bool readonly)
break; break;
case _intzerofld: case _intzerofld:
case _longzerofld: case _longzerofld:
m.add_number(nid++, curpage, s, 3, currow, len, "Z", m.add_number(nid++, curpage, s, 3, currow, len, "Z", rec.ndec(cp));
rec.ndec(cp));
break; break;
default: default:
break; break;
@ -160,7 +161,7 @@ KEY TEdit_file::edit_record(TRectype& rec, bool readonly)
m.field(nid-1).set(rec.get(cp)); 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_OK, curpage, "", -12, -1, 9, 2);
m.add_button(DLG_CANCEL, curpage, "", -22, -1, 9, 2); m.add_button(DLG_CANCEL, curpage, "", -22, -1, 9, 2);

View File

@ -2,7 +2,8 @@
0|Anagrafiche|1 0|Anagrafiche|1
0|Contabilita'|4|7 0|Contabilita'|4|7
0|Terreni e fabbricati|tefa -t 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|Modello 770|17|4
0|Manutenzione|15 0|Manutenzione|15
1|Gestione Anagrafiche|1 1|Gestione Anagrafiche|1