Exemplo n.º 1
0
        public IActionResult EntityList()
        {
            this.RequestQuery.EntityId = EntityCode.EntityMaster;
            var context = new DeskPageContext(this.WebAppContext, EntityCode.EntityMaster, this.RequestQuery);

            context.Build();

            var widgetContext = WidgetContext.BuildContext(context, "LayoutList");

            widgetContext.WidgetType = FormControlType.EntityListView;

            var widget = new ViewModel.FormWidget.EntityListWidget(widgetContext);

            widget.OnCompile();
            widget.SetValue(null);
            context.AddControl(widget);

            var page = new ViewPage(context);

            page.Actions = new InvariantDictionary <Model.Form.ActionInfo>();
            var qs = new RequestQueryString()
            {
                EntityId = EntityCode.EntityMaster
            };

            page.Actions.Add("BTN_NEW", new Model.Form.ActionInfo(AppLinkProvider.NEW_ENTITY_URL, qs)
            {
                Title = "New Entity", LinkTarget = "POPUP"
            });

            return(CreatePageResult(page));
        }
Exemplo n.º 2
0
        public IActionResult Index()
        {
            var context = new DeskPageContext(this.WebAppContext, EntityCode.EntityMaster, this.RequestQuery);

            context.Build();

            var builder = new UI.View.PageBuilder.EntityPageBuilder();

            return(CreatePageResult(builder.CreateDeskPage(context)));
        }
Exemplo n.º 3
0
        public IActionResult Desk(string id)
        {
            if (!string.IsNullOrEmpty(id))
            {
                this.RequestQuery.EntityId = EntityCode.Get(id);
            }

            var context = new DeskPageContext(this.WebAppContext, this.RequestQuery.EntityId, this.RequestQuery);

            context.Build();

            var builder = new EntityPageBuilder();
            var page    = builder.CreateDeskPage(context);

            return(CreatePageResult(page));
        }