Patch level : 10.0 270
Files correlati : ca2.exe ca2500a.msk Ricompilazione Demo : [ ] Commento : Aggiunto programma di invio a Board. Ripristinate funzioni di visualizzazione e salvataggio ripartizione temporale delle righe nella modifica movimenti analitici git-svn-id: svn://10.65.10.50/branches/R_10_00@23205 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a60ddc249b
commit
fdc9d4c8de
@ -83,13 +83,24 @@ TDate::TDate(const char* s)
|
||||
const int y = atoi(&s[6]);
|
||||
_val = makedata(d, m, y);
|
||||
}
|
||||
else
|
||||
if (s[4] == s[7] && !isdigit(s[4]))
|
||||
{
|
||||
const int y = atoi(s);
|
||||
const int m = atoi(&s[5]);
|
||||
const int d = atoi(&s[8]);
|
||||
_val = makedata(d, m, y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
if (day() < 1 || day() > 31 || month() < 1 || month() > 12 || year() < 0)
|
||||
yesnofatal_box("Lamentati con Guy se la data '%s' non viene accettata!", s);
|
||||
#endif
|
||||
|
||||
if (_val == 19000101L)
|
||||
_val = NULLDATE; // sql nulldate 1900-01-01
|
||||
|
||||
}
|
||||
|
||||
TDate::TDate(int day, int month, int year)
|
||||
|
@ -451,9 +451,38 @@ int TODBC_recordset::compare_key(const TISAM_recordset& dbfset)
|
||||
{
|
||||
const int nfield = keydes.FieldSeq[f] % MaxFields;
|
||||
const char* fname = recdes.Fd[nfield].Name;
|
||||
cmp = dbfset.get(fname).compare(get(fname));
|
||||
const bool upper = keydes.FieldSeq[f] > MaxFields;
|
||||
switch (recdes.Fd[f].TypeF)
|
||||
{
|
||||
case _alfafld:
|
||||
case _memofld:
|
||||
if (upper)
|
||||
cmp = xvt_str_compare_ignoring_case(dbfset.get(fname).as_string(), get(fname).as_string());
|
||||
else
|
||||
cmp = dbfset.get(fname).compare(get(fname));
|
||||
break;
|
||||
case _realfld:
|
||||
{
|
||||
const real dbfnum = dbfset.get(fname).as_real();
|
||||
const real sqlnum = get(fname).as_real();
|
||||
if (dbfnum != sqlnum)
|
||||
cmp = dbfnum < sqlnum ? -1 : +1;
|
||||
}
|
||||
break;
|
||||
case _datefld:
|
||||
{
|
||||
const TDate dbfdate = dbfset.get(fname).as_date();
|
||||
const TDate sqldate = get(fname).as_date();
|
||||
if (dbfdate != sqldate)
|
||||
cmp = dbfdate < sqldate ? -1 : +1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
cmp = dbfset.get(fname).as_int() - get(fname).as_int();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return cmp;
|
||||
return cmp;
|
||||
}
|
||||
|
||||
int TODBC_recordset::compare_rec(const TISAM_recordset& dbfset)
|
||||
@ -471,8 +500,8 @@ int TODBC_recordset::compare_rec(const TISAM_recordset& dbfset)
|
||||
{
|
||||
case _alfafld:
|
||||
case _memofld:
|
||||
cmp = xvt_str_compare_ignoring_case(dbffld.as_string(), sqlfld.as_string());
|
||||
break;
|
||||
cmp = dbffld.compare(sqlfld);
|
||||
break;
|
||||
case _realfld:
|
||||
{
|
||||
const real dbfnum = dbffld.as_real();
|
||||
@ -484,7 +513,7 @@ int TODBC_recordset::compare_rec(const TISAM_recordset& dbfset)
|
||||
case _datefld:
|
||||
{
|
||||
const TDate dbfdate = dbffld.as_date();
|
||||
const TDate sqldate = dbffld.as_date();
|
||||
const TDate sqldate = sqlfld.as_date();
|
||||
if (dbfdate != sqldate)
|
||||
cmp = dbfdate < sqldate ? -1 : +1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user