Patch level : 10.0

Files correlati     : ba1.exe ba2.exe batbval.msk
Ricompilazione Demo : [ ]
Commento            :


git-svn-id: svn://10.65.10.50/branches/R_10_00@22591 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2012-02-29 17:02:29 +00:00
parent b09685bce2
commit d6107f0226
4 changed files with 82 additions and 25 deletions

View File

@ -144,7 +144,7 @@ void TRequest_form::update_serno(const TString& num)
const char* hw = "";
switch (::dongle().hardware())
{
case _dongle_aladdin : hw = "ALADDIN"; break;
case _dongle_ssa : hw = "SSA"; break;
case _dongle_hardlock: hw = "HARDLOCK"; break;
default: hw = "EUTRON"; break;
}
@ -510,7 +510,7 @@ bool TAttivazione_moduli::change_users_handler(TMask_field& fld, KEY key)
return true;
}
#define YEAR_MIN 2091
#define YEAR_MIN 2081
#define YEAR_MAX 2777
bool TAttivazione_moduli::assist_handler(TMask_field& fld, KEY key)
@ -540,7 +540,7 @@ bool TAttivazione_moduli::change_assist_handler(TMask_field& fld, KEY key)
{
if (key == K_SPACE)
{
TMask m(TR("Assistenza"), 1, 26, 7);
TMask m(TR("Assistenza"), 1, 26, 9);
m.add_number(101, 0, PR("Anno "), 1, 1, 4, "U");
m.add_string(102, 0, PR("Codice "), 1, 2, 8, "DU");

View File

@ -390,7 +390,8 @@ bool Tdnist_mask::load_xml(TString_array& a) const
TString msg; msg.format(FR("Scansione cartella %s: %d files"), (const char*)path, xml.items());
TProgind pi(xml.items(), msg);
TFilename fname;
TFilename fname, tmpname;
TFilename tmpdir; tmpdir.tempdir(); tmpdir.add("www");
FOR_EACH_ARRAY_ROW(xml, r, row)
{
if (!pi.addstatus(1)) break;
@ -400,8 +401,19 @@ bool Tdnist_mask::load_xml(TString_array& a) const
if (sn > 0)
{
TToken_string& r = find_or_create_line(a, sn);
TXmlItem i; i.Load(fname);
i.ForEach(XmlScanner, (long)&r);
tmpname = tmpdir; tmpname.add(fname.name());
TXmlItem i;
bool scan = false;
if (!tmpname.exist())
{
scan = i.Load(fname);
i.Save(tmpname);
}
else
scan = i.Load(tmpname);
if (scan)
i.ForEach(XmlScanner, (long)&r);
}
}
@ -519,6 +531,8 @@ void Tdnist_mask::merge_sheet()
xvt_dm_popup_message(msg);
}
static word _last_serno;
bool Tdnist_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
switch (o.dlg())
@ -557,14 +571,17 @@ bool Tdnist_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
FOR_EACH_SHEET_ROW(sheet, r, row)
{
const int key = row->get_int(0);
str = row->get(_c_oem);
_dninst.set(key, "OEM", str.trim());
str = row->get(_c_owner);
_dninst.set(key, "Owner", str.trim());
str = row->get(_c_suspend);
_dninst.set(key, "MustCall", str.trim());
str = row->get(_c_killed);
_dninst.set(key, "*", str.trim());
if (key > 0)
{
str = row->get(_c_oem);
_dninst.set(key, "OEM", str.trim());
str = row->get(_c_owner);
_dninst.set(key, "Owner", str.trim());
str = row->get(_c_suspend);
_dninst.set(key, "MustCall", str.trim());
str = row->get(_c_killed);
_dninst.set(key, "*", str.trim());
}
}
if (_dninst.save())
{
@ -604,7 +621,7 @@ bool Tdnist_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
if (field(F_DNINST).empty())
set(F_DNINST, "ftp://guastalla:tk0nmo4q3@www.aga.it/release/v_10.0/program");
if (field(F_FTP).empty())
set(F_FTP, "ftp://attivazioni:viagra@www.aga.it");
set(F_FTP, "ftp://attivazioni:viagra@www.aga.it"); // set(F_FTP, "ftp://attivazioni:viagra@85.18.53.183");
}
break;
case F_DSN:
@ -639,8 +656,56 @@ bool Tdnist_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
}
break;
case F_DNSHEET:
if (e == se_query_add || e == se_query_del)
return false;
switch (e)
{
case se_query_add: // Lascio aggiungere una riga alla volta
{
TSheet_field& s = (TSheet_field&)o;
TToken_string& r = s.row(s.items()-1);
_last_serno = r.get_int(0);
if (_last_serno > 0)
{
char str[8] = "";
xvt_dm_post_string_prompt(TR("Inserire il numero di serie"), str, sizeof(str));
_last_serno = atoi(str);
if (_last_serno > 0)
{
FOR_EACH_SHEET_ROW(s, r, row)
{
if (row->get_int(0) == _last_serno)
{
error_box(TR("Chiave già inserita"));
s.post_select(r);
_last_serno = 0;
break;
}
}
}
}
return _last_serno > 0;
}
case se_notify_add:
{
TSheet_field& s = (TSheet_field&)o;
s.row(jolly).add(_last_serno, 0);
}
break;
case se_notify_modify:
{
TSheet_field& s = (TSheet_field&)o;
TToken_string& r = s.row(jolly);
const int serno = r.get_int(0);
if (serno == _last_serno)
{
if (yesno_box(FR("Si desidera salvare la nuova chiave %d?"), serno))
send_key(K_SPACE, DLG_SAVEREC, &o);
_last_serno = 0;
}
}
break;
case se_query_del: return false;
default: break;
}
break;
case F_SUSPEND:
case F_KILLED:

View File

@ -7,4 +7,3 @@
#define VAL_CHANGE_OLD 122
#define VAL_LASTDATE 130
#define VAL_EURO 131
#define VAL_INEURO 133

View File

@ -99,13 +99,6 @@ BEGIN
FIELD I2
END
BOOLEAN VAL_INEURO
BEGIN
PROMPT 40 11 "Espresso Contro EURO"
FIELD B1
GROUP 3
END
NUMBER VAL_CHANGE 15 5
BEGIN
PROMPT 2 12 "Cambio "