public void UpdateMultiplyMessage() { string message = CollectionElementToken.MultipliedMessage(Request.Multiplications, EntityType); tbMultiplications.Text = message; brMultiplications.Visibility = message.HasText() ? Visibility.Visible : Visibility.Collapsed; }
public QueryRequest UpdateMultiplyMessage(bool updateSimpleFilters) { var result = GetQueryRequest(updateSimpleFilters); string message = CollectionElementToken.MultipliedMessage(result.Multiplications(), EntityType); tbMultiplications.Text = message; brMultiplications.Visibility = message.HasText() ? Visibility.Visible : Visibility.Collapsed; return(result); }
protected internal virtual PartialViewResult Search(ControllerBase controller, QueryRequest request, bool allowSelection, bool navigate, bool showFooter, Context context) { if (!Finder.IsFindable(request.QueryName)) { throw new UnauthorizedAccessException(NormalControlMessage.ViewForType0IsNotAllowed.NiceToString().FormatWith(request.QueryName)); } QuerySettings settings = QuerySettings[request.QueryName]; QueryDescription qd = DynamicQueryManager.Current.QueryDescription(request.QueryName); if (settings.HiddenColumns != null) { if (settings.HiddenColumns.Any(a => a.Token == null)) { using (ExecutionMode.Global()) ColumnOption.SetColumnTokens(settings.HiddenColumns, qd, canAggregate: false); } request.Columns.AddRange(settings.HiddenColumns.Select(c => c.ToColumn(qd, isVisible: false))); } ResultTable queryResult = DynamicQueryManager.Current.ExecuteQuery(request); controller.ViewData.Model = context; controller.ViewData[ViewDataKeys.AllowSelection] = allowSelection; controller.ViewData[ViewDataKeys.Navigate] = navigate; controller.ViewData[ViewDataKeys.ShowFooter] = showFooter; controller.ViewData[ViewDataKeys.QueryDescription] = qd; Type entitiesType = Lite.Extract(qd.Columns.SingleEx(a => a.IsEntity).Type); string message = CollectionElementToken.MultipliedMessage(request.Multiplications, entitiesType); if (message.HasText()) { controller.ViewData[ViewDataKeys.MultipliedMessage] = message; } controller.ViewData[ViewDataKeys.Results] = queryResult; controller.ViewData[ViewDataKeys.QueryRequest] = request; controller.ViewData[ViewDataKeys.Formatters] = queryResult.Columns.Select((c, i) => new { c, i }).ToDictionary(c => c.i, c => settings.GetFormatter(c.c.Column)); controller.ViewData[ViewDataKeys.EntityFormatter] = settings.EntityFormatter; controller.ViewData[ViewDataKeys.RowAttributes] = settings.RowAttributes; return(new PartialViewResult { ViewName = SearchResultsView, ViewData = controller.ViewData, TempData = controller.TempData }); }