Example #1
0
        public static SelectList CriteriaMatchesDropdownList(string DropdownFor)
        {
            var selectItems       = PatientSearch.CriteriaMatches().OrderBy(x => x.Value);
            var optionSelectItems = selectItems.Where(i => i.Value.Contains(DropdownFor));
            var optionsDict       = optionSelectItems.ToDictionary(x => x.Key, x => x.Value);

            optionsDict.Keys.ToList().ForEach(key =>
            {
                optionsDict[key] = optionsDict[key].Replace(".String", "").Replace(".Date", "");
            });
            return(new SelectList(optionsDict, "Value", "Key"));
        }
 private SelectList CriteriaMatchesDropdownList()
 {
     return(ViewBag.CriteriaMatches = new SelectList(PatientSearch.CriteriaMatches().OrderBy(x => x.Value), "Value", "Key", "Exact"));
 }