Пример #1
0
        /// <summary>
        /// </summary>
        /// <param name="_ds"></param>
        /// <param name="tableName"></param>
        /// <param name="columnDropDown">Clumn:Table;</param>
        private void Gen(DataSet _ds, string tableName, string columnDropDown = "")
        {
            var f = new FileCode { Path = _path };

            List<MappingColumn> mappingColumn = null;
            if (columnDropDown != "")
                mappingColumn = MappingColumn.ExtractMappingColumn(columnDropDown);

            var aspxFromCodeaspx = new AspxFromCode
            {
                FileCode = f,
                Ds = _ds,
                TableName = tableName,
                MappingColumn = mappingColumn
            };
            aspxFromCodeaspx.Gen();

            var aspxFromCodeBehide = new AspxFromCodeBehide
            {
                FileCode = f,
                Ds = _ds,
                TableName = tableName,
                MappingColumn = mappingColumn
            };
            aspxFromCodeBehide.Gen();

            #region Picture Module

            if (aspxFromCodeaspx.HavePicture())
            {
                var ApiControllerPath = _path + @"App_Code\Services\Api\";
                f.Path = ApiControllerPath;
                var ApiController = new ImageApiController
                {
                    FileCode = f,
                    Ds = _ds,
                    TableName = tableName
                };
                ApiController.Gen();

                var HandlerPath = _path;
                f.Path = HandlerPath;
                var Handler = new ImageHandler
                {
                    FileCode = f,
                    Ds = _ds,
                    TableName = tableName
                };
                Handler.Gen();

                var DbCodeImagePath = _path + @"App_Code\Business\"; ;
                f.Path = DbCodeImagePath;
                var _DbCodeImage = new DbCodeImage
                {
                    FileCode = f,
                    Ds = _ds,
                    TableName = tableName
                };
                _DbCodeImage.Gen();
            }

            #endregion Picture Module
 

            f.Path = _path;
            var aspxTableCodeFilterColumn = new AspxTableCodeFilterColumn
            {
                FileCode = f,
                Ds = _ds,
                TableName = tableName,
                MappingColumn = mappingColumn
                //AspxFromCodeaspx = _AspxFromCodeaspx
            };
            aspxTableCodeFilterColumn.Gen();

            var aspxTableCodeFilterColumnCodeBehide =
                new AspxTableCodeFilterColumnCodeBehide
                {
                    FileCode = f,
                    Ds = _ds,
                    TableName = tableName,
                    MappingColumn = mappingColumn
                };
            //_AspxTableCodeFilterColumnCodeBehide.AspxFromCodeBehide = _AspxFromCodeBehide;
            aspxTableCodeFilterColumnCodeBehide.Gen();

            var pageService = new PageService
            {
                FileCode = f,
                Ds = _ds,
                TableName = tableName
            };
            pageService.Gen();

            var pathPageServiceCodeBehide = _path + @"App_Code\Services\";
            f.Path = pathPageServiceCodeBehide;
            var pageServiceCodeBehide = new PageServiceCodeBehide
            {
                FileCode = f,
                Ds = _ds,
                TableName = tableName
            };
            pageServiceCodeBehide.Gen();

            var pathSQlScript = _path + @"SQL\";
            f.Path = pathSQlScript;
            var storeProCode = new StoreProCode
            {
                FileCode = f,
                Ds = _ds,
                TableName = tableName
            };
            storeProCode.Gen();

            //Gen Javascript

            var pathJsU = _path + @"Js_U\";
            f.Path = pathJsU;
            var jsCode = new JsCode
            {
                FileCode = f,
                Ds = _ds,
                TableName = tableName
            };
            jsCode.Gen();

            //========Folder Code

            var pathBuCode = _path + @"App_Code\Business\";
            f.Path = pathBuCode;
            var pcode = new PropertiesCode
            {
                FileCode = f,
                Ds = _ds,
                TableName = tableName
            };
            pcode.Gen();

            //DbCode _DbCode = new DbCode();
            //_DbCode._FileCode = F;
            //_DbCode._ds = _ds;
            //_DbCode._TableName = _TableName;
            //_DbCode.Gen();

            //var dbCodeFireBird = new DbCodeFireBird
            //{
            //    FileCode = f,
            //    Ds = _ds,
            //    TableName = tableName
            //};
            //dbCodeFireBird.Gen();

            var dbCodeSqlServer = new DbCodeSqlServer
            {
                FileCode = f,
                Ds = _ds,
                TableName = tableName
            };
            dbCodeSqlServer.Gen();
        }
Пример #2
0
 private void ClearFile()
 {
     var f = new FileCode { Path = _path };
     f.ClearAllFile();
 }