wse-> Fields-> Fields [i] -> Required;
flms [i] -> ReadOnly = form-> tblBrowse-> Fields-> Fields [i] -> ReadOnly;
flms [i] -> FieldName = form-> tblBrowse-> Fields-> Fields [i] -> FieldName;
flms [i] -> Size = form-> tblBrowse-> Fields-> Fields [i] -> Size;
flms [i] -> Tag = (int) dtype;
}
form-> tblBrowse-> Close ();
for (int i = 0; i DataSet = Form-> tblBrowse;
// додамо lookup-поле
TStringField * fld = new TStringField (form-> tblBrowse);
fld-> ReadOnly = true;
fld-> FieldName = desc-> listfield;
fld-> FieldKind = fkLookup;
AnsiString tmp;
tmp = lnk-> linktofield; StrRpl (tmp, ",", ";"); p> fld-> KeyFields = tmp;
tmp = slv-> keyfield; StrRpl (tmp, ",", ";"); p> fld-> LookupKeyFields = tmp;
fld-> LookupDataSet = form-> tblAdd;
fld-> LookupResultField = slv-> listfield;
fld-> Lookup = true;
if (form-> tblAdd-> Active)
fld-> Size = form-> tblAdd-> FieldByName (slv-> listfield) -> Size;
fld-> DataSet = form-> tblBrowse;
form-> dbgBrowse-> Columns-> Items [0] -> FieldName = fld-> FieldName;
form-> dbgBrowse-> Columns-> Items [0] -> Title-> Caption = "Назва";
}
AnsiString strw;
if (! accept | |! desc-> hideonaccept)
{
strw = "select * from buttons where parentform = '"+ Desc-> formname +"' ";
if (! desc-> takefieldsfrom.IsEmpty ()) strw + = "Or parentform = '" + desc-> takefieldsfrom + "'";
strw + = "order by sortorder desc";
if (SELECT (mqrA, strw))
{
do
{
TToolButton * btn = form-> AddLinkBtn (mqrA-> FieldByName ("title") -> AsString, CommonButtonClick);
TbtnAddInfo * inf = new TbtnAddInfo ();
inf-> childform = mqrA-> FieldByName ("childform") -> AsString;
inf-> childtitle = mqrA-> FieldByName ("childtitle") -> AsString;
inf-> linkform = mqrA-> FieldByName ("linkform") -> AsString;
inf-> linktofield = mqrA-> FieldByName ("linktofield") -> AsString;
inf-> linkfromfield = mqrA-> FieldByName ("linkfromfield") -> AsString;
inf-> type = mqrA-> FieldByName ("type") -> AsString;
inf-> sql = mqrA-> FieldByName ("sql") -> AsString;
btn-> Tag = btnlst-> Add (inf);
mqrA-> Next ();
} while (! mqrA-> Eof);
}
}
strw = "select * from filters where parentform = '"+ Desc-> formname +"' ";
if (! desc-> takefieldsfrom.IsEmpty ()) strw + = "Or parentform = '" + desc-> takefieldsfrom + "'";
strw + = "order by sortorder desc";
if (SELECT (mqrA, strw))
{
do
{
TfrmFilter * flt = form-> AddFilter (mqrA-> FieldByName ("title") ...