class PriceDiscAdmTable_ExtHandler
{
[FormDataFieldEventHandler(formDataFieldStr(PriceDiscAdm, PriceDiscAdmTrans, relation), FormDataFieldEventType::Modified)]
public static void relation_OnModified(FormDataObject sender, FormDataFieldEventArgs e)
{
FormDataSource priceDiscAdmTrans_ds = sender.datasource();
PriceDiscAdmTrans _priceDiscAdmTrans = priceDiscAdmTrans_ds.cursor();
if( _priceDiscAdmTrans.relation != PriceType::LineDiscPurch &&
_priceDiscAdmTrans.relation != PriceType::PricePurch &&
_priceDiscAdmTrans.relation != PriceType::LineDiscSales &&
_priceDiscAdmTrans.relation != PriceType::PriceSales
)
{
error('Relation: Only price or line discount is valid selection!');
throw exception::Error;
}
}
}
No comments:
Post a Comment