Ejemplo n.º 1
0
 private void bt_OP_OK_Click(object sender, EventArgs e)
 {
     if (dataGrid_OP_SelectPRJ.CurrentRow != null)
     {
         if (bdDataSet.Tables["nomeObjeto"].Rows.Count > 0)
         {
             try
             {
                 this.Hide();
                 formCadatroObjeto fCadastro = new formCadatroObjeto(dataGrid_OP_SelectPRJ.CurrentRow.Cells[0].Value.ToString(), bdConn);
                 fCadastro.ShowDialog();
                 this.Show();
             }
             catch (Exception ex)
             {
                 MessageBox.Show(ex.Message, "Erro!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 bdConn.Close();
             }
         }
         else
         {
             MessageBox.Show("Nenhum projeto foi encontrado! Pesquise novamente.", "Atenção!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
     }
 }
Ejemplo n.º 2
0
        private void bt_Cadastrar_Click(object sender, EventArgs e)
        {
            this.Hide();
            formCadatroObjeto fCadastro = new formCadatroObjeto("", bdConn);

            fCadastro.ShowDialog();
            this.Show();
        }
Ejemplo n.º 3
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 5)
     {
         this.Hide();
         formCadatroObjeto fCadastro = new formCadatroObjeto(dataGridView1.CurrentRow.Cells[0].Value.ToString(), bdConn);
         fCadastro.ShowDialog();
         this.Show();
     }
 }