Beispiel #1
0
        protected virtual void PerformSearch()
        {
            try
            {
                var searchToken = txtSearch.Text.Trim();

                IEnumerable <IFieldDefinition> fieldDefinitions;

                if (String.IsNullOrEmpty(searchToken))
                {
                    fieldDefinitions = this.FieldDefinitions.AsEnumerable();
                }
                else
                {
                    fieldDefinitions = FieldDefinitions
                                       .Where(f =>
                                              f.Name.ToUpper().Contains(searchToken.ToUpper()) ||
                                              f.Group.ToUpper().Contains(searchToken.ToUpper())
                                              );
                }

                DisplayFieldDefinitions(fieldDefinitions);
            }
            catch (Exception ex)
            {
                ExceptionHandler(ex);
            }
        }
Beispiel #2
0
        public void AfterInit()
        {
            FieldDefinitionsArray       = FieldDefinitions.ToArray();
            FieldDefinitionsWithAliases = FieldDefinitions.Where(x => x.Alias != null).ToArray();

            IgnoredFieldDefinitionsArray = IgnoredFieldDefinitions.ToArray();

            var allItems = new List <FieldDefinition>(FieldDefinitions);

            allItems.AddRange(IgnoredFieldDefinitions);
            AllFieldDefinitionsArray = allItems.ToArray();
        }
Beispiel #3
0
        public void AfterInit()
        {
            FieldDefinitionsArray       = FieldDefinitions.ToArray();
            FieldDefinitionsWithAliases = FieldDefinitions.Where(x => x.Alias != null).ToArray();

            IgnoredFieldDefinitionsArray = IgnoredFieldDefinitions.ToArray();

            var allItems = new List <FieldDefinition>(FieldDefinitions);

            allItems.AddRange(IgnoredFieldDefinitions);
            AllFieldDefinitionsArray = allItems.ToArray();

            OrmLiteConfig.OnModelDefinitionInit?.Invoke(this);
        }
Beispiel #4
0
        /// <summary>
        /// if a template definition has custom field imports then use that before the global field definitions
        /// </summary>
        /// <param name="importRow"></param>
        /// <returns></returns>
        public override List <IBaseField> GetFieldDefinitionsByRow(object importRow)
        {
            List <IBaseField> l = new List <IBaseField>();

            //get the template
            TemplateMapping tm = GetTemplateMapping((Item)importRow);

            if (tm == null)
            {
                return(FieldDefinitions);
            }

            //get the template fields
            List <IBaseField> tempFields = tm.FieldDefinitions;

            //filter duplicates in template fields from global fields
            List <string> names = tempFields.Select(a => a.Name).ToList();

            l.AddRange(tempFields);
            l.AddRange(FieldDefinitions.Where(a => !names.Contains(a.Name)));

            return(l);
        }
Beispiel #5
0
 /// <summary>
 ///
 /// </summary>
 public void AfterInit()
 {
     FieldDefinitionsWithAliases = FieldDefinitions.Where(x => x.Alias != null).ToArray();
 }