Ejemplo n.º 1
0
        internal static void MakeDomain()
        {
            var ConfigTable = new TableToClass();
            var BuildClass  = new Domain();
            var GroupTables = ConfigTable.GetTableMapper();

            WriteToConsole(" ");
            WriteToConsole("Gerando Domain Models...");

            foreach (var Table in GroupTables)
            {
                WriteToConsole("-> " + BuildClass.BuildModels(Table));
                if (VERIFY_TIME)
                {
                    TimeSleep(MILLISECONDS);
                }

                WriteToConsole("-> " + BuildClass.BuildModelsSpecialized(Table.Value.ClassName));
                if (VERIFY_TIME)
                {
                    TimeSleep(MILLISECONDS);
                }

                //WriteToConsole("-> " + BuildClass.BuildModelsValidations(Table));
                //if (VERIFY_TIME) { TimeSleep(MILLISECONDS); }
            }
        }
Ejemplo n.º 2
0
        internal static void MakeController()
        {
            var ConfigTable = new TableToClass();
            var BuildClass  = new Presentation();
            var GroupTables = ConfigTable.GetTableMapper();



            WriteToConsole(" ");
            WriteToConsole("Gerando Controllers...");

            WriteToConsole("-> " + BuildClass.BuildBase());
            if (VERIFY_TIME)
            {
                TimeSleep(MILLISECONDS);
            }

            foreach (var Table in GroupTables)
            {
                //CreateController = true entao gera controller na camada de apresentacao.
                if (Table.Value.CreateController)
                {
                    WriteToConsole("-> " + BuildClass.BuildController(Table.Value.ClassName));
                    if (VERIFY_TIME)
                    {
                        TimeSleep(MILLISECONDS);
                    }
                }
            }
        }
Ejemplo n.º 3
0
        internal static void MakeUnitOfWork()
        {
            var ConfigTable = new TableToClass();
            var BuildClass  = new Data();
            var GroupTables = ConfigTable.GetTableMapper();

            WriteToConsole(" ");
            WriteToConsole("Gerando UnitOfWork...");

            WriteToConsole("-> " + BuildClass.BuildUnitOfWork(GroupTables));
            if (VERIFY_TIME)
            {
                TimeSleep(MILLISECONDS);
            }
        }
Ejemplo n.º 4
0
        internal static void MakeMappers()
        {
            var ConfigTable = new TableToClass();
            var BuildClass  = new Data();
            var GroupTables = ConfigTable.GetTableMapper();

            WriteToConsole(" ");
            WriteToConsole("Gerando Mappers...");

            foreach (var Table in GroupTables)
            {
                WriteToConsole("-> " + BuildClass.BuildMapper(Table));
                if (VERIFY_TIME)
                {
                    TimeSleep(MILLISECONDS);
                }
            }
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            DataTable dtBases = new DataTable();

            ISIVIC.SP.Dal.BdEschemas db = new BdEschemas();
            dtBases = db.listarBasesDatos();
            foreach (DataRow bd in dtBases.Rows)
            {
                DataTable dtTablas = new DataTable();
                dtTablas = db.listarTablas(bd["Database"].ToString());
                foreach (DataRow tabla in dtTablas.Rows)
                {
                    DataTable dtColumnas = new DataTable();
                    dtColumnas = db.listarColumnas(tabla["table_name"].ToString());

                    TableToClass.GenerarClase(bd["Database"].ToString(), tabla["table_name"].ToString(), dtColumnas);
                    TableToStoredProdureMysql.BdName     = bd["Database"].ToString();
                    TableToStoredProdureMysql.Tabla      = tabla["table_name"].ToString();
                    TableToStoredProdureMysql.DtColumnas = dtColumnas;
                    TableToStoredProdureMysql.GenerarSp();
                }
            }
        }