lue>>, а також їх можливі NULL
filter = TranslateString (filter, FilterValue);
StrRpl (filter, "'NULL'", "NULL");
}
// --------------------------------------------- ------------------------------
int __ fastcall TfrmUniForm :: CallOtherForm (AnsiString _form, AnsiString _title, AnsiString _filter,
bool _modal, bool _accept)
{
UseReplaces (_title, _filter);
int res = 0;
try
{
TfrmUniForm * frm = new TfrmUniForm (((_modal)? (TForm *) Owner: (TForm *) frmMain), NULL, _form);
frm-> parentform = this;
if (! _filter.Trim (). IsEmpty ()) frm-> form-> FilterBy ("parent", _filter);
if (_accept) {frm-> TuneForAccept (); frm-> parentform = this;}
if (! _title.Trim (). IsEmpty ()) frm-> Caption = _title;
frm-> Execute ();
if (_modal)
{
frm-> FormStyle = fsNormal;
res = frm-> ShowModal ();
retid = frm-> uid;
rettitle = frm-> rettitle;
В
} else
{
frm-> FormStyle = fsMDIChild;
frm-> Show ();
}
} catch (Exception & E)
{
ShowMessage (E.Message);
}
return res;
}
// --------------------------------------------- ------------------------------
void __ fastcall TfrmUniForm :: formdbgBrowseDblClick (TObject * Sender)
{
if (accept && form-> btbtnOK-> Visible && Form-> pnlLCOK-> Visible)
formbtbtnOKClick (this);
}
// --------------------------------------------- ------------------------------
AnsiString __ fastcall TfrmUniForm :: FieldValue (AnsiString valname)
{
AnsiString tmp;
if (! Form-> tblBrowse-> FieldByName (valname.Trim ()) -> IsNull)
tmp = form-> tblBrowse-> FieldByName (valname.Trim ()) -> AsString;
else
tmp = "NULL";
return tmp;
}
// --------------------------------------------- ------------------------------
AnsiString __ fastcall TfrmUniForm :: FilterValue (AnsiString valname)
{
AnsiString tmp;
// з'ясуємо поточне значення вказаного фільтра
for (int r = 0; r Count; r + +)
{
TfltAddInfo * tm = ((TfltAddInfo *) (fltlst-> Items [r]));
if (tm-> name == valname.Trim ())
{
if (! tm-> retid.IsEmpty ())
tmp = tm-> retid;
else
tmp = "NULL";
}
}
return tmp;
}
// --------------------------------------------- ------------------------------
// ф-ція розбору рядка
AnsiString __ fastcall TfrmUniForm :: TranslateString (AnsiString str, TGetValueEvent evt)
{
AnsiString tmp, filter, _filter = str;
tmp = "";
filter = "";
<...