Exemple #1
0
 private Func <XElement> CreateRangedBehaviourMinMax(IOptionValue optionValue, string minValue, string maxValue, object isMin = null)
 {
     if (isMin == null)
     {
         return(() => new XElement("rangedMinMax", new XAttribute("min", optionValue.GetStringValue(minValue)), new XAttribute("max", optionValue.GetStringValue(maxValue))));
     }
     else if ((bool)isMin)
     {
         return(() => new XElement("rangedMin", new XAttribute("min", optionValue.GetStringValue(minValue))));
     }
     else if (!(bool)isMin)
     {
         return(() => new XElement("rangedMax", new XAttribute("max", optionValue.GetStringValue(maxValue))));
     }
     else
     {
         return(null);
     }
 }
Exemple #2
0
 private Func <XElement> CreateSqlMultiListBehaviour(IOptionValue optionValue, string query, bool sorted, string separator, string memberValue, string displayValue)
 {
     return(() => new XElement("sqlMultiList", new XAttribute("sorted", sorted), new XAttribute("separator", optionValue.GetStringValue(separator)), new XAttribute("query", optionValue.GetStringValue(query)), new XAttribute("valueFieldName", optionValue.GetStringValue(memberValue)), new XAttribute("displayValueFieldName", optionValue.GetStringValue(displayValue))));
 }
Exemple #3
0
 private Func <XElement> CreateSqlFlagListBehaviour(IOptionValue optionValue, string query, string memberValue, string displayValue)
 {
     return(() => new XElement("sqlFlagList", new XAttribute("query", optionValue.GetStringValue(query)), new XAttribute("valueFieldName", optionValue.GetStringValue(memberValue)), new XAttribute("displayValueFieldName", optionValue.GetStringValue(displayValue))));
 }
Exemple #4
0
        private Func <XElement> CreateMultiListBehaviour(IOptionValue optionValue, IEnumerable <ListItem> list, bool sorted = false, string separator = ";")
        {
            var multiList = new XElement("multiList", new XAttribute("sorted", sorted), new XAttribute("separator", optionValue.GetStringValue(separator)));

            foreach (var listItem in list)
            {
                multiList.Add(new XElement("listItem", new XAttribute("value", listItem.Value.ToString()), new XAttribute("displayValue", listItem.DisplayValue)));
            }

            return(() => multiList);
        }