///
///
///
///
///
[FormDataSourceEventHandler(formDataSourceStr(InventJournalName, InventJournalName), FormDataSourceEventType::Activated)]
public static void InventJournalName_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)
{
FormRun formRun = sender.formRun();
FormDataSource inventJournalName_ds = formRun.dataSource(formDataSourceStr(InventJournalName, InventJournalName)) as FormDataSource;
InventJournalName inventJournalName= inventJournalName_ds .cursor();
FormTabPageControl TabFinancialDimensions = formRun.design(0).controlName("TabFinancialDimensions");
switch (inventJournalName.JournalType)
{
case InventJournalType::Movement:
inventJournalName_ds.object(fieldNum(InventJournalName, LocationDimensionLink)).visible(true);
TabFinancialDimensions.visible(true);
break;
default:
inventJournalName_ds.object(fieldNum(InventJournalName, LocationDimensionLink)).visible(false);
TabFinancialDimensions.visible(false);
}
}
OnModified - DataSource Method:
///
///
///
///
///
[FormDataFieldEventHandler(formDataFieldStr(InventJournalName, InventJournalName, JournalType), FormDataFieldEventType::Modified)]
public static void JournalType_OnModified(FormDataObject sender, FormDataFieldEventArgs e)
{
FormDataSource inventJournalName_ds = sender.datasource();
FormRun formRun = sender.datasource().formRun();
InventJournalName inventJournalName = inventJournalName_ds.cursor();
FormTabPageControl TabFinancialDimensions = formRun.design(0).controlName("TabFinancialDimensions");
switch (inventJournalName.JournalType)
{
case InventJournalType::Movement:
inventJournalName_ds.object(fieldNum(InventJournalName, LocationDimensionLink)).visible(true);
TabFinancialDimensions.visible(true);
break;
default:
inventJournalName_ds.object(fieldNum(InventJournalName, LocationDimensionLink)).visible(false);
TabFinancialDimensions.visible(false);
}
}
No comments:
Post a Comment