campo-sirio/sc/scselect.h
guy 0c33db8d25 Velocizzata e corretta stampa delloo scadenzario e dei solleciti
git-svn-id: svn://10.65.10.50/trunk@3741 c028cbd2-c16b-5b4b-a496-9718f37d4682
1996-10-09 14:19:27 +00:00

95 lines
2.2 KiB
C++
Executable File

#ifndef __SCSELECT_H
#define __SCSELECT_H
#ifndef __ASSOC_H
#include <assoc.h>
#endif
#ifndef __CONTO_H
class TBill;
#endif
#ifndef __MASK_H
#include <mask.h>
#endif
#ifndef __RELATION_H
#include <relation.h>
#endif
#ifndef __SHEET_H
#include <sheet.h>
#endif
#ifndef __SCSELMSK_H
#include "scselmsk.h"
#endif
#ifndef __CLIFO_H
#include <clifo.h>
#endif
class TSelection_mask : public TMask
{
TRelation* _clifo_rel;
TCursor* _cli_cur_k1;
TCursor* _cli_cur_k2;
TCursor* _for_cur_k1;
TCursor* _for_cur_k2;
TCursor_sheet* _cli_sh_k1;
TCursor_sheet* _cli_sh_k2;
TCursor_sheet* _for_sh_k1;
TCursor_sheet* _for_sh_k2;
char _who; // Clienti, fornitori, conti
int _key; // 1 = per codice, 2 = per descrizione
TAssoc_array _assoc;
bool _all_selected;
protected: // TMask
virtual void set_handler(short fld_id, CONTROL_HANDLER handler);
virtual bool stop_run(KEY k);
protected:
void select_clifo_range(long from, long to);
void select_des_clifo_range(const TString & from, const TString & to);
void set_clifo_limits();
void set_des_clifo_limits();
void set_who(char w) { _who = w; }
void set_key (int k) { _key = k; }
void reset_sheets();
void update_assoc();
// handlers
static bool bfrom_handler(TMask_field& f, KEY k);
static bool bto_handler(TMask_field& f, KEY k);
static bool ffrom_handler(TMask_field& f, KEY k);
static bool fto_handler(TMask_field& f, KEY k);
static bool breset_handler(TMask_field& f, KEY k);
static bool bselect_handler(TMask_field& f, KEY k);
static bool rclifo_handler(TMask_field& f, KEY k);
static bool rsortcf_handler(TMask_field& f, KEY k);
static bool bdfrom_handler(TMask_field& f, KEY k);
static bool bdto_handler(TMask_field& f, KEY k);
static bool fdfrom_handler(TMask_field& f, KEY k);
static bool fdto_handler(TMask_field& f, KEY k);
public:
TCursor_sheet& cur_sheet() const;
char get_who() const { return _who; }
int get_key() const { return _key; }
bool selected(const TBill& c) const;
bool selected(int g, int c, long s) const;
TSelection_mask(const char* name);
virtual ~TSelection_mask();
};
#endif