Exemplo n.º 1
0
        /// <summary>
        /// 查找所有合法条件的数据集合
        /// </summary>
        /// <typeparam name="T">泛型</typeparam>
        /// <param name="gridView">DataGridView</param>
        /// <param name="match">Predicate为何</param>
        /// <returns>返回符合数据;没有合法的返回NULL</returns>
        public static IList <T> FindAll <T>(this DataGridView gridView, Predicate <T> match)
        {
            BindList <T> _source = gridView.ToBindList <T>();

            if (_source != null)
            {
                return(_source.FindAll(match));
            }

            return(null);
        }