public static string ProcessRazorView(ISchema schema, string form, out bool rendered) { string controlFile = GetFormView(form); rendered = false; if (System.IO.File.Exists(controlFile)) { if (HttpContext.Current != null && HttpContext.Current.Items["ControllerContext"] != null) { var controllerContext = (ControllerContext)HttpContext.Current.Items["ControllerContext"]; var viewData = new ViewDataDictionary() { Model = schema }; rendered = true; return(RazorViewHelper.RenderView(GetFormViewVirtualPath(form), controllerContext, viewData)); } } return(""); }
public static string ProcessRazorView(ISchema schema, IColumn column, out bool rendered) { string controlFile = GetControlView(column.ControlType); rendered = false; if (System.IO.File.Exists(controlFile)) { if (HttpContext.Current != null && HttpContext.Current.Items["ControllerContext"] != null) { var controllerContext = (ControllerContext)HttpContext.Current.Items["ControllerContext"]; var viewData = new ViewDataDictionary() { Model = column }; viewData["Schema"] = schema; rendered = true; return(RazorViewHelper.RenderView(GetControlViewVirtualPath(column.ControlType), controllerContext, viewData)); } } return(""); }