Beispiel #1
0
        internal Tk5DbEasySearch(BaseEasySearchConfig config)
            : base(MetaDataUtil.ConvertToTableScheme(config.CreateScheme()), config.IdField, config.NameField)
        {
            ContextName = config.Context;
            OrderBy     = config.OrderBy;
            if (config.TopCount > 0)
            {
                TopCount = config.TopCount;
            }
            if (!string.IsNullOrEmpty(config.PyField))
            {
                PinyinField = this[config.PyField];
            }
            if (!string.IsNullOrEmpty(config.NameExpression))
            {
                NameExpression = config.NameExpression;
            }
            if (!string.IsNullOrEmpty(config.DisplayNameExpression))
            {
                DisplayNameExpression = config.DisplayNameExpression;
            }

            FilterSql = config.FilterSql;
            if (config.DataRight != null)
            {
                DataRight = config.DataRight.CreateObject(this);
            }

            SetActiveData(SourceScheme.Convert <Tk5DataXml>());
            SearchMethod = SearchPlugInFactory.CreateSearch(config.SearchMethod, false);
        }
Beispiel #2
0
 public InternalTk5DbTreeEasySearch(BaseEasySearchConfig config)
     : base(config)
 {
     fDataXml = SourceScheme.Convert <Tk5DataXml>();
 }