zoukankan      html  css  js  c++  java
  • 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)));
        }
    }
  • 相关阅读:
    Objective-C入门教程03:属性(@property和@synthesize)
    iOS 开发的9个超有用小技巧
    oc关于非原子属性
    如果局部变量与实例变量同名,那么如何在局部变量的作用域内引用实例变量?
    从0开始搭建vue+webpack脚手架(一)
    ES6学习之 解构赋值
    Vue+webpack项目中实现跨域的http请求
    Vuejs核心思想学习笔记
    更改file文件上传默认CSS样式
    javascript获取style兼容性问题
  • 原文地址:https://www.cnblogs.com/rumenren/p/5542508.html
Copyright © 2011-2022 走看看