Patch level : 12.0 no patch

Files correlati     : 
Commento            :

Aggiunto il FLAG - ai campi interi per avere l'anno precedente a quello attuale

git-svn-id: svn://10.65.10.50/branches/R_10_00@23344 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
bonazzi 2016-09-29 18:42:09 +00:00
parent e036b0b4af
commit 8297ffbf7d
2 changed files with 9 additions and 0 deletions

View File

@ -66,6 +66,7 @@ TMask_field::TField_Flags::TField_Flags()
trim = 0x3;
pipeallowed = false;
user = false;
previous = false;
}
// Certified 100%
@ -82,6 +83,8 @@ char TMask_field::TField_Flags::update(const char* f, bool reset)
case ' ':
case '_':
trim = 0; break;
case '-':
previous = true; break;
case '*':
password = !reset; break;
case 'A':
@ -3143,6 +3146,8 @@ void TReal_field::create(WINDOW w)
{
const TDate oggi(TODAY);
int anno = oggi.year(); // Anno solare o ...
if (previous())
anno--;
if (has_query_button() && browse() != NULL && browse()->cursor() != NULL)
{
TCursor& cur = *browse()->cursor();

View File

@ -130,6 +130,7 @@ protected:
bool zerofilled : 1;
bool pipeallowed : 1;
bool user : 1;
bool previous : 1;
TField_Flags();
char update(const char* f, bool reset = false);
@ -250,6 +251,9 @@ public:
// @cmember Ritorna true se il campo e' automagic
bool automagic() const
{ return _flags.automagic; }
// @cmember Ritorna true se il campo devo proporre ad esempio l'anno precedente
bool previous() const
{ return _flags.previous; }
// @cmember Ritorna true se ha un bottone di campo
bool has_button() const
{ return _flags.button; }