public static FieldClass AddFieldClass(ConditionConfig cf, List<CategoryClass> categories) { var f = new FieldClass { Name = cf.Name, FieldTitle = cf.Title, QueryType = ConvertQueryType(cf.Name), QuartersTitle = cf.QuartersLabel, Type = Convert(cf.Type), DataSource = cf.DataSource, DataValueField = cf.DataValueField, Description = cf.Description, Category = cf.Category }; if(cf.Params.HasValue()) f.ParamList = cf.Params.SplitStr(",").ToList(); var cc = categories.Single(vv => vv.Name == cf.Category); cc.Fields.Add(f); return f; }
public static FieldClass AddFieldClass(ConditionConfig cf, List <CategoryClass> categories) { var f = new FieldClass { Name = cf.Name, FieldTitle = cf.Title, QueryType = ConvertQueryType(cf.Name), QuartersTitle = cf.QuartersLabel, Type = Convert(cf.Type), DataSource = cf.DataSource, DataValueField = cf.DataValueField, Description = cf.Description, Category = cf.Category }; if (cf.Params.HasValue()) { f.ParamList = cf.Params.SplitStr(",").ToList(); } var cc = categories.Single(vv => vv.Name == cf.Category); cc.Fields.Add(f); return(f); }