Esempio n. 1
0
 public ListEntryInfoCollection GetListEntryInfoCollection(string ListName, string Value, string ParentKey) // Get collection of entry lists
 {
     ListEntryInfoCollection objListEntryInfoCollection = new ListEntryInfoCollection();
     ArrayList arrListEntries = CBO.FillCollection(DataProvider.Instance().GetListEntriesByListName(ListName, Value, ParentKey), typeof(ListEntryInfo));
     foreach (ListEntryInfo entry in arrListEntries)
     {
         objListEntryInfoCollection.Add(entry.Key, entry);
     }
     return objListEntryInfoCollection;
 }
Esempio n. 2
0
        public ListEntryInfoCollection GetListEntryInfoCollection(string listName, string parentKey, int portalId)
        {
            var items = GetListEntryInfoItems(listName, parentKey, portalId);

            var collection = new ListEntryInfoCollection();
            if (items != null)
            {
                items.ToList().ForEach(x => collection.Add(x.Key, x));
            }
            return collection;
        }
        /// <summary>
        /// Adds a single default property definition
        /// </summary>
        /// <param name="PortalId">Id of the Portal</param>
        /// <param name="category">Category of the Property</param>
        /// <param name="name">Name of the Property</param>
        private static void AddDefaultDefinition(int PortalId, string category, string name, string strType, int length, ListEntryInfoCollection types)
        {
            ListEntryInfo typeInfo = types.Item("DataType." + strType);
            if (typeInfo == null)
            {
                typeInfo = types.Item("DataType.Unknown");
            }

            ProfilePropertyDefinition propertyDefinition = new ProfilePropertyDefinition();
            propertyDefinition.DataType = typeInfo.EntryID;
            propertyDefinition.DefaultValue = "";
            propertyDefinition.ModuleDefId = Null.NullInteger;
            propertyDefinition.PortalId = PortalId;
            propertyDefinition.PropertyCategory = category;
            propertyDefinition.PropertyName = name;
            propertyDefinition.Required = false;
            propertyDefinition.Visible = true;
            propertyDefinition.Length = length;

            _orderCounter += 2;

            propertyDefinition.ViewOrder = _orderCounter;

            AddPropertyDefinition(propertyDefinition);
        }