public static ILineContainer <C> SubContainer <T, C>(this ILineContainer <T> container, Expression <Func <T, C> > property, TreeScope scope = TreeScope.Descendants) where T : ModifiableEntity where C : ModifiableEntity { PropertyRoute route = property.Body.NodeType != ExpressionType.Convert ? container.GetRoute(property) : container.GetRoute(Expression.Lambda <Func <T, IEntity> >(((UnaryExpression)property.Body).Operand, property.Parameters)); string str = route.PropertyRouteType == PropertyRouteType.LiteEntity ? route.Parent.ToString() : route.ToString(); var subContainer = container.Element.Element(scope, a => a.Current.Name == str); return(new LineContainer <C> { Element = subContainer, PreviousRoute = typeof(C).IsEmbeddedEntity() ? route : null }); }
public static ValueLineProxy ValueLine <T, V>(this ILineContainer <T> lineContainer, Expression <Func <T, V> > property) where T : ModifiableEntity { string newPrefix; PropertyRoute newRoute = lineContainer.GetRoute(property, out newPrefix); return(new ValueLineProxy(lineContainer.Selenium, newPrefix, newRoute)); }
public static bool HasError <T, S>(this ILineContainer <T> lineContainer, Expression <Func <T, S> > property) where T : ModifiableEntity { string newPrefix; PropertyRoute newRoute = lineContainer.GetRoute(property, out newPrefix); return(lineContainer.Selenium.HasError(newPrefix)); }
public static QueryTokenBuilderProxy QueryTokenBuilder <T>(this ILineContainer <T> lineContainer, Expression <Func <T, QueryTokenEmbedded> > property) where T : ModifiableEntity { string newPrefix; PropertyRoute newRoute = lineContainer.GetRoute(property, out newPrefix); return(new QueryTokenBuilderProxy(lineContainer.Selenium, newPrefix + "_")); }
public static DetailGridProxy DetailGrid(this ILineContainer <OrderEntity> container) { PropertyRoute route = container.GetRoute((OrderEntity o) => o.Details); var grid = container.Element.Element(TreeScope.Descendants, a => a.Current.ClassName == "ImmediateGrid" && a.Current.Name == route.ToString()); return(new DetailGridProxy(grid)); }//DetailGrid
public static ILineContainer <S> EntityDetailControl <T, S>(this ILineContainer <T> container, Expression <Func <T, S> > property, TreeScope scope = TreeScope.Descendants) where T : ModifiableEntity where S : ModifiableEntity { PropertyRoute route = container.GetRoute(property); return(container.EntityDetail(route, scope).GetDetailControl <S>()); }
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()); }
public static LineContainer <S> SubContainer <T, S>(this ILineContainer <T> lineContainer, Expression <Func <T, S> > property) where T : ModifiableEntity where S : ModifiableEntity { string newPrefix; PropertyRoute newRoute = lineContainer.GetRoute(property, out newPrefix); return(new LineContainer <S>(lineContainer.Selenium, newPrefix, newRoute)); }
public static EntityRepeaterProxy EntityRepeater <T>(this ILineContainer <T> container, Expression <Func <T, object> > property, TreeScope scope = TreeScope.Descendants) where T : ModifiableEntity { PropertyRoute route = container.GetRoute(property); return(container.EntityRepeater(route, scope)); }
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(); }
public static void ValueLineValue <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.ValueLine(route, scope).Value = value; }