2023年11月

Num2Str

    num2str
    (
    moneyReal,
    -1, // Minimum number of characters to output into the string. -1 means infinite number of characters

    -1, // Required number of digits to the right of the decimal. -1 means infinite number of digitis

    DecimalSeparator::Dot,    // 1
    ThousandSeparator::Comma  // 2
    );

private DimensionDefault CreateDefaultDimension(container conAttr, container conValue)
{
    DimensionAttributeValueSetStorage   valueSetStorage = new DimensionAttributeValueSetStorage();

    int                     i;
    DimensionAttribute      dimensionAttribute;
    DimensionAttributeValue dimensionAttributeValue;

    str                     dimValue;

    for (i = 1; i <= conLen(conAttr); i++)
    {
        dimensionAttribute = dimensionAttribute::findByName(conPeek(conAttr,i));
   
        if (dimensionAttribute.RecId == 0)
        {
            continue;
        }
   
        dimValue = conPeek(conValue,i);
   
        if (dimValue != "")
        {
            // The last parameter is "true". A dimensionAttributeValue record will be created if not found.
            dimensionAttributeValue =
                dimensionAttributeValue::findByDimensionAttributeAndValue(dimensionAttribute,dimValue,false,true);
       
            // Add the dimensionAttibuteValue to the default dimension
            valueSetStorage.addItem(dimensionAttributeValue);
        }
    }

    return valueSetStorage.save();
}

————————————————
版权声明:本文为CSDN博主「mahailiang」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/mahailiang/article/details/82383086