Пример #1
0
        public override void GetPropertyList(ref List <ScoreProperty> listProperties)
        {
            base.GetPropertyList(ref listProperties);
            listProperties.Add(new ScoreProperty
            {
                ID           = 131,
                Name         = "IsAvg",
                Display      = "IsAvg",
                PropertyName = "IsAvg",
                Description  = "IsAvg",
                Category     = 2,
                Flag         = ScorePropertyFlag.All,
                OrderID      = 7,
                DataType     = ScorePropertyDataType.Bool
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 132,
                Name         = "Items",
                Display      = "Items",
                PropertyName = "Items",
                Description  = "Items",
                Category     = 2,
                Flag         = ScorePropertyFlag.Normal,
                OrderID      = 8,
                DataType     = ScorePropertyDataType.ScoreItem
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 133,
                Name         = "HasAutoStandard",
                Display      = "HasAutoStandard",
                PropertyName = "HasAutoStandard",
                Description  = "HasAutoStandard",
                Category     = 2,
                Flag         = ScorePropertyFlag.Normal,
                OrderID      = 9,
                DataType     = ScorePropertyDataType.Bool
            });
            //设置特定属性的不可见
            ScoreProperty scoreProperty = listProperties.FirstOrDefault(p => p.Name == "ViewClassic");

            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Normal;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "ScoreType");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Normal;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "IsKeyItem");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Normal;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "IsAllowNA");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Normal;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "UsePointSystem");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Normal;
            }
        }
Пример #2
0
        /// <summary>
        /// 获取属性列表
        /// </summary>
        /// <param name="listProperties"></param>
        public override void GetPropertyList(ref List <ScoreProperty> listProperties)
        {
            base.GetPropertyList(ref listProperties);
            listProperties.Add(new ScoreProperty
            {
                ID           = 151,
                Name         = "Creator",
                Display      = "Creator",
                PropertyName = "Creator",
                Description  = "Creator",
                Category     = 0,
                Flag         = ScorePropertyFlag.Normal,
                OrderID      = 14,
                DataType     = ScorePropertyDataType.Double
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 152,
                Name         = "CreateTime",
                Display      = "CreateTime",
                PropertyName = "CreateTime",
                Description  = "CreateTime",
                Category     = 0,
                Flag         = ScorePropertyFlag.Xml | ScorePropertyFlag.Copy,
                OrderID      = 15,
                DataType     = ScorePropertyDataType.DateTime
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 153,
                Name         = "Status",
                Display      = "Status",
                PropertyName = "Status",
                Description  = "Status",
                Category     = 0,
                Flag         = ScorePropertyFlag.Xml | ScorePropertyFlag.Copy,
                OrderID      = 16,
                DataType     = ScorePropertyDataType.SString
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 154,
                Name         = "DateFrom",
                Display      = "DateFrom",
                PropertyName = "DateFrom",
                Description  = "DateFrom",
                Category     = 2,
                Flag         = ScorePropertyFlag.All,
                OrderID      = 9,
                DataType     = ScorePropertyDataType.DateTime
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 155,
                Name         = "DateTo",
                Display      = "DateTo",
                PropertyName = "DateTo",
                Description  = "DateTo",
                Category     = 2,
                Flag         = ScorePropertyFlag.All,
                OrderID      = 10,
                DataType     = ScorePropertyDataType.DateTime
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 156,
                Name         = "UseTag",
                Display      = "UseTag",
                PropertyName = "UseTag",
                Description  = "UseTag",
                Category     = 0,
                Flag         = ScorePropertyFlag.Xml | ScorePropertyFlag.Copy,
                OrderID      = 17,
                DataType     = ScorePropertyDataType.Double
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 157,
                Name         = "QualifiedLine",
                Display      = "QualifiedLine",
                PropertyName = "QualifiedLine",
                Description  = "QualifiedLine",
                Category     = 1,
                Flag         = ScorePropertyFlag.All,
                OrderID      = 6,
                DataType     = ScorePropertyDataType.Double
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 158,
                Name         = "CalAdditionalItem",
                Display      = "CalAdditionalItem",
                PropertyName = "CalAdditionalItem",
                Description  = "CalAdditionalItem",
                Category     = 2,
                Flag         = ScorePropertyFlag.All,
                OrderID      = 11,
                DataType     = ScorePropertyDataType.Bool
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 159,
                Name         = "ControlItems",
                Display      = "ControlItems",
                PropertyName = "ControlItems",
                Description  = "ControlItems",
                Category     = 2,
                Flag         = ScorePropertyFlag.All,
                OrderID      = 12,
                DataType     = ScorePropertyDataType.ControlItem
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 191,
                Name         = "ScoreWidth",
                Display      = "ScoreWidth",
                PropertyName = "ScoreWidth",
                Description  = "ScoreWidth",
                Category     = 2,
                Flag         = ScorePropertyFlag.All,
                OrderID      = 13,
                DataType     = ScorePropertyDataType.Double
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 192,
                Name         = "TipWidth",
                Display      = "TipWidth",
                PropertyName = "TipWidth",
                Description  = "TipWidth",
                Category     = 2,
                Flag         = ScorePropertyFlag.All,
                OrderID      = 14,
                DataType     = ScorePropertyDataType.Double
            });
            //设置某些属性的可见性
            ScoreProperty scoreProperty = listProperties.FirstOrDefault(p => p.Name == "ViewClassic");

            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.All;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "ScoreType");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.All;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "UsePointSystem");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.All;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "IsAddtionItem");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Normal;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "IsAbortScore");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Normal;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "IsAvg");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Normal;
            }
        }
Пример #3
0
        /// <summary>
        /// 获取属性列表
        /// </summary>
        /// <param name="listProperties"></param>
        public override void GetPropertyList(ref List <ScoreProperty> listProperties)
        {
            base.GetPropertyList(ref listProperties);
            listProperties.Add(new ScoreProperty
            {
                ID           = 141,
                Name         = "ScoreClassic",
                Display      = "ScoreClassic",
                PropertyName = "ScoreClassic",
                Description  = "ScoreClassic",
                Category     = 0,
                Flag         = ScorePropertyFlag.Normal,
                OrderID      = 14,
                DataType     = ScorePropertyDataType.Enum,
                ValueType    = typeof(StandardClassic)
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 142,
                Name         = "StandardType",
                Display      = "StandardType",
                PropertyName = "StandardType",
                Description  = "StandardType",
                Category     = 1,
                Flag         = ScorePropertyFlag.Normal,
                OrderID      = 6,
                DataType     = ScorePropertyDataType.Enum,
                ValueType    = typeof(StandardType)
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 143,
                Name         = "PointSystem",
                Display      = "PointSystem",
                PropertyName = "PointSystem",
                Description  = "PointSystem",
                Category     = 1,
                Flag         = ScorePropertyFlag.All,
                OrderID      = 7,
                DataType     = ScorePropertyDataType.Double
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 144,
                Name         = "IsAutoStandard",
                Display      = "IsAutoStandard",
                PropertyName = "IsAutoStandard",
                Description  = "IsAutoStandard",
                Category     = 1,
                Flag         = ScorePropertyFlag.Normal,
                OrderID      = 8,
                DataType     = ScorePropertyDataType.Bool
            });
            listProperties.Add(new ScoreProperty
            {
                ID           = 145,
                Name         = "StatisticalID",
                Display      = "StatisticalID",
                PropertyName = "StatisticalID",
                Description  = "StatisticalID",
                Category     = 1,
                Flag         = ScorePropertyFlag.Normal,
                OrderID      = 9,
                DataType     = ScorePropertyDataType.Long
            });
            //设置某些属性的不可见
            ScoreProperty scoreProperty = listProperties.FirstOrDefault(p => p.Name == "ViewClassic");

            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Xml | ScorePropertyFlag.Copy;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "ScoreType");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Xml | ScorePropertyFlag.Copy;
            }
            scoreProperty = listProperties.FirstOrDefault(p => p.Name == "UsePointSystem");
            if (scoreProperty != null)
            {
                scoreProperty.Flag = ScorePropertyFlag.Xml | ScorePropertyFlag.Copy;
            }
        }
Пример #4
0
        /// <summary>
        /// 复制对象属性
        /// </summary>
        /// <param name="source">源对象</param>
        /// <param name="target">目标对象</param>
        /// <param name="scoreProperty">属性</param>
        public void CopyProperty(ScoreObject source, ScoreObject target, ScoreProperty scoreProperty)
        {
            var value = scoreProperty.GetPropertyValue(source);

            scoreProperty.SetPropertyValue(target, value);
        }