• ShowVendDefaultDimension


    static void ShowVendDefaultDimensions(Args _args)
    {
        VendTable                       vendTable;
        DimensionAttributeValueSet      dimAttrValueSet;
        DimensionAttributeValueSetItem  dimAttrValueSetItem;
        DimensionAttributeValue         dimAttrValue;
        DimensionAttribute              dimAttr;
        Common                          dimensionValueEntity;
        ;
    
        // Find our supplier
        vendTable = VendTable::find('BRMF-000003');
    
        // Find the dimension value set that the vendor points to (for specifying the
        // 'default' dimensions). This table is used as a sort of 'header' that the
        // value set items (DimensionAttributeValueSetItem) records belong to.
        dimAttrValueSet = DimensionAttributeValueSet::find(vendTable.DefaultDimension);
    
        // Find all of the 'value set items' linked against the 'value set'
        while select dimAttrValueSetItem
            where   dimAttrValueSetItem.DimensionAttributeValueSet   == dimAttrValueSet.RecId
        {
            // Find the dimension 'value' (DimensionAttributeValue) that the set item points to.
            dimAttrValue        = DimensionAttributeValue::find(dimAttrValueSetItem.DimensionAttributeValue);
    
            // Find the underlying attribute.
            dimAttr             = DimensionAttribute::find(dimAttrValue.DimensionAttribute);
    
            // Use the helper class to obtain a reference to the underlying entity (can be anything)
            dimensionValueEntity = DimensionDefaultingControllerBase::findBackingEntityInstance(
                curext(),
                dimAttr,
                dimAttrValue.EntityInstance);
    
            info(dimAttr.Name + ' ' + dimAttrValue.getValue());
        }
    }
    static void ShowVendDefaultDimensions2(Args _args)
    {
        VendTable                         vendTable = VendTable::find('BRMF-000003');
        DimensionAttributeValueSetStorage dimStorage;
        Counter i;
    
        dimStorage = DimensionAttributeValueSetStorage::find(vendTable.DefaultDimension);
    
        for (i=1 ; i<= dimStorage.elements() ; i++)
        {
            info(strFmt("%1 = %2", DimensionAttribute::find(dimStorage.getAttributeByIndex(i)).Name,
                                   dimStorage.getDisplayValueByIndex(i)));
        }
    }
  • 相关阅读:
    一位资深程序员大牛给予Java初学者的学习路线建议
    Java基础部分全套教程.
    Java进阶面试问题列表
    成为伟大程序员的 10 个要点
    一位资深程序员大牛给予Java初学者的学习路线建议
    2年Java开发工作经验面试总结
    有效处理Java异常三原则
    Java打飞机小游戏(附完整源码)
    原生ajax封装,包含post、method方式
    手机端布局,rem布局动态获取根字体大小
  • 原文地址:https://www.cnblogs.com/rumenren/p/5542508.html
Copyright © 2020-2023  润新知