Exemplo n.º 1
0
        public static MvcHtmlString SearchControl(this HtmlHelper helper, UserQueryEntity userQuery, FindOptions findOptions, Context context, Action<SearchControl> searchControl = null)
        {
            if (findOptions == null)
                throw new ArgumentNullException("findOptions");

            findOptions.ApplyUserQuery(userQuery);

            return helper.SearchControl(findOptions, context, searchControl);
        }
Exemplo n.º 2
0
        public static FindOptions ToFindOptions(this UserQueryEntity userQuery)
        {
            object queryName = QueryLogic.ToQueryName(userQuery.Query.Key);

            var result = new FindOptions(queryName);

            result.ApplyUserQuery(userQuery);
            return(result);
        }
Exemplo n.º 3
0
        public static MvcHtmlString SearchControl(this HtmlHelper helper, UserQueryEntity userQuery, FindOptions findOptions, Context context, Action <SearchControl> searchControl = null)
        {
            if (findOptions == null)
            {
                throw new ArgumentNullException("findOptions");
            }

            findOptions.ApplyUserQuery(userQuery);

            return(helper.SearchControl(findOptions, context, searchControl));
        }
        public ActionResult View(Lite<UserQueryEntity> lite, FindOptions findOptions, Lite<Entity> currentEntity)
        {
            UserQueryPermission.ViewUserQuery.AssertAuthorized();

            UserQueryEntity uq =  UserQueryLogic.RetrieveUserQuery(lite);

            using (uq.EntityType == null ? null : CurrentEntityConverter.SetCurrentEntity(currentEntity.Retrieve()))
            {
                if (findOptions == null)
                    findOptions = uq.ToFindOptions();
                else
                    findOptions.ApplyUserQuery(uq);
            }

            return Finder.SearchPage(this, findOptions);
        }
Exemplo n.º 5
0
        public ActionResult View(Lite <UserQueryEntity> lite, FindOptions findOptions, Lite <Entity> currentEntity)
        {
            UserQueryPermission.ViewUserQuery.AssertAuthorized();

            UserQueryEntity uq = UserQueryLogic.RetrieveUserQuery(lite);

            using (uq.EntityType == null ? null : CurrentEntityConverter.SetCurrentEntity(currentEntity.Retrieve()))
            {
                if (findOptions == null)
                {
                    findOptions = uq.ToFindOptions();
                }
                else
                {
                    findOptions.ApplyUserQuery(uq);
                }
            }

            return(Finder.SearchPage(this, findOptions));
        }
Exemplo n.º 6
0
        public static FindOptions ToFindOptions(this UserQueryEntity userQuery)
        {
            object queryName = QueryLogic.ToQueryName(userQuery.Query.Key);

            var result = new FindOptions(queryName);
            result.ApplyUserQuery(userQuery);
            return result;
        }