Beispiel #1
0
 public JobIndex(AbstractJobIndexId jobIndexId, JobIndexCategory category, string name,
                 string dictionaryName)
     : base(jobIndexId, name, dictionaryName)
 {
     if (category == null)
     {
         throw new ArgumentException("category is null");
     }
     this.category = category;
 }
Beispiel #2
0
        public virtual void Update(JobIndexCategory parent, string name, string dictionaryName)
        {
            this.parent = parent;

            if (string.IsNullOrWhiteSpace(name))
            {
                throw new JobIndexArgumentException("JobIndex", "Name");
            }
            this.name = name;
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new JobIndexArgumentException("JobIndex", "DictionaryName");
            }
            this.dictionaryName = dictionaryName;
        }
Beispiel #3
0
        public virtual void Update(string name, string dictionaryName, JobIndexCategory category, List <CustomFieldType> customFieldTypes)
        {
            if (category == null)
            {
                throw new ArgumentException("category");
            }

            if (string.IsNullOrWhiteSpace(name))
            {
                throw new JobIndexArgumentException("JobIndex", "Name");
            }
            base.name = name;
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new JobIndexArgumentException("JobIndex", "DictionaryName");
            }
            base.dictionaryName = dictionaryName;
            this.category       = category;

            foreach (var customFieldType in customFieldTypes)
            {
                if (!customFieldTypeIdList.Contains(customFieldType.Id))
                {
                    AssignCustomField(customFieldType);
                }
            }

            var customFieldTypeIdListClone = new List <CustomFieldTypeId>(customFieldTypeIdList);

            for (int i = 0; i < customFieldTypeIdListClone.Count; i++)
            {
                if (!customFieldTypes.Select(c => c.Id).Contains(customFieldTypeIdListClone[i]))
                {
                    RemoveCustomField(customFieldTypeIdListClone[i]);
                }
            }
        }
Beispiel #4
0
 public JobIndexCategory(AbstractJobIndexId jobIndexCategoryId, JobIndexCategory parent, string name,
                         string dictionaryName)
     : base(jobIndexCategoryId, name, dictionaryName)
 {
     this.parent = parent;
 }