1) GO to FORM--> Datasource--> Events---> OnQueryExecuting--> Copy EventHandlerMEthod
2) Create Class by Extension of FormDataSource(FormName, DatasourceName))]
Final class XXXXX_Extension
{
Paste Copied Eventhandler here and change according to example below.
}
EXAMPLE:
[Extensionof(FormDataSourcestr(SysUserManagement, UserInfo))]
final class SYSUSERINFO_Extension
{
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[FormDataSourceEventHandler(formDataSourceStr(SysUserManagement, UserInfo), FormDataSourceEventType::QueryExecuting)]
public static void UserInfo_OnQueryExecuting(FormDataSource sender, FormDataSourceEventArgs e)
{
FormRun SysUserManagementForm = sender.formRun();
sender.query().dataSourceName(sender.name()).addRange(fieldnum(UserInfo, Company)).value(queryValue('USMF'));
}
}
No comments:
Post a Comment