public string JS_MODAL_COLUMN(ColumnInfo col) { string foreigntablename = col.ForeignTable; int tableid = DataHelper.FindTableID(foreigntablename); if (tableid > 0) { SingleViewTemplate model = new SingleViewTemplate(tableid); if (col.IsForeignKey && col.ForeignKeyModal == EForeignKeyModal.ON_FLY_MODAL) { return(GenerateHelper.CompileTemplate("js._single_view.js_col_modal", model)); } } return(string.Format("/*-- {0} : NOT IS MODAL--*/", col.Name)); }
public static void test() { //=========================================== #region test string template = "Hello @Model.Name, welcome to RazorEngine!"; var result = Engine.Razor.RunCompile(template, "templateKey", null, new { Name = "World" }); //========================= //======================== iTemplate t = new SingleViewTemplate(8); StringBuilder sb = new StringBuilder(); foreach (ColumnInfo col in t.Columns) { sb.Append(iTemplate.HTML_Column_In_SearchEditForm("controller", col)); } CreateFile("col_on_searcheditform.cshtml", sb.ToString(), ""); #endregion }