一、复制Form数据源事件
二、写在Form的class中
[ExtensionOf(formStr(PriceDiscAdmTable))]
final class PriceDiscAdmTableF1Vya_Extension
{
///
///
///
///
///
[FormDataSourceEventHandler(formDataSourceStr(PriceDiscAdmTable, PriceDiscAdmTable), FormDataSourceEventType::Activated)]
public static void PriceDiscAdmTable_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)
{
FormRun formRun = sender.formRun() as FormRun;
FormDataSource fds = formRun.dataSource(tableStr(PriceDiscAdmTable));
PriceDiscAdmTable priceDiscAdmTable = fds.cursor() as PriceDiscAdmTable;//获取选中数据
FormFunctionButtonControl vyaPriceDiscAdmTableChangeRequest = formRun.design().controlName("VyaPriceDiscAdmTableChangeRequest");//获取按钮控件
if (priceDiscAdmTable.Posted ==NoYes::No)//控制按钮是否可点击
{
vyaPriceDiscAdmTableChangeRequest.enabled(true);
}
else
{
vyaPriceDiscAdmTableChangeRequest.enabled(false);
}
}
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
总结