示例#1
0
        private void btnOkButton_Click(object sender, EventArgs e)
        {
            String mensagem   = "";
            String ComandoSQL = "INSERT INTO modelo(sigla,nome,descricao) " +
                                "VALUES('" + txtSigla.Text + "','" + txtNome.Text + "','" + txtDescricao.Text + "');";

            PostgreSQL pgSQL = new PostgreSQL();

            mensagem = pgSQL.ExecutarComandoSQL(ComandoSQL);

            if (mensagem != "")
            {
                MessageBox.Show(mensagem);
            }
            else
            {
                Close();
            }
        }
示例#2
0
        private void carregarAreas(String modelo)
        {
            DataSet    dadosdataSet = new DataSet();
            PostgreSQL pgSQL        = new PostgreSQL();
            String     comandoSQL;

            dadosdataSet.Clear();
            pgSQL.abrirConexao();

            comandoSQL = "SELECT nome,sigla,nivelmaturidade FROM areaprocesso WHERE modelo = '" + modelo + "'";

            NpgsqlDataAdapter dados = new Npgsql.NpgsqlDataAdapter(comandoSQL, pgSQL.getConnectionString());

            dados.Fill(dadosdataSet);


            qryAreas.DataSource = dadosdataSet.Tables[0];

            pgSQL.fecharConexao();
        }
示例#3
0
        private void carregarComboModelo()
        {
            PostgreSQL pgSQL = new PostgreSQL();
            String     comandoSQL;
            DataSet    dadosdataSet = new DataSet();

            dadosdataSet.Clear();
            pgSQL.abrirConexao();
            comandoSQL = "SELECT * FROM modelo";

            NpgsqlDataAdapter dados = new Npgsql.NpgsqlDataAdapter(comandoSQL, pgSQL.getConnectionString());

            dados.Fill(dadosdataSet);


            cboModelo.DataSource    = dadosdataSet.Tables[0];
            cboModelo.ValueMember   = "sigla";
            cboModelo.DisplayMember = "nome";
            pgSQL.fecharConexao();
        }
示例#4
0
        private void carregarNiveisMaturidade(String nivelmaturidade)
        {
            DataSet    dadosdataSet = new DataSet();
            PostgreSQL pgSQL        = new PostgreSQL();
            String     comandoSQL;

            dadosdataSet.Clear();
            pgSQL.abrirConexao();

            comandoSQL = "SELECT nome,sigla FROM nivelmaturidade WHERE sigla = '" + nivelmaturidade + "'";

            NpgsqlDataAdapter dados = new Npgsql.NpgsqlDataAdapter(comandoSQL, pgSQL.getConnectionString());

            dados.Fill(dadosdataSet);


            qryNiveisMaturidade.DataSource = dadosdataSet.Tables[0];

            pgSQL.fecharConexao();
        }
示例#5
0
        private void carregarPraticasEspecificas(String metaespecifica)
        {
            DataSet    dadosdataSet = new DataSet();
            PostgreSQL pgSQL        = new PostgreSQL();
            String     comandoSQL;

            dadosdataSet.Clear();
            pgSQL.abrirConexao();

            comandoSQL = "SELECT nome,sigla FROM praticaespecifica WHERE metaespecifica = '" + metaespecifica + "'";

            NpgsqlDataAdapter dados = new Npgsql.NpgsqlDataAdapter(comandoSQL, pgSQL.getConnectionString());

            dados.Fill(dadosdataSet);


            qryPraticasEspecificas.DataSource = dadosdataSet.Tables[0];

            pgSQL.fecharConexao();
        }
示例#6
0
        private void btnConfirmar_Click(object sender, EventArgs e)
        {
            String mensagem   = "";
            String ComandoSQL = "INSERT INTO categoria(nome) " +
                                "VALUES('" + txtNome.Text + "');";

            PostgreSQL pgSQL = new PostgreSQL();

            mensagem = pgSQL.ExecutarComandoSQL(ComandoSQL);

            if (mensagem != "")
            {
                MessageBox.Show(mensagem);
            }
            else
            {
                MessageBox.Show("Categoria cadastrada com sucesso!");

                txtNome.Clear();
                txtNome.Focus();
            }
        }
示例#7
0
        private void btnConfirmar_Click(object sender, EventArgs e)
        {
            String mensagem   = "";
            String ComandoSQL = "INSERT INTO praticaespecifica(sigla,nome,descricao,metaespecifica) " +
                                "VALUES('" + txtSigla.Text + "','" + txtNome.Text + "','" + txtDescricao.Text + "','" + cboMeta.SelectedValue + "');";

            PostgreSQL pgSQL = new PostgreSQL();

            mensagem = pgSQL.ExecutarComandoSQL(ComandoSQL);

            if (mensagem != "")
            {
                MessageBox.Show(mensagem);
            }
            else
            {
                MessageBox.Show("Pratica Específica cadastrada com sucesso!");
                txtSigla.Clear();
                txtDescricao.Clear();
                txtNome.Clear();
                txtSigla.Focus();
            }
        }
示例#8
0
        private void btnConfirmar_Click_1(object sender, EventArgs e)
        {
            String mensagem   = "";
            String ComandoSQL = "INSERT INTO areaprocesso(sigla,nome,descricao,nivelmaturidade,categoria) " +
                                "VALUES('" + txtSigla.Text + "','" + txtNome.Text + "','" + txtDescricao.Text + "','" + cboNivel.SelectedValue + "','" + cboCategoria.SelectedValue + "');";

            PostgreSQL pgSQL = new PostgreSQL();

            mensagem = pgSQL.ExecutarComandoSQL(ComandoSQL);

            if (mensagem != "")
            {
                MessageBox.Show(mensagem);
            }
            else
            {
                MessageBox.Show("Área de Processo cadastrada com sucesso!");
                txtSigla.Clear();
                txtDescricao.Clear();
                txtNome.Clear();
                txtSigla.Focus();
            }
        }
示例#9
0
        private void btnConfirmar_Click(object sender, EventArgs e)
        {
            String mensagem   = "";
            String ComandoSQL = "INSERT INTO produtotrabalho(nome,teamplate) " +
                                "VALUES('" + txtNome.Text + "','" + txtTeamplate.Text + "');";

            PostgreSQL pgSQL = new PostgreSQL();

            mensagem = pgSQL.ExecutarComandoSQL(ComandoSQL);

            if (mensagem != "")
            {
                MessageBox.Show(mensagem);
            }
            else
            {
                MessageBox.Show("Produto de Trabalho cadastrado com sucesso!");

                txtNome.Clear();
                txtTeamplate.Clear();
                txtNome.Focus();
            }
        }
示例#10
0
        private void btnConfirmar_Click(object sender, EventArgs e)
        {
            String mensagem   = "";
            String ComandoSQL = "INSERT INTO nivelcapacidade(sigla,nome,descricao) " +
                                "VALUES('" + txtSigla.Text + "','" + txtNome.Text + "','" + txtDescricao.Text + "');";

            PostgreSQL pgSQL = new PostgreSQL();

            mensagem = pgSQL.ExecutarComandoSQL(ComandoSQL);

            if (mensagem != "")
            {
                MessageBox.Show(mensagem);
            }
            else
            {
                MessageBox.Show("Nível de Capacidade cadastrado com sucesso!");
                txtSigla.Clear();
                txtDescricao.Clear();
                txtNome.Clear();
                txtSigla.Focus();
            }
        }