示例#1
0
        public static V EntityComboValue <T, V>(this ILineContainer <T> lineContainer, Expression <Func <T, V> > property)
            where T : ModifiableEntity
        {
            var lite = lineContainer.EntityCombo(property).LiteValue;

            return(lite is V ? (V)lite : (V)(object)lite.Retrieve());
        }
示例#2
0
        public static V EntityComboValue <T, V>(this ILineContainer <T> container, Expression <Func <T, V> > property, TreeScope scope = TreeScope.Descendants) where T : ModifiableEntity
        {
            PropertyRoute route = container.GetRoute(property);

            var lite = container.EntityCombo(route, scope).LiteValue;

            return(lite is V ? (V)lite : (V)lite.Retrieve());
        }
示例#3
0
        public static void EntityComboValue <T, V>(this ILineContainer <T> lineContainer, Expression <Func <T, V> > property, V value, bool loseFocus = false)
            where T : ModifiableEntity
        {
            var combo = lineContainer.EntityCombo(property);

            combo.LiteValue = value as Lite <IEntity> ?? ((IEntity)value)?.ToLite();

            if (loseFocus)
            {
                lineContainer.Selenium.LoseFocus(lineContainer.Selenium.FindElement(combo.ComboLocator));
            }
        }
示例#4
0
        public static void EntityComboValue <T, V>(this ILineContainer <T> lineContainer, Expression <Func <T, V> > property, V value, bool loseFocus = false)
            where T : IModifiableEntity
        {
            var combo = lineContainer.EntityCombo(property);

            combo.LiteValue = value as Lite <IEntity> ?? ((IEntity?)value)?.ToLite();

            if (loseFocus)
            {
                combo.ComboElement.WrappedElement.LoseFocus();
            }
        }
示例#5
0
        public static void EntityComboValue <T, V>(this ILineContainer <T> container, Expression <Func <T, V> > property, V value, TreeScope scope = TreeScope.Descendants) where T : ModifiableEntity
        {
            PropertyRoute route = container.GetRoute(property);

            container.EntityCombo(route, scope).LiteValue = value as Lite <IEntity> ?? ((IEntity)value).ToLite();
        }
示例#6
0
        public static EntityComboProxy EntityCombo <T>(this ILineContainer <T> container, Expression <Func <T, object> > property, TreeScope scope = TreeScope.Descendants) where T : ModifiableEntity
        {
            PropertyRoute route = container.GetRoute(property);

            return(container.EntityCombo(route, scope));
        }