Exemple #1
0
        /// <summary>
        /// 从对应属性进行填充
        /// </summary>
        /// <param name="attr"></param>
        protected internal override void FillFromAttr(ConditionMappingAttributeBase attr)
        {
            base.FillFromAttr(attr);

            ConditionMappingAttribute cmAttr = (ConditionMappingAttribute)attr;

            this.operation        = cmAttr.Operation;
            this.template         = cmAttr.Template;
            this.escapeLikeString = cmAttr.EscapeLikeString;
        }
Exemple #2
0
        private static ConditionMappingItemBase CreateConditionMappingItemByAttr(ConditionMappingAttributeBase attr)
        {
            ConditionMappingItemBase result = null;

            if (attr is InConditionMappingAttribute)
            {
                result = new InConditionMappingItem();
            }
            else
            {
                result = new ConditionMappingItem();
            }

            return(result);
        }
        /// <summary>
        /// 从对应属性进行填充
        /// </summary>
        internal protected virtual void FillFromAttr(ConditionMappingAttributeBase attr)
        {
            if (attr.DataFieldName.IsNotEmpty())
            {
                this.dataFieldName = attr.DataFieldName;
            }

            this.enumUsage         = attr.EnumUsage;
            this.prefix            = attr.Prefix;
            this.postfix           = attr.Postfix;
            this.adjustDays        = attr.AdjustDays;
            this.isExpression      = attr.IsExpression;
            this.defaultValueUsage = attr.DefaultValueUsage;
            this.utcTimeToLocal    = attr.UtcTimeToLocal;
            this.defaultExpression = attr.DefaultExpression;
        }