Files correlati : lv0.exe Ricompilazione Demo : [ ] Commento : Aggiunto il calendario giorni lavorativi e festività nella configurazione lavanderie Aggiunto menu per i documenti git-svn-id: svn://10.65.10.50/trunk@17527 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			115 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			115 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
| #ifndef __LVLIB_H
 | |
| #define __LVLIB_H
 | |
| 
 | |
| #ifndef __ISAM_H
 | |
| #include <isam.h>
 | |
| #endif
 | |
| 
 | |
| #ifndef __RECSET_H
 | |
| #include <recset.h>
 | |
| #endif
 | |
| 
 | |
| #ifndef __VARREC_H
 | |
| #include <varrec.h>
 | |
| #endif
 | |
| 
 | |
| #include "../mg/mglib.h"
 | |
| 
 | |
| void lv_set_creation_info(TRectype& rec);
 | |
| void lv_set_update_info(TRectype& rec);
 | |
| 
 | |
| class TRecmag_lavanderie : public TVariable_rectype
 | |
| 
 | |
| {
 | |
| 	TVariant _dotin;
 | |
| 	TVariant _dotod;
 | |
| 	TVariant _dottm;
 | |
| 	TVariant _consanno;
 | |
| 	TVariant _consmese;
 | |
| 	long _update_time;
 | |
| 
 | |
| protected:
 | |
|   virtual const TString & get_str(const char* fieldname) const ;
 | |
| 	virtual void put_str(const char* fieldname, const char* val) { return TRectype::put_str(fieldname, val);}
 | |
| 	void update();
 | |
| 
 | |
| public:
 | |
| 	virtual int name2index(const char* fieldname) const;
 | |
| 	virtual TFieldtypes type(const char* fieldname) const;
 | |
| 	virtual int length(const char* fieldname) const;
 | |
| 	virtual int ndec(const char* fieldname) const;
 | |
| 	virtual bool exist(const char* fieldname) const;
 | |
|   virtual TObject* dup() const;
 | |
|   TRecmag_lavanderie();
 | |
| 	TRecmag_lavanderie(const TRecmag_lavanderie & rec) : TVariable_rectype(rec), _update_time(0L) {}
 | |
|   virtual ~TRecmag_lavanderie() {}
 | |
| };
 | |
| 
 | |
| class TArticolo_lavanderie : public TArticolo_giacenza_data
 | |
| {      
 | |
| 		int _anno_lav;
 | |
| 		char _tipocf;
 | |
| 		long _codcf;
 | |
| 		int _indsped;
 | |
| 
 | |
| protected:
 | |
|   // la get_str supporta anche la sintassi:
 | |
|   //     #LF->fieldname              
 | |
|   //     #LF_par1->fieldname              
 | |
|   //     #LF_par1_par2->fieldname              
 | |
|   //     #LF_par1_par2_par3->fieldname              
 | |
|   // dove:
 | |
|   //   LF = numero logico del sottofile collegato (LF_UMART, LF_DESLIN, LF_CODCORR
 | |
|   //   par1, par2, par3 = varie parti della chiave dell'indice del file collegato
 | |
|   //          il numero di queste parti ed il loro valore dipende dal file collegato
 | |
|   //          se parX comincia per # rappresenta il numero progressivo nell'indice 
 | |
|   //   fieldname = nome del campo nel file collegato
 | |
|   virtual const TString & get_str(const char* fieldname) const ;
 | |
|   virtual void set_body_key(TRectype & rowrec);
 | |
|   void set_anno_lav (int anno = 0);
 | |
| 	void set_anno_lav (const char * anno) { set_anno_mag(atoi(anno)); }
 | |
|   virtual TRectype * new_body_record(int logicnum = 0);
 | |
| public:
 | |
|   virtual TObject* dup() const { return new TArticolo_lavanderie(codice(), _tipocf, _codcf, _indsped); }
 | |
| 
 | |
|   int find_clifomag(TRecord_array& rclifomag, const char * livello = NULL, int from = 0) const ;
 | |
|   int find_clifomag(int annoes, const char * livello = NULL, int from = 0) const ;
 | |
| 	int find_clifomag(const char * annoes, const char * livello = NULL, int from = 0) const { return find_clifomag(atoi(annoes), livello, from); }
 | |
| 
 | |
|   TRecord_array & clifomag(int annoes) const;
 | |
| 	TRecord_array & clifomag(const char * annoes) const { return clifomag(atoi(annoes));}
 | |
| 
 | |
| 	void set_tipocf(char tipocf) { _tipocf = tipocf;}
 | |
| 	void set_codcf(long codcf) { _codcf = codcf;}
 | |
| 	void set_indsped(int indsped) { _indsped = indsped;}
 | |
|   
 | |
| 	TArticolo_lavanderie(const char* codice = NULL, const char tipocf = ' ', const long codcf = 0L, const int indsped = 0);
 | |
| 	TArticolo_lavanderie(const TRectype& rec, const char tipocf = ' ', const long codcf = 0L, const int indsped = 0);
 | |
|   virtual ~TArticolo_lavanderie() {}
 | |
| };  
 | |
| 
 | |
| TArticolo_lavanderie & cached_article_laundry(const char * codart, const char tipocf, const long codcf, const int indsped);
 | |
| 
 | |
| class TLavanderie_calendar : public TObject
 | |
| {
 | |
| 	int _year;
 | |
|   TBit_array _days;
 | |
| 	bool _dirty;
 | |
| 
 | |
| public:
 | |
| 	int read(int year = 0);
 | |
|   int write() const;
 | |
|   int rewrite() const { return write(); }
 | |
|   int remove() const;
 | |
| 
 | |
|   void set_holiday(const TDate& date, bool holiday = true);
 | |
| 	void reset_holiday(const TDate& date) { set_holiday(date, false);}
 | |
|   bool is_holiday(const TDate& date) const;
 | |
| 
 | |
| 
 | |
|   TLavanderie_calendar(int year);
 | |
|   virtual ~TLavanderie_calendar() { }
 | |
| };
 | |
| 
 | |
| #endif
 |