Exemplo n.º 1
0
        public static ICDCodeCollection GetSortedByDescription(ICDCodeCollection icdCodeList)
        {
            ICDCodeCollection            result        = new ICDCodeCollection();
            IOrderedEnumerable <ICDCode> orderedResult = icdCodeList.OrderBy(i => i.Description);

            foreach (ICDCode icdCode in orderedResult)
            {
                result.Add(icdCode);
            }
            return(result);
        }
Exemplo n.º 2
0
        public static ICDCodeCollection GetByCategory(string category)
        {
            ICDCodeCollection result = new ICDCodeCollection();

            foreach (ICDCode icdCode in ICDCodeCollection.Instance)
            {
                if (icdCode.Category == category)
                {
                    result.Add(icdCode);
                }
            }
            return(result);
        }