예제 #1
0
        private void BuilderIndexCshtml()
        {
            this.codeEditorIndexCshtml.Text = string.Empty;
            var         codeMaker = new DBCodeWebUIMaker(idbObj, this.DBName, this.TableName);
            CodeOptions optins    = new CodeOptions
            {
                ModelName = this.TableName,
                NameSpace = "RDIFramework.MvcApp",
                tableName = this.TableName
            };
            string          templatePaht = Application.StartupPath + @"\Templates\MvcUI\";
            NVelocityHelper vel          = new NVelocityHelper(templatePaht);

            vel.Put("code", optins);
            string stringResult = vel.FileToString("IndexCshtml.vm");

            this.codeEditorIndexCshtml.SetCodeEditorContent("Aspx", stringResult);
            this.codeEditorIndexCshtml.SaveFileName = this.TableName;
        }
예제 #2
0
        /// <summary>
        /// 生成Controller文件
        /// </summary>
        private void BuilerController()
        {
            var codeMaker = new DBCodeWebUIMaker(idbObj, this.DBName, this.TableName);
            var optins    = new CodeOptions
            {
                ModelName = this.TableName,
                NameSpace = "RDIFramework.MvcApp.Areas.ExampleModule.Controllers",
                tableName = this.TableName,
                dbName    = this.DBName,
                dbObj     = idbObj
            };

            string          templatePaht = Application.StartupPath + @"\Templates\MvcUI\";
            NVelocityHelper vel          = new NVelocityHelper(templatePaht);

            vel.Put("options", optins);
            string stringResult = vel.FileToString("Controller.vm");

            this.codeEditorController.SetCodeEditorContent("CS", stringResult);
            this.codeEditorController.SaveFileName = this.TableName + "Controller.cs";
        }
예제 #3
0
        private void BuilderJs()
        {
            var         codeMaker = new DBCodeWebUIMaker(idbObj, this.DBName, this.TableName);
            CodeOptions optins    = new CodeOptions
            {
                ModelName = this.TableName,
                //NameSpace = "RDIFramework.MvcApp",
                tableName = this.TableName,
                dbName    = this.DBName,
                dbObj     = idbObj
            };

            string          templatePaht = Application.StartupPath + @"\Templates\MvcUI\";
            NVelocityHelper vel          = new NVelocityHelper(templatePaht);

            vel.Put("options", optins);
            string stringResult = vel.FileToString("JavaScript.vm");

            this.codeEditorJs.SetCodeEditorContent("JavaScript", stringResult);
            this.codeEditorJs.SaveFileName = this.TableName;
        }
예제 #4
0
        /// <summary>
        /// 生成Ashx文件
        /// </summary>
        private void BuilerAshx()
        {
            var codeMaker = new DBCodeWebUIMaker(idbObj, this.DBName, this.TableName);
            var optins    = new CodeOptions
            {
                ModelName = this.TableName,
                NameSpace = "RDIFramework.WebApp",
                tableName = this.TableName,
                dbName    = this.DBName,
                dbObj     = idbObj
            };

            string          templatePaht = Application.StartupPath + @"\Templates\WebUI\";
            NVelocityHelper vel          = new NVelocityHelper(templatePaht);

            vel.Put("options", optins);
            string stringResult = vel.FileToString("ashx.vm");

            this.codeEditorAshx.SetCodeEditorContent("CS", stringResult);
            this.codeEditorAshx.SaveFileName = this.TableName + ".ashx";
        }