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(); } }
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(); }
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(); }
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(); }
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(); }
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(); } }
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(); } }
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(); } }
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(); } }
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(); } }