internal static Controller RunNoAccessAction(ControllerAction controllerAction) { WebAppContext.Response.DisableCaching(); ControllerClass controllerClass = controllerAction.ControllerClass; using (Controller controller = controllerClass.CreateController()) { controller.NoAccess(controllerAction); return(controller); } }
internal static Controller RunControllerAction(ControllerAction controllerAction) { WebAppContext.Response.DisableCaching(); ControllerClass controllerClass = controllerAction.ControllerClass; using (Controller controller = controllerClass.CreateController()) { if (controllerClass.Run(controller, controllerAction.Method)) { return(controller); } else { return(null); } } }
internal string RenderView(ControllerAction controllerAction) { string method = _innerView ?? controllerAction.Method; Skin layout = IsAjax() ? null : WebAppHelper.GetLayout(_layoutName); Skin skin = WebAppHelper.GetSkin(_viewName, method); string outerHTML; ViewData["SESSION"] = WebAppContext.Session; ViewData["VIEWNAME"] = ViewName; ViewData["METHOD"] = method; ViewData["URL"] = Url; ViewData["CUR"] = Url.Substring(0, Url.LastIndexOf('/')); ViewData["SELF"] = string.Concat(Url, "/", method); ViewData["CHECK"] = new Function("Check", WebAppConfig.SecurityProvider); ViewData["R"] = ResourceManager.GetResources(); if (WebAppContext.Request.ApplicationPath != "/") { ViewData["ROOT"] = WebAppContext.Request.ApplicationPath; } else { ViewData["ROOT"] = ""; } ViewData["THEME"] = WebAppConfig.ThemePath; ViewData["EXTENSION"] = WebAppConfig.Extension; if (layout == null) { outerHTML = skin.RenderView(ViewData); } else { outerHTML = skin.RenderView(ViewData); ViewData["VIEW"] = outerHTML.TrimStart(); outerHTML = layout.RenderView(ViewData); } return(outerHTML); }
internal void NoAccess(ControllerAction controllerAction) { NoAccess(controllerAction.Method); }
internal static Controller RunNoAccessAction(ControllerAction controllerAction) { WebAppContext.Response.DisableCaching(); ControllerClass controllerClass = controllerAction.ControllerClass; using (Controller controller = controllerClass.CreateController()) { controller.NoAccess(controllerAction); return controller; } }
internal static Controller RunControllerAction(ControllerAction controllerAction) { WebAppContext.Response.DisableCaching(); ControllerClass controllerClass = controllerAction.ControllerClass; using (Controller controller = controllerClass.CreateController()) { if (controllerClass.Run(controller, controllerAction.Method)) { return controller; } else { return null; } } }
internal string RenderView(ControllerAction controllerAction) { string method = _innerView ?? controllerAction.Method; Skin layout = IsAjax() ? null : WebAppHelper.GetLayout(_layoutName); Skin skin = WebAppHelper.GetSkin(_viewName, method); string outerHTML; ViewData["SESSION"] = WebAppContext.Session; ViewData["VIEWNAME"] = ViewName; ViewData["METHOD"] = method; ViewData["URL"] = Url; ViewData["CUR"] = Url.Substring(0, Url.LastIndexOf('/')); ViewData["SELF"] = string.Concat(Url, "/", method); ViewData["CHECK"] = new Function("Check", WebAppConfig.SecurityProvider); ViewData["R"] = ResourceManager.GetResources(); if (WebAppContext.Request.ApplicationPath != "/") ViewData["ROOT"] = WebAppContext.Request.ApplicationPath; else ViewData["ROOT"] = ""; ViewData["THEME"] = WebAppConfig.ThemePath; ViewData["EXTENSION"] = WebAppConfig.Extension; if (layout == null) { outerHTML = skin.RenderView(ViewData); } else { outerHTML = skin.RenderView(ViewData); ViewData["VIEW"] = outerHTML.TrimStart(); outerHTML = layout.RenderView(ViewData); } return outerHTML; }