/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[FormDataSourceEventHandler(formDataSourceStr(WHSWorkTableListPage, WHSWorkTable), FormDataSourceEventType::Activated)]
public static void WHSWorkTable_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)
{
WHSWorkTable rec;
boolean flag = false;
WHSWorkTable whsWorkTable = sender.cursor();
FormDataSource whsWorkTable_ds = sender.formRun().dataSource("whsWorkTable");
FormRun element = sender.formRun();
FormControl itemblocked = element.design(0).controlName("ItemBlocked");
FormControl itemunblocked = element.design(0).controlName("ItemUnBlocked");
for (rec = getFirstSelection(whsWorkTable_ds); rec; rec = whsWorkTable_ds.getNext())
{
if(rec.WorkId && rec.WorkStatus == WHSWorkStatus::Open && rec.WorkTransType == WHSWorkTransType::CycleCount)
{
flag = true;
}
else
{
flag = false;
break;
}
}
if(flag == true)
{
itemblocked.enabled(true);
itemunblocked.enabled(true);
}
else
{
itemblocked.enabled(false);
itemunblocked.enabled(false);
}
}
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[FormDataSourceEventHandler(formDataSourceStr(WHSWorkTableListPage, WHSWorkTable), FormDataSourceEventType::Activated)]
public static void WHSWorkTable_OnActivated(FormDataSource sender, FormDataSourceEventArgs e)
{
WHSWorkTable rec;
boolean flag = false;
WHSWorkTable whsWorkTable = sender.cursor();
FormDataSource whsWorkTable_ds = sender.formRun().dataSource("whsWorkTable");
FormRun element = sender.formRun();
FormControl itemblocked = element.design(0).controlName("ItemBlocked");
FormControl itemunblocked = element.design(0).controlName("ItemUnBlocked");
for (rec = getFirstSelection(whsWorkTable_ds); rec; rec = whsWorkTable_ds.getNext())
{
if(rec.WorkId && rec.WorkStatus == WHSWorkStatus::Open && rec.WorkTransType == WHSWorkTransType::CycleCount)
{
flag = true;
}
else
{
flag = false;
break;
}
}
if(flag == true)
{
itemblocked.enabled(true);
itemunblocked.enabled(true);
}
else
{
itemblocked.enabled(false);
itemunblocked.enabled(false);
}
}
No comments:
Post a Comment