예제 #1
0
 public void AddRelatedField(Field field)
 {
     if (!RelatedFields.Contains(field))
     {
         RelatedFields.Add(field);
     }
 }
예제 #2
0
        public void UpdateIndependentFieldsList(IFieldDependenciesRepository repository, FormGeneratorContext context)
        {
            var allDependFields     = repository.GetAllDependFields();
            var allIndependedFields = context.Field.AsNoTracking()
                                      .ToList()
                                      .Where(f => {
                return((!allDependFields.Contains(f)) && (f.Name != SuperiorFieldName) &&
                       (!RelatedFields.Contains(f)));
            });

            AllIndependentFieldsName = JsonConvert.SerializeObject(allIndependedFields.Select(f => f.Name).ToList());
        }