Exemple #1
0
        IList ApplyFilter(List <AMR_MST04> list, AlphaIndex_AptManage alpha)
        {
            if (alpha == null || alpha == AlphaIndex_AptManage.All)
            {
                return(list);
            }
            var res = from q in list
                      where alpha.Match(extractName(q))
                      select q;

            return(res.ToList());
        }
Exemple #2
0
        protected void InitIndex(List <AMR_MST04> list)
        {
            this.extractName = (s) => {
                string name = ((AMR_MST04)s).MST04CMP;
                if (string.IsNullOrEmpty(name))
                {
                    return(null);                           //todo?
                }
                return(AlphaIndex_AptManage.Group(name.Substring(0, 1)));
            };
            List <AlphaIndex_AptManage> dict = Generate(list, extractName);

            SetupGrid(dict, indexGridControl);
        }
Exemple #3
0
        IList ApplyFilter(List<AMR_MST04> list, AlphaIndex_AptManage alpha)
        {
            if(alpha == null || alpha == AlphaIndex_AptManage.All) return list;
            var res = from q in list
                    where alpha.Match(extractName(q))
                    select q;
            return res.ToList();

        }