Пример #1
0
        public IEnumerable <LoadedFormTabPlugin> LoadTabPlugins(System.Web.Mvc.ControllerContext controllerContext)
        {
            var matchedTabs = MatchTabPlugins(controllerContext.RequestContext.RouteData).OrderBy(it => it.Order);

            var loadedPlugins = new List <LoadedFormTabPlugin>();

            foreach (var tab in matchedTabs)
            {
                var tabLoadContext = new FormTabContext(controllerContext, new System.Web.Mvc.ViewDataDictionary(controllerContext.Controller.ViewData));
                tab.LoadData(tabLoadContext);
                loadedPlugins.Add(new LoadedFormTabPlugin(tab, tabLoadContext));
            }
            return(loadedPlugins);
        }
Пример #2
0
        public IEnumerable<LoadedFormTabPlugin> LoadTabPlugins(System.Web.Mvc.ControllerContext controllerContext)
        {
            var matchedTabs = MatchTabPlugins(controllerContext.RequestContext.RouteData).OrderBy(it => it.Order);

            var loadedPlugins = new List<LoadedFormTabPlugin>();

            foreach (var tab in matchedTabs)
            {
                var tabLoadContext = new FormTabContext(controllerContext, new System.Web.Mvc.ViewDataDictionary(controllerContext.Controller.ViewData));
                tab.LoadData(tabLoadContext);
                loadedPlugins.Add(new LoadedFormTabPlugin(tab, tabLoadContext));
            }
            return loadedPlugins;
        }
Пример #3
0
        public IEnumerable<LoadedFormTabPlugin> SubmitToTabPlugins(System.Web.Mvc.ControllerContext controllerContext)
        {
            var matchedTabs = MatchTabPlugins(controllerContext.RequestContext.RouteData).OrderBy(it => it.Order);

            var loadedPlugins = new List<LoadedFormTabPlugin>();

            foreach (var tab in matchedTabs)
            {
                object model = null;
                if (tab.ModelType != null)
                {
                    model = ModelBindHelper.BindModel(tab.ModelType, controllerContext);
                }
                FormTabContext tabContext = new FormTabContext(controllerContext, new System.Web.Mvc.ViewDataDictionary(controllerContext.Controller.ViewData) { Model = model });
                tab.Submit(tabContext);
                loadedPlugins.Add(new LoadedFormTabPlugin(tab, tabContext));
            }
            return loadedPlugins;
        }
Пример #4
0
        public IEnumerable <LoadedFormTabPlugin> SubmitToTabPlugins(System.Web.Mvc.ControllerContext controllerContext)
        {
            var matchedTabs = MatchTabPlugins(controllerContext.RequestContext.RouteData).OrderBy(it => it.Order);

            var loadedPlugins = new List <LoadedFormTabPlugin>();

            foreach (var tab in matchedTabs)
            {
                object model = null;
                if (tab.ModelType != null)
                {
                    model = ModelBindHelper.BindModel(tab.ModelType, controllerContext);
                }
                FormTabContext tabContext = new FormTabContext(controllerContext, new System.Web.Mvc.ViewDataDictionary(controllerContext.Controller.ViewData)
                {
                    Model = model
                });
                tab.Submit(tabContext);
                loadedPlugins.Add(new LoadedFormTabPlugin(tab, tabContext));
            }
            return(loadedPlugins);
        }
Пример #5
0
 public LoadedFormTabPlugin(IFormTabPlugin tabPlugin, FormTabContext cotnext)
 {
     this.TabPlugin = tabPlugin;
     this.Context = cotnext;
 }
Пример #6
0
 public LoadedFormTabPlugin(IFormTabPlugin tabPlugin, FormTabContext cotnext)
 {
     this.TabPlugin = tabPlugin;
     this.Context   = cotnext;
 }