Example #1
0
        private void AddSimpleDataTypeDefaultValue(PimDefaultValuesList newDefValuesList, String baseName, Boolean IsArray, String FieldName, int arraySize)
        {
            String additionalInfo = "";

            if ((IsArray))
            {
                if (arraySize > 0)
                {
                    additionalInfo = "[" + arraySize.ToString() + "]";
                }
                else
                {
                    additionalInfo = "*";
                }
            }

            PimDefaultValue defValue = PimFabric.GetInstance().CreatePimDefaultValue();

            defValue.DefaultValue = "";
            defValue.FieldGuid    = Guid.Empty;
            if (baseName.Length > 0)
            {
                defValue.Name = baseName + "." + FieldName + additionalInfo;
            }
            else
            {
                defValue.Name = FieldName + additionalInfo;
            }
            newDefValuesList.Add(defValue);
        }
Example #2
0
        private void AddComplexDataTypeFieldDefaultValue(PimDefaultValuesList newDefValuesList, String baseName, ComplexDataTypeField cmplfield)
        {
            String additionalInfo = "";

            if (cmplfield.IsPointer)
            {
                additionalInfo = "*";
            }

            PimDefaultValue defValue = PimFabric.GetInstance().CreatePimDefaultValue();

            defValue.DefaultValue = "";
            defValue.FieldGuid    = cmplfield.GUID;
            if (baseName.Length > 0)
            {
                defValue.Name = baseName + "." + cmplfield.Name + additionalInfo;
            }
            else
            {
                defValue.Name = cmplfield.Name + additionalInfo;
            }
            newDefValuesList.Add(defValue);
        }