public static NamedSetInfo CreateNamedSetInfo(NamedSet set)
        {
            if (set == null)
                return null;
            NamedSetInfo info = new NamedSetInfo();

            info.Caption = set.Caption;
            info.Description = set.Description;
            info.Name = set.Name;
            info.DisplayFolder = set.DisplayFolder;
            info.Expression = set.Expression;

            // Информация о предках
            if (set.ParentCube != null)
            {
                info.ParentCubeId = set.ParentCube.Name;
                info.CustomProperties.Add(new PropertyInfo(InfoBase.CUBE_CAPTION, set.ParentCube.Caption));
            }

            // Свойства
            foreach (Property prop in set.Properties)
            {
                PropertyInfo pi = new PropertyInfo(prop.Name, prop.Value);
                info.Properties.Add(pi);
            }
            return info;
        }
Exemplo n.º 2
0
        public static NamedSetInfo CreateNamedSetInfo(NamedSet set)
        {
            if (set == null)
            {
                return(null);
            }
            NamedSetInfo info = new NamedSetInfo();

            info.Caption       = set.Caption;
            info.Description   = set.Description;
            info.Name          = set.Name;
            info.DisplayFolder = set.DisplayFolder;
            info.Expression    = set.Expression;

            // Информация о предках
            if (set.ParentCube != null)
            {
                info.ParentCubeId = set.ParentCube.Name;
                info.CustomProperties.Add(new PropertyInfo(InfoBase.CUBE_CAPTION, set.ParentCube.Caption));
            }

            // Свойства
            foreach (Property prop in set.Properties)
            {
                PropertyInfo pi = new PropertyInfo(prop.Name, prop.Value);
                info.Properties.Add(pi);
            }
            return(info);
        }
 public NamedSet_AreaItemWrapper(NamedSetInfo info)
     : base(info)
 {
     Name = info.Name;
 }
 public NamedSetTreeNode(NamedSetInfo info)
     : base(info)
 {
     Icon = UriResources.Images.NamedSet16;
 }