Exemple #1
0
        /// <summary>
        /// Field != value1 AND value2 AND ....value n  인것 찾기.
        /// </summary>
        /// <param name="strField"></param>
        /// <param name="values"></param>
        /// <param name="bNot"></param>
        /// <returns></returns>
        public SortableList <T> FindAll(string strField, object[] values, bool bNot)
        {
            //if (strFields.Length != values.Length) return null;

            _strField  = strField;
            _valueList = values;

            List <T> list = null;

            if (bNot)
            {
                list = this.FindAll(new Predicate <T>(FilterORNot <T>));
            }
            else
            {
                list = this.FindAll(new Predicate <T>(FilterOR <T>));
            }

            SortableList <T> listResult = new SortableList <T>();

            for (int i = 0; i < list.Count; i++)
            {
                listResult.Add(list[i]);
            }
            return(listResult);
        }
Exemple #2
0
        /// <summary>
        /// Find all objects that is matched with values using the specified properties
        /// </summary>
        /// <param name="strFields">Properties to find all objects by</param>
        /// <param name="values">Properties to compared by</param>
        /// <returns>found objects</returns>
        public SortableList <T> FindAll(string[] strFields, object[] values)
        {
            if (strFields.Length != values.Length)
            {
                return(null);
            }

            _strFieldList = strFields;
            _valueList    = values;

            List <T>         list       = this.FindAll(new Predicate <T>(Filter <T>));
            SortableList <T> listResult = new SortableList <T>();

            for (int i = 0; i < list.Count; i++)
            {
                listResult.Add(list[i]);
            }
            return(listResult);
        }