Ejemplo n.º 1
0
        /// <summary>
        /// 对象属性搜索
        /// </summary>
        /// <param name="cType"></param>
        /// <param name="propDef"></param>
        /// <param name="dType"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static SearchCondition Property(MFConditionType cType,
                                               int propDef, MFDataType dType, object value)
        {
            var sc = new SearchCondition();

            sc.ConditionType = cType;
            sc.Expression.DataPropertyValuePropertyDef = propDef;
            MFPropertyUtils.SetValue(sc.TypedValue, dType, value);
            return(sc);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 对象状态搜索
        /// </summary>
        /// <param name="cType"></param>
        /// <param name="sType"></param>
        /// <param name="dType"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static SearchCondition Status(MFConditionType cType,
                                             MFStatusType sType, MFDataType dType, object value)
        {
            var sc = new SearchCondition();

            sc.ConditionType = cType;
            sc.Expression.DataStatusValueType = sType;
            MFPropertyUtils.SetValue(sc.TypedValue, dType, value);
            return(sc);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 其中之一的搜索条件
        /// </summary>
        /// <param name="propDef"></param>
        /// <param name="item"></param>
        /// <returns></returns>
        public static SearchCondition OneOf(int propDef, int item)
        {
            if (item < 0)
            {
                throw new ArgumentException("对象ID必须非负");
            }
            var sc = new SearchCondition();

            sc.ConditionType = MFConditionType.MFConditionTypeEqual;
            sc.Expression.DataPropertyValuePropertyDef = propDef;
            MFPropertyUtils.SetValue(sc.TypedValue, MFDataType.MFDatatypeMultiSelectLookup, item);
            return(sc);
        }