tveritin
Зарегистрирован: 26.01.2016 Сообщения: 191 Откуда: Санкт-Петербург
|
Добавлено: Чт Дек 23, 2021 16:41 Заголовок сообщения: Форма с выпадающим списком |
|
|
Сгенерировал форму в дизайнере.
Код: | alias _dlgresource = (
/*Version of Dynamic Resource*/
ver=4011;
/*Dialog(rect,options), menu, sline, {help}*/
(0, 0, 474, 675, 0xc80),,,{};
/*Memo(rect,options),field,{sql},size,'hint'*/
M,(25, 45, 345, 15, 0x0),"Текст ДИ",(15, 60, 435, 560, 0x4008),3,{},0,"";
/*Lookup(pFilter,options),field,{sql},link,draw,data,'hint'*/
E,(30, 15, 141, 20, 0x0),"ДИ",(105, 10, 345, 20, 0x4),1,{select id_hr_doc, convert(varchar,hrtb_doc.id_hr_doc)+': '+hrtb_doc.name + ': Статус' + (select name from hrtb_status where id_hr_status=hrtb_doc.id_hr_status)[]"Код документа + Наименование + Статус"
from hrtb_doc _hintbrowser
where id_hr_doc_type in (select id_hr_doc_type from hrtb_doc_type where name like '%должностн%') and id_firm=@@id_firm and name_table='CELLS' and id_hr_rec=@$Glob:Cell_item},0,2,1,"";
);
dialog{
/*init procedure*/
/*tab procedure*/
TAB {};
/* sql */
select hrtb_doc.id_hr_doc,
convert(varchar,hrtb_doc.id_hr_doc)+': '+hrtb_doc.name + ': Статус' + (select name from hrtb_status where id_hr_status=hrtb_doc.id_hr_status)[]"Код документа + Наименование + Статус",
STRING_AGG(hrtb_doc_fold.name + char(13)+char(10) + trim(char(13)+char(10) from isnull(hrtb_docparam.text_subj_up,'')), char(13)+char(10)) WITHIN GROUP ( ORDER BY hrtb_doc.id_hr_doc, hrtb_docparam.sort_num)[]"Текст ДИ"
from dbo.hrtb_doc hrtb_doc with (nolock)
join dbo.hrtb_doc_type hrtb_doc_type on hrtb_doc_type.id_hr_doc_type = hrtb_doc.id_hr_doc_type
join dbo.hrtb_docparam hrtb_docparam on hrtb_docparam.id_hr_doc = hrtb_doc.id_hr_doc
join dbo.hrtb_doc_fold hrtb_doc_fold on hrtb_doc_fold.id_hr_doc_fold = hrtb_docparam.id_hr_doc_fold
where hrtb_doc.id_firm = @@id_firm
and hrtb_doc.name_table = 'Cells' and hrtb_doc_type.code_doc_type = 'BOSS_JOBDSC_KZ'
and @@d_from between hrtb_doc.d_from and hrtb_doc.d_to
and hrtb_doc.id_hr_rec = @$Glob:Cell_item
and hrtb_doc.id_hr_status <> isnull((select top 1 id_hr_status from hrtb_status where name_table = 'hrtb_doc' and check_finish = 2 and cast(getdate() as date) between d_from and d_to),0)
group by hrtb_doc.id_hr_doc, hrtb_doc.name, hrtb_doc.code, hrtb_doc.id_hr_status
},0x10,""; |
Хотелось бы при выборе значения из выпадающего списка добиться обновления содержимого memo-поля. |
|