예제 #1
0
        private void ValidateLayout(ItemGridLayout layout, dynamic itemType)
        {
            if (layout.ColumnOrderList.Count > 1 && layout.ColumnOrderList.Count == layout.ColumnWidthsList.Count)
            {
                return;
            }

            layout.UpdateLayout(itemType);
        }
예제 #2
0
        public ItemGridLayout GetItemGridLayout(string itemTypeName)
        {
            dynamic itemType = GetItemType(itemTypeName);

            ItemGridLayout layout = itemGridLayouts.FirstOrDefault(x => x.ItemTypeId == itemType.getID());

            if (layout == null && !itemType.isError())
            {
                dynamic item = this.GetLayoutPreference(itemType.getID());
                layout = new ItemGridLayout(item);
                ValidateLayout(layout, itemType);

                itemGridLayouts.Add(layout);
            }

            return(layout);
        }