Пример #1
0
        public PartialViewResult AppendWidget(WidgetBase widget)
        {
            var widgetPart = _widgetService.ApplyTemplate(widget, ControllerContext);

            if (widgetPart == null)
            {
                widgetPart = new HtmlWidget {
                    PartialView = "Widget.HTML", HTML = "<h1 class='text-danger'><hr/>操作失败,找不到数据源,刷新页面后该消息会消失。<hr/></h1>"
                }.ToWidgetPart();
            }
            return(PartialView("AppendWidget", new DesignWidgetViewModel(widgetPart, widget.PageID)));
        }
Пример #2
0
        public PartialViewResult AppendWidget(WidgetBase widget)
        {
            var widgetPart = _widgetService.ApplyTemplate(widget, HttpContext);

            if (widgetPart == null)
            {
                widgetPart = new HtmlWidget {
                    PartialView = "Widget.HTML", HTML = "<label class='text-danger'>模板已被删除,添加失败!</label>"
                }.ToWidgetPart();
            }
            return(PartialView("DesignWidget", new DesignWidgetViewModel(widgetPart, widget.PageID)));
        }
Пример #3
0
        public PartialViewResult AppendWidget(WidgetBase widget)
        {
            var widgetPart = _widgetService.ApplyTemplate(widget, HttpContext);

            return(PartialView("DesignWidget", new DesignWidgetViewModel(widgetPart, widget.PageID)));
        }