示例#1
0
 public void carregarCodigoGerente()
 {
     try
     {
         {
             FormProjeto      projeto = new FormProjeto();
             SQLiteConnection conn    = new SQLiteConnection(connectBase);
             if (conn.State == ConnectionState.Closed)
             {
                 conn.Open();
             }
             SQLiteCommand    cmd = new SQLiteCommand("SELECT codPessoa FROM tbPessoas WHERE nomePessoa = '" + projeto.comboGerente.Text.Trim() + "'", conn);
             SQLiteDataReader ler = cmd.ExecuteReader();
             ler.Read();
             projeto.textCodGerente.Text = ler["codPessoa"].ToString();
             conn.Close();
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Gerente não selecionado \n ");
     }
 }
示例#2
0
        private void projetoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormProjeto Projetos = new FormProjeto();

            Projetos.ShowDialog();
        }