Exemplo n.º 1
0
        //--------------------------------
        public static string HTML_Column_In_EditFormModal(string controllername, ColumnInfo col)
        {
            dynamic model = col.ToDymanicObject();

            model.Controller = controllername;
            return(GenerateHelper.CompileTemplate("html.share.col_on_editform_modal", model));
        }
Exemplo n.º 2
0
        public static string JS_Column_Image_Init_Hanlder(string controllername, ColumnInfo col)
        {
            dynamic model = col.ToDymanicObject();

            model.Controller = controllername;
            return(GenerateHelper.CompileTemplate("js.share.js_col_image_init_handler", model));
        }
Exemplo n.º 3
0
        public static string HTML_COLUMN_IN_SEARCHEDITFORM_ON_MODAL(string controllername, ColumnInfo col)
        {
            dynamic model = col.ToDymanicObject();

            model.Controller = controllername;
            return(GenerateHelper.CompileTemplate("html.share.col_on_searcheditform_on_modal", model));
        }
Exemplo n.º 4
0
        public static string HTML_Column_In_BaseChildTable(string controllername, ColumnInfo col)
        {
            dynamic model = col.ToDymanicObject();

            model.Controller = controllername;
            return(GenerateHelper.CompileTemplate("html.share.col_on_basechildtable", model));
        }
Exemplo n.º 5
0
        public static string JS_Column_On_FormConfig(string controllername, ColumnInfo col)
        {
            dynamic model = col.ToDymanicObject();

            model.Controller = controllername;
            return(GenerateHelper.CompileTemplate("js.share.js_col_on_formconfig", model));
        }
Exemplo n.º 6
0
        public static string HTML_Column_In_EditTable(string controllername, ColumnInfo col)
        {
            dynamic model = col.ToDymanicObject();

            model.Controller = controllername;
            return(GenerateHelper.CompileTemplate("html._edit_ontable.col_on_edittable", model));
        }
Exemplo n.º 7
0
        public static string HTML_Column_In_ChildSearchForm(string childtable, string controllername, ColumnInfo col)
        {
            dynamic model = col.ToDymanicObject();

            model.ChildTable = childtable;
            model.Controller = controllername;
            return(GenerateHelper.CompileTemplate("html.share.col_on_childsearchform", model));
        }
Exemplo n.º 8
0
        public override void CreateView(string outputfolder)
        {
            //tao model
            var model = this;

            //sinh template
            string result = GenerateHelper.CompileTemplate(this.TemplateKey, model);

            //luu file
            GenerateHelper.CreateFile(this.OutputFile, result, outputfolder);
        }
Exemplo n.º 9
0
        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));
        }
Exemplo n.º 10
0
        //==================================
        //on detail tab
        public string JS_ChildTable_Detail_OnTab(TableInfo tbl)
        {
            string template = "";

            if (tbl.IsOnlyOne)
            {
                template = GenerateHelper.CompileTemplate("js._master_detail.js_childtable_detail_ontab_only", tbl);
            }
            else
            {
                if (tbl.IsBaseTableType)
                {
                    template = GenerateHelper.CompileTemplate("js._master_detail.js_childtable_detail_ontab_basetabletype", tbl);
                }
                else
                {
                    template = GenerateHelper.CompileTemplate("js._master_detail.js_childtable_detail_ontab", tbl);
                }
            }
            return(template);
        }
Exemplo n.º 11
0
        public string HTML_ChildTable_OnMaster(TableInfo tbl)
        {
            string template = "";

            if (tbl.IsOnlyOne)
            {
                template = GenerateHelper.CompileTemplate("html._master_detail.childtable_onmaster_only", tbl);
            }
            else
            {
                if (tbl.IsBaseTableType)
                {
                    template = GenerateHelper.CompileTemplate("html._master_detail.childtable_onmaster_basetabletype", tbl);
                }
                else
                {
                    template = GenerateHelper.CompileTemplate("html._master_detail.childtable_onmaster", tbl);
                }
            }
            return(template);
        }