= "select" + slv-> listfield + "," + Slv-> keyfield + "from" + slv-> table;
form-> tblAdd-> SQL-> Clear ();
form-> tblAdd-> SQL-> Add (str);
try
{
form-> tblAdd-> Close ();
form-> tblAdd-> Open ();
} catch (EOracleError & E)
{
ShowMessage (E.Message + ", запит: '"+ Str +"' ");
return;
}
}
// --------------------------------------------- ------------------------------
void __ fastcall TfrmUniForm :: TuneFilters ()
{
if (! parentform) return;
TList * patfrm_fltlst = ((TfrmUniForm *) parentform) -> fltlst;
TList * patfrm_fldlst = ((TfrmUniForm *) parentform) -> fldlst;
if (patfrm_fltlst)
{
for (int r = 0; r Count; r + +)
for (int i = 0; i Count; i + +)
{
TfltAddInfo * tm_r = ((TfltAddInfo *) (fltlst-> Items [r]));
TfltAddInfo * tm_i = ((TfltAddInfo *) (patfrm_fltlst-> Items [i]));
if (tm_r-> name == tm_i-> name)
{
tm_r-> retid = tm_i-> retid;
tm_r-> rettitle = tm_i-> rettitle;
TfrmFilter * src = ((TfrmFilter *) tm_r-> pntr);
src-> edt-> Text = tm_i-> rettitle;
// в uid повертається вибраний код
AnsiString str = tm_r-> filtersql;
if (retid.IsEmpty ()) str = "";
else StrRpl (str, "% 1", retid);
form-> FilterBy ("a" + IntToStr (tm_r-> code), str);
}
}
}
if (accept && patfrm_fldlst)
{
TfrmUniForm * uni = ((TfrmUniForm *) parentform);
if (! uni-> form-> tblBrowse-> IsEmpty ())
{
for (int r = 0; r Count; r + +)
for (int i = 0; i Count; i + +)
{
TfieldAddInfo * fl = ((TfieldAddInfo *) patfrm_fldlst-> Items [r]);
TfrmeFieldsN * tm_i = ((TfrmeFieldsN *) (fl-> form));
TfltAddInfo * tm_r = ((TfltAddInfo *) (fltlst-> Items [i]));
if ((fl-> type == (AnsiString) "C") && (Fl-> fieldname == tm_r-> name))
if (! Uni-> form-> tblBrowse-> FieldByName (fl-> fieldname) -> IsNull)
{
tm_r-> retid = uni-> form-> tblBrowse-> FieldByName (fl-> fieldname) -> AsString;
tm_r-> rettitle = tm_i-> name-> Text;
TfrmFilter * src = ((TfrmFilter *) tm_r-> pntr);
src-> edt-> Text = tm_i-> name-> Text;
// в uid повертається вибраний код
AnsiString str = tm_r-> filtersql;
if (retid.IsEmpty ()) str = "";
else StrRpl (str, "% 1", retid);
form-> FilterBy ("a" + IntToStr (tm_r-> code), str);
}
}
}
}
}
// --------------------------------------------- ------------------------------
void __ fastcall TfrmUniForm :: CommonButtonClick (TObject * Sender)
...