Patch level : 10.1030

Files correlati     :  ve0.exe ve2.exe mg1.exe mg3.exe mg4.exe db0.exe
Ricompilazione Demo : [ ]
Commento            :



Aggiunto il parametro (CUSTOM_SEARCH_47(2)=X dove 47 e' l'identificatore del file anamag e 2 e' il numero della chiaveper descrizione) nel paragrafo Main del file ini della ditta  per aggiungere la descrizione estesa alle discerche per descrizione degli articoli


git-svn-id: svn://10.65.10.50/branches/R_10_00@22310 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2011-06-22 15:44:50 +00:00
parent 2c62b68c96
commit 704a59156d
3 changed files with 9 additions and 5 deletions

View File

@ -1071,7 +1071,7 @@ int TBaseisamfile::_rewrite(const TRectype& rec)
_lasterr = get_error(_lasterr);
}
else
DB_unlock(fhnd);
DB_unlock(fhnd); // non vale la pena farlo sempre ?
_recno = DB_recno(fhnd);
prefix().unlock_record(_isam_handle, _recno);
@ -4097,7 +4097,7 @@ TRecfield::TRecfield(TRectype& rec, const char* name, int from, int to)
_p += from;
if (to >= 0)
{
CHECKS(from <= to && to <= rd.Fd[nf].Len, "Invalid Range on field ", (const char *)_name);
CHECKS(_type == _memofld || (from <= to && to <= rd.Fd[nf].Len), "Invalid Range on field ", (const char *)_name);
_len = to - from + 1;
}
else

View File

@ -2251,7 +2251,7 @@ void TBrowse::custom_cursor()
if (_cursor->key() == 2 && ini_get_bool(CONFIG_DITTA, "Main", "CUSTOM_SEARCH_" TOSTRING(LF_ANAMAG), false, 2))
{
delete _cursor;
_cursor = new TSorted_cursor(relation, ANAMAG_DESCR "|" ANAMAG_DESCRAGG, "", 2);
_cursor = new TSorted_cursor(relation, ANAMAG_DESCR "|" ANAMAG_DESCRAGG "[1,50]", "", 2);
set_custom_filter_handler(descr_filter_handler);
}
break;

View File

@ -2044,7 +2044,7 @@ TRecnotype TSorted_cursor::buildcursor(TRecnotype rp)
const char* TSorted_cursor::fill_sort_key(TString& k)
{
TString sf;
TString256 sf;
k.cut(0);
for (TString80 s = _order_expr.get(0); s.not_empty(); s = _order_expr.get())
{
@ -2075,6 +2075,7 @@ const char* TSorted_cursor::fill_sort_key(TString& k)
{
case _boolfld:
case _charfld:
case _memofld:
case _alfafld: sf.left_just(fld_len); break;
case _datefld: break; // Gia' lungo 8!
default : sf.right_just(fld_len); break;
@ -2457,7 +2458,10 @@ const char* TFieldref::read(const TRectype& rec) const
if (_from > 0 || _to > 0 || _name.find(':') > 0)
{
const TRecfield rf((TRectype&)rec, _name, _from, _to-1);
buffer = rf;
if (rf.type() == _memofld && _to > 0)
buffer = rec.get(_name).mid(_from, _to);
else
buffer = rf;
}
else
buffer = rec.get(_name);