Exemple #1
0
/// <summary>
/// Get the appropriate dictionary for possible criteria values based on the details of the current criteria
/// </summary>
/// <param name="qc"></param>
/// <returns></returns>

        public static string GetCriteriaSpecificDictionary(
            QueryColumn qc)
        {
            string     dictName = qc.MetaColumn.Dictionary;
            QueryTable qt       = qc.QueryTable;

            if (!qc.MetaColumn.IsDatabaseSetColumn)
            {
                return(dictName);
            }
            if (qt.FirstStructureQueryColumn == null)
            {
                return(dictName);                                                  // structure col in table?
            }
            if (Lex.Eq(dictName, "Structure_Databases"))
            {
                dictName = "Structure_Databases";
            }

            ParsedStructureCriteria pssc = qt.GetParsedStructureSearchCriteria();

            if (pssc == null)
            {
                return(dictName);
            }

            if (pssc.IsChemistrySearch)
            {
                return("Structure_Databases");
            }
            else if (pssc.SearchType == StructureSearchType.SmallWorld)
            {
                return("SmallWorldDatabases");
            }
            else
            {
                return(dictName);
            }
        }