Patch level : 1.7 at
Files correlati : at2.exe at2900a.msk Ricompilazione Demo : [ ] Commento : stampa lettere in lista frequenze git-svn-id: svn://10.65.10.50/trunk@12515 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									e81deacc5a
								
							
						
					
					
						commit
						6199face53
					
				@ -17,7 +17,7 @@
 | 
				
			|||||||
#define ALIAS_TCS	200
 | 
					#define ALIAS_TCS	200
 | 
				
			||||||
#define ALIAS_COMDOM 	501		// comune di domicilio
 | 
					#define ALIAS_COMDOM 	501		// comune di domicilio
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum ts { undefined = 0, elenco = 1, etichette = 2, stampasufile = 3 };
 | 
					enum ts { undefined = 0, elenco = 1, etichette = 2, stampasufile = 3, lettere = 4 };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// definizione form per etichette
 | 
					// definizione form per etichette
 | 
				
			||||||
class TEti_freq_form : public TForm
 | 
					class TEti_freq_form : public TForm
 | 
				
			||||||
@ -43,6 +43,7 @@ class TFrequenza : public TPrintapp
 | 
				
			|||||||
	TExternisamfile*  _file;
 | 
						TExternisamfile*  _file;
 | 
				
			||||||
	TRecord_array*		_sdonazioni;
 | 
						TRecord_array*		_sdonazioni;
 | 
				
			||||||
  TEti_freq_form*	  _form_eti;
 | 
					  TEti_freq_form*	  _form_eti;
 | 
				
			||||||
 | 
					  TEti_freq_form*	  _form_let;
 | 
				
			||||||
  TAssoc_array			_categorie;
 | 
					  TAssoc_array			_categorie;
 | 
				
			||||||
  int 							_cur;
 | 
					  int 							_cur;
 | 
				
			||||||
  TParagraph_string _cognome_nome, _dencom, _numdonsog, _dataultdon;
 | 
					  TParagraph_string _cognome_nome, _dencom, _numdonsog, _dataultdon;
 | 
				
			||||||
@ -130,6 +131,19 @@ void TFrequenza::set_page(int file, int cnt)
 | 
				
			|||||||
			}				
 | 
								}				
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
 | 
							case lettere:
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								TPrint_section& corpo = _form_let->get_body();
 | 
				
			||||||
 | 
								corpo.update();
 | 
				
			||||||
 | 
					  		for (word i = 0; i < corpo.height(); i++)
 | 
				
			||||||
 | 
					  		{
 | 
				
			||||||
 | 
					  			TPrintrow& riga = corpo.row(i);
 | 
				
			||||||
 | 
					  			set_row(i+1,riga);
 | 
				
			||||||
 | 
								}  			
 | 
				
			||||||
 | 
								force_setpage(TRUE);	// serve perchè alla prossima etichetta rifaccia la setpage
 | 
				
			||||||
 | 
																			// altrimenti stampa sempre la stessa etichetta
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
		case elenco:
 | 
							case elenco:
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			if (_stampa80)
 | 
								if (_stampa80)
 | 
				
			||||||
@ -322,6 +336,9 @@ bool TFrequenza::preprocess_page(int file, int counter)
 | 
				
			|||||||
	if (_tipostampa==etichette)		
 | 
						if (_tipostampa==etichette)		
 | 
				
			||||||
		if (printer().rows_left() < _form_eti->get_body().height())
 | 
							if (printer().rows_left() < _form_eti->get_body().height())
 | 
				
			||||||
			printer().formfeed();
 | 
								printer().formfeed();
 | 
				
			||||||
 | 
						if (_tipostampa==lettere)		
 | 
				
			||||||
 | 
							if (printer().rows_left() < _form_let->get_body().height())
 | 
				
			||||||
 | 
								printer().formfeed();
 | 
				
			||||||
	if (_tipostampa==stampasufile)
 | 
						if (_tipostampa==stampasufile)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		_file->zero();
 | 
							_file->zero();
 | 
				
			||||||
@ -411,6 +428,9 @@ bool TFrequenza::set_print(int m)
 | 
				
			|||||||
  case F_ETICHETTE:
 | 
					  case F_ETICHETTE:
 | 
				
			||||||
  	_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
 | 
					  	_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
 | 
				
			||||||
 	break;
 | 
					 	break;
 | 
				
			||||||
 | 
					  case F_LETTERE:
 | 
				
			||||||
 | 
					  	_tipostampa = (configura_stampante(p, "AT_LETTERE", "lettere")) ? lettere : undefined;
 | 
				
			||||||
 | 
					  break;
 | 
				
			||||||
  case F_FILE:        
 | 
					  case F_FILE:        
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
  	_tipostampa=stampasufile;
 | 
					  	_tipostampa=stampasufile;
 | 
				
			||||||
@ -568,11 +588,13 @@ bool TFrequenza::user_create()
 | 
				
			|||||||
  _etcolonne = config.get_int("EtColonne");
 | 
					  _etcolonne = config.get_int("EtColonne");
 | 
				
			||||||
	_form_eti = new TEti_freq_form(etformato);
 | 
						_form_eti = new TEti_freq_form(etformato);
 | 
				
			||||||
  _stampa80 = config.get_bool("Stampa80");
 | 
					  _stampa80 = config.get_bool("Stampa80");
 | 
				
			||||||
 | 
						_form_let = new TEti_freq_form("ATLETTER");
 | 
				
			||||||
  return TRUE;
 | 
					  return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool TFrequenza::user_destroy()
 | 
					bool TFrequenza::user_destroy()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					  delete _form_let;
 | 
				
			||||||
  delete _form_eti;
 | 
					  delete _form_eti;
 | 
				
			||||||
  delete _sdonazioni;
 | 
					  delete _sdonazioni;
 | 
				
			||||||
  delete _donaz;
 | 
					  delete _donaz;
 | 
				
			||||||
 | 
				
			|||||||
@ -43,4 +43,5 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#define F_ELENCO    401
 | 
					#define F_ELENCO    401
 | 
				
			||||||
#define F_ETICHETTE 402
 | 
					#define F_ETICHETTE 402
 | 
				
			||||||
#define F_FILE      403
 | 
					#define F_LETTERE   403
 | 
				
			||||||
 | 
					#define F_FILE      404
 | 
				
			||||||
 | 
				
			|||||||
@ -4,25 +4,31 @@ TOOLBAR "" 0 20 0 2
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
BUTTON F_ELENCO 9 2
 | 
					BUTTON F_ELENCO 9 2
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
        PROMPT -14 -11 "E~lenco"
 | 
					        PROMPT -15 -11 "E~lenco"
 | 
				
			||||||
        MESSAGE EXIT,F_ELENCO
 | 
					        MESSAGE EXIT,F_ELENCO
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BUTTON F_ETICHETTE 9 2
 | 
					BUTTON F_ETICHETTE 9 2
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
        PROMPT -24 -11 "~Etichette"
 | 
					        PROMPT -25 -11 "~Etichette"
 | 
				
			||||||
        MESSAGE EXIT,F_ETICHETTE
 | 
					        MESSAGE EXIT,F_ETICHETTE
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUTTON F_LETTERE 9 2
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					        PROMPT -35 -11 "~Lettere"
 | 
				
			||||||
 | 
					        MESSAGE EXIT,F_LETTERE
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BUTTON F_FILE 10 2
 | 
					BUTTON F_FILE 10 2
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
        PROMPT -34 -11 "~File"
 | 
					        PROMPT -45 -11 "~File"
 | 
				
			||||||
        MESSAGE EXIT,F_FILE
 | 
					        MESSAGE EXIT,F_FILE
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BUTTON DLG_QUIT 9 2
 | 
					BUTTON DLG_QUIT 9 2
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
        PROMPT -44 -11 ""
 | 
					        PROMPT -55 -11 ""
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ENDPAGE
 | 
					ENDPAGE
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user