Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 5
0
 public LoadedFormTabPlugin(IFormTabPlugin tabPlugin, FormTabContext cotnext)
 {
     this.TabPlugin = tabPlugin;
     this.Context = cotnext;
 }
Exemplo n.º 6
0
 public LoadedFormTabPlugin(IFormTabPlugin tabPlugin, FormTabContext cotnext)
 {
     this.TabPlugin = tabPlugin;
     this.Context   = cotnext;
 }