Exemplo n.º 1
0
        public static void insertsIniciais()
        {
            StatusDAO statusDAO = new StatusDAO();

            if (statusDAO.checarInserts() == 0)
            {
                for (int i = 0; i < insertStatus.Length; i++)
                {
                    Status status = new Status();
                    status.Nome = insertStatus[i];
                    statusDAO.insert(status);
                }

                EstadosDAO estadosDAO = new EstadosDAO();

                for (int i = 0; i < insertEstados.Length; i++)
                {
                    Estados estado = new Estados();
                    estado.Nome  = insertEstados[i];
                    estado.Sigla = insertSiglas[i];
                    estadosDAO.insert(estado);
                }

                AcoesDAO acoesDAO = new AcoesDAO();

                for (int i = 0; i < insertAcoes.Length; i++)
                {
                    Acoes acao = new Acoes();
                    acao.Descricao = insertAcoes[i];
                    acoesDAO.insert(acao);
                }
            }
        }