Exemplo n.º 1
0
        public static void SetAttribute(this WonkaProduct poTargetProduct, WonkaRefAttr poTargetAttr, string psTargetValue)
        {
            if (poTargetProduct.GetProductGroup(poTargetAttr.GroupId).GetRowCount() <= 0)
            {
                poTargetProduct.GetProductGroup(poTargetAttr.GroupId).AppendRow();
            }

            poTargetProduct.GetProductGroup(poTargetAttr.GroupId)[0][poTargetAttr.AttrId] = psTargetValue;
        }
Exemplo n.º 2
0
        public static bool SetAttribute(this WonkaProduct poTargetProduct, WonkaRefAttr poTargetAttr, string psTargetValue)
        {
            bool bSuccess = true;

            if (poTargetProduct.GetProductGroup(poTargetAttr.GroupId).GetRowCount() <= 0)
            {
                poTargetProduct.GetProductGroup(poTargetAttr.GroupId).AppendRow();
            }

            poTargetProduct.GetProductGroup(poTargetAttr.GroupId)[0][poTargetAttr.AttrId] = psTargetValue;

            return(bSuccess);
        }
Exemplo n.º 3
0
        public static string GetAttributeValue(this WonkaProduct poTargetProduct, WonkaRefAttr poTargetAttr)
        {
            string sAttrValue = "";

            if (poTargetProduct.HasProductGroup(poTargetAttr.GroupId))
            {
                if (poTargetProduct.GetProductGroup(poTargetAttr.GroupId)[0].ContainsKey(poTargetAttr.AttrId))
                {
                    sAttrValue = poTargetProduct.GetProductGroup(poTargetAttr.GroupId)[0][poTargetAttr.AttrId];
                }
            }

            return(sAttrValue);
        }