int active()
{
int ret;
TmpInventTransWMS InventTransWMS;
;
//<iba>
InventTransWMS.setTmpData(TmpInventTransWMS);
select firstOnly InventDimId from InventTransWMS
where InventTransWMS.Thy_ValidationField == false;
//</iba>
ret = super();
tmpInventTransWMS_DS.setEnabled(!tmpInventTransWMS.RecId);
tmpInventDim_DS.active();
//<iba>
if (InventTransWMS.InventDimId != '')
{
ctrlUpdateButton.enabled(false);
}
else
ctrlUpdateButton.enabled(true);
//</iba>
return ret;
}
Here is an other example to run through records in a dataSource Grid :
// Created on 21 Jui 2011 at 13:57:25 by iba
ItemId findDocNumItem(BomId bomId)
{
InventTable inventTable;
Bom localBom;
;
localBom.setTmpData(Bom);
select firstOnly ItemId from localBom
join inventTable
where localBom.ItemId == inventTable.ItemId
&& inventTable.ItemGroupId == InventParameters::find().Thy_ItemGroupId
&& localBom.BOMId == bomId;
BomItemId = localBom.ItemId ;
return BomItemId;
}
Aucun commentaire:
Enregistrer un commentaire