Riporto di Marco dal Co (verificare!!!)
git-svn-id: svn://10.65.10.50/trunk@1705 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
84dc43a34b
commit
b1210fb257
@ -29,7 +29,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __VEUML_H
|
#ifndef __VEUML_H
|
||||||
#include "\prassi\VEUML.H"
|
#include "f:\u\alex\p.due\ve\VEUML.H"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __SHEET_H
|
#ifndef __SHEET_H
|
||||||
@ -56,9 +56,18 @@
|
|||||||
#include "VE0100D.H"
|
#include "VE0100D.H"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Handlers per i campi delle bolle
|
||||||
|
|
||||||
|
extern bool ora_hndl(TMask_field& field, KEY key);
|
||||||
|
extern bool codcli_hndl(TMask_field& field, KEY key);
|
||||||
|
extern bool dummy_hndl(TMask_field& field, KEY key);
|
||||||
|
|
||||||
// Numero di colonne presenti sullo sheet totale
|
// Numero di colonne presenti sullo sheet totale
|
||||||
#define MAX_COLUMNS 22
|
#define MAX_COLUMNS 22
|
||||||
|
|
||||||
|
#define F_LBTIPORIGA 175
|
||||||
|
#define F_TIPIDOCS 172
|
||||||
|
|
||||||
// Definizione della classe dell'applicazione motore
|
// Definizione della classe dell'applicazione motore
|
||||||
class TMotore_application : public TRelation_application
|
class TMotore_application : public TRelation_application
|
||||||
{
|
{
|
||||||
@ -109,7 +118,7 @@ class TMotore_application : public TRelation_application
|
|||||||
// Funzioni per il calcolo delle righe
|
// Funzioni per il calcolo delle righe
|
||||||
real user_row_calculate( TRectype& row, int index );
|
real user_row_calculate( TRectype& row, int index );
|
||||||
|
|
||||||
void user_set_handler( int index, int filedid );
|
void user_set_handler( int fieldid, int index );
|
||||||
|
|
||||||
long prossimo_numero( bool provv );
|
long prossimo_numero( bool provv );
|
||||||
int avanza_numero( bool provv );
|
int avanza_numero( bool provv );
|
||||||
@ -168,7 +177,7 @@ public:
|
|||||||
TMask& query_mask( ) { CHECK( _msk, "Maschera di ricerca nulla!" ); return *_msk; };
|
TMask& query_mask( ) { CHECK( _msk, "Maschera di ricerca nulla!" ); return *_msk; };
|
||||||
TMask& edit_mask( ) { CHECK( _msk1, "Maschera di modifica nulla!" ); return *_msk1; };
|
TMask& edit_mask( ) { CHECK( _msk1, "Maschera di modifica nulla!" ); return *_msk1; };
|
||||||
TRelation& rel( ) { CHECK( _rel, "Relazione nulla!" ); return *_rel; };
|
TRelation& rel( ) { CHECK( _rel, "Relazione nulla!" ); return *_rel; };
|
||||||
TSheet_field& sheet( ) { CHECK( _sheet, "Sheet nullo!" ); return *_sheet; };
|
TSheet_field& sheet( ) { CHECK( _sheet, "Sheet nullo!" ); return *_sheet; };
|
||||||
|
|
||||||
// Operazione
|
// Operazione
|
||||||
|
|
||||||
@ -228,8 +237,14 @@ real TMotore_application::user_row_calculate( TRectype& r, int index )
|
|||||||
void TMotore_application::user_set_handler( int fieldid, int index )
|
void TMotore_application::user_set_handler( int fieldid, int index )
|
||||||
{
|
{
|
||||||
switch( index )
|
switch( index )
|
||||||
{ case 100:
|
{ case 1:
|
||||||
// edit_mask( ).set_handler( fieldeid, myhandler );
|
edit_mask( ).set_handler( fieldid, ora_hndl );
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
edit_mask( ).set_handler( fieldid, codcli_hndl );
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
edit_mask( ).set_handler( fieldid, dummy_hndl );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
CHECK( FALSE, "tentativo di installare un handler non definito" );
|
CHECK( FALSE, "tentativo di installare un handler non definito" );
|
||||||
@ -382,7 +397,7 @@ void TMotore_application::configura_sheet( TSheet_field& sheet, TConfig& config
|
|||||||
sheet.set_column_width( i, sheet_col.get_int( 2 ) );
|
sheet.set_column_width( i, sheet_col.get_int( 2 ) );
|
||||||
sheet.move_column( sheet_col.get_int( 0 ) - 1, i );
|
sheet.move_column( sheet_col.get_int( 0 ) - 1, i );
|
||||||
}
|
}
|
||||||
for ( int j = MAX_COLUMNS; j >= i - 1; j -- )
|
for ( int j = MAX_COLUMNS; j >= i - 1; j -- )
|
||||||
sheet.delete_column( j );
|
sheet.delete_column( j );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,4 +3,97 @@
|
|||||||
#include "ve0100c.h"
|
#include "ve0100c.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VEUML_H
|
||||||
|
#include "f:\u\alex\p.due\ve\VeUML.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VEUML1_H
|
||||||
|
#include "f:\u\alex\p.due\ve\VeUML1.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __CHECKS_H
|
||||||
|
#include <checks.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MASK_H
|
||||||
|
#include <mask.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MASKFLD_H
|
||||||
|
#include <maskfld.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __KEYS_H
|
||||||
|
#include <keys.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __STRINGS_H
|
||||||
|
#include <strings.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern bool ora_hndl(TMask_field& field, KEY key);
|
||||||
|
extern bool codcli_hndl(TMask_field& field, KEY key);
|
||||||
|
extern bool dummy_hndl(TMask_field& field, KEY key);
|
||||||
|
|
||||||
|
bool ora_hndl(TMask_field& field, KEY key)
|
||||||
|
{
|
||||||
|
if (key == K_TAB)
|
||||||
|
{
|
||||||
|
if (field.to_check(key))
|
||||||
|
{
|
||||||
|
TFixed_string ora(field.get(),6);
|
||||||
|
ora.trim();
|
||||||
|
if (ora.not_empty() || field.required())
|
||||||
|
{
|
||||||
|
// bool changed = FALSE;
|
||||||
|
if (isdigit(ora[0]))
|
||||||
|
{
|
||||||
|
if (ora[2] != ':')
|
||||||
|
{
|
||||||
|
if (ora.len()>4) ora.overwrite(":",2);
|
||||||
|
else ora.insert(":", 2);
|
||||||
|
// changed = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool ok;
|
||||||
|
ok = ((isdigit(ora[0]))&&(isdigit(ora[1]))&&(isdigit(ora[3]))&&(isdigit(ora[4])));
|
||||||
|
ok &= ((atoi(&(ora[0]))<24)&&(atoi(&(ora[3]))<60));
|
||||||
|
if (!ok)
|
||||||
|
{
|
||||||
|
error_box("Ora errata o formato non valido");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else /* if (changed) */
|
||||||
|
{
|
||||||
|
field.set((ora));
|
||||||
|
// field.picture_data((ora),TRUE);
|
||||||
|
// field.picture_data((ora.strip(":")),FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool codcli_hndl(TMask_field& field, KEY key)
|
||||||
|
{
|
||||||
|
if (key == K_TAB)
|
||||||
|
{
|
||||||
|
if (field.to_check(key))
|
||||||
|
{
|
||||||
|
field.send_key(K_TAB,F_CODVAL);
|
||||||
|
field.send_key(K_TAB,F_CODLIN);
|
||||||
|
field.send_key(K_TAB,F_CODPAG);
|
||||||
|
field.send_key(K_TAB,F_CODABIA);
|
||||||
|
field.send_key(K_TAB,F_CODCABA);
|
||||||
|
field.send_key(K_TAB,F_INDSP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool dummy_hndl(TMask_field& field, KEY key)
|
||||||
|
{
|
||||||
|
warning_box("Al campo %d + arrivato un KEY %d",field.dlg(),key);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <xvt_defs.h>
|
#include <xvt_defs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "\prassi\veuml.h"
|
#include "veuml.h"
|
||||||
|
|
||||||
#ifndef __CHECKS_H
|
#ifndef __CHECKS_H
|
||||||
#include <checks.h>
|
#include <checks.h>
|
||||||
|
78
ve/veuml.h
Executable file
78
ve/veuml.h
Executable file
@ -0,0 +1,78 @@
|
|||||||
|
#ifndef __VEUML_H
|
||||||
|
#define __VEUML_H
|
||||||
|
|
||||||
|
#define F_CODNUM 101 // GESTITO DAL MOTORE
|
||||||
|
#define F_ANNO 102 // GESTITO DAL MOTORE
|
||||||
|
#define F_PROVV 103 // GESTITO DAL MOTORE
|
||||||
|
#define F_NDOC 104 // GESTITO DAL MOTORE
|
||||||
|
#define F_STATO 105 // GESTITO DAL MOTORE
|
||||||
|
#define F_DATADOC 106
|
||||||
|
#define F_TIPOCF 107 // GESTITO DAL MOTORE
|
||||||
|
#define F_CODCF 108
|
||||||
|
#define F_OCFPI 109
|
||||||
|
#define F_OCCAS 110
|
||||||
|
#define F_CODVAL 111
|
||||||
|
#define F_CAMBIO 112
|
||||||
|
#define F_CODLIN 113
|
||||||
|
#define F_RAGGR 114 // GESTITO DAL MOTORE
|
||||||
|
#define F_CODPAG 115
|
||||||
|
#define F_DATAINSC 116
|
||||||
|
#define F_CODABIA 117
|
||||||
|
#define F_CODCABA 118
|
||||||
|
#define F_CODABIP 119
|
||||||
|
#define F_CODCABP 120
|
||||||
|
#define F_CODLIST 121
|
||||||
|
#define F_CODCONT 122
|
||||||
|
#define F_CODCAMP 123
|
||||||
|
#define F_SCONTOPERC 124
|
||||||
|
#define F_CODINDSP 125
|
||||||
|
#define F_DATADOCRIF 126
|
||||||
|
#define F_NUMDOCRIF 127
|
||||||
|
#define F_CODAG 128
|
||||||
|
#define F_CODAGVIS 129
|
||||||
|
#define F_CODSPMEZZO 130
|
||||||
|
#define F_CODPORTO 131
|
||||||
|
#define F_CODNOTESP1 132
|
||||||
|
#define F_CODNOTESP2 133
|
||||||
|
#define F_CAUSTRASP 134
|
||||||
|
#define F_CODVETT1 135
|
||||||
|
#define F_CODVETT2 136
|
||||||
|
#define F_CODVETT3 137
|
||||||
|
#define F_NCOPIE 138 // GESTITO DAL MOTORE
|
||||||
|
#define F_DATAPART 139
|
||||||
|
#define F_ORAPART 140
|
||||||
|
#define F_IMPPAGATO 141
|
||||||
|
#define F_ACCSALDO 142
|
||||||
|
#define F_DOC1 143
|
||||||
|
#define F_DOC2 144
|
||||||
|
#define F_DOC3 145
|
||||||
|
#define F_DATACONS 146
|
||||||
|
#define F_ASPBENI1 147
|
||||||
|
#define F_ASPBENI2 148
|
||||||
|
#define F_IMPNETTI 149
|
||||||
|
#define F_RAGGREFF 150 // GESTITO DAL MOTORE
|
||||||
|
#define F_SPESEINC 151
|
||||||
|
#define F_ADDBRB 152
|
||||||
|
#define F_ADDBTR 153
|
||||||
|
#define F_ADDBDE 154
|
||||||
|
#define F_CODIVABRB 155
|
||||||
|
#define F_CODIVABTR 156
|
||||||
|
#define F_CODIVABTRE 157
|
||||||
|
#define F_CODIVABDE 158
|
||||||
|
#define F_UMTARA 159
|
||||||
|
#define F_TARA 160
|
||||||
|
#define F_UMPNETTO 161
|
||||||
|
#define F_PNETTO 162
|
||||||
|
#define F_NCOLLI 163
|
||||||
|
#define F_CAUSMAG1 164
|
||||||
|
#define F_CAUSMAG2 165
|
||||||
|
#define F_NOTE 166
|
||||||
|
#define F_G1 167
|
||||||
|
#define F_G2 168
|
||||||
|
#define F_DATAAGG 169 // GESTITO DAL MOTORE
|
||||||
|
#define F_UTENTE 170 // GESTITO DAL MOTORE
|
||||||
|
#define F_PROFILO 171 // GESTITO DAL MOTORE
|
||||||
|
#define F_TIPODOC 172 // GESTITO DAL MOTORE
|
||||||
|
#define F_DESNUM 173 // GESTITO DAL MOTORE
|
||||||
|
|
||||||
|
#endif // veuml.h
|
41
ve/veuml1.h
Executable file
41
ve/veuml1.h
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#ifndef __VEUML1_H
|
||||||
|
#define __VEUML1_H
|
||||||
|
|
||||||
|
#ifndef __VEUML_H
|
||||||
|
#include "VEUML.H"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// gruppo dei vettori
|
||||||
|
|
||||||
|
#define GR_VETTORI 15
|
||||||
|
|
||||||
|
// campi della maschera totale
|
||||||
|
|
||||||
|
#define F_RAGSOC 301
|
||||||
|
#define F_INDCF 302
|
||||||
|
#define F_CIVCF 303
|
||||||
|
#define F_NOME_VAL 304
|
||||||
|
#define F_DESCODPAG 305
|
||||||
|
#define F_DATASCAD1 306
|
||||||
|
#define F_DATASCAD2 307
|
||||||
|
#define F_DATASCAD3 308
|
||||||
|
#define F_DATASCAD4 309
|
||||||
|
#define F_DATASCAD5 310
|
||||||
|
#define F_BANCA_APP 311
|
||||||
|
#define F_BANCA_PRE 312
|
||||||
|
#define F_INDSP 313
|
||||||
|
#define F_CIVSP 314
|
||||||
|
#define F_CAPSP 315
|
||||||
|
#define F_LOCALITASP 316
|
||||||
|
#define F_PORTO 317
|
||||||
|
#define F_DENCAUSTRASP 318
|
||||||
|
#define F_NOMEVETT1 319
|
||||||
|
#define F_NOMEVETT2 320
|
||||||
|
#define F_NOMEVETT3 321
|
||||||
|
#define F_DESCRBENI1 322
|
||||||
|
#define F_DESCRBENI2 323
|
||||||
|
#define F_DESUMTARA 324
|
||||||
|
#define F_DESUMPNETTO 325
|
||||||
|
#define F_DESCRMAG1 326
|
||||||
|
#define F_DESCRMAG2 327
|
||||||
|
#endif // __VEUML1_H
|
Loading…
x
Reference in New Issue
Block a user