private void button3_Click(object sender, EventArgs e) { string strSQL = "update tbFLUXO set confirmacao='não confirmado' where campo=4"; SqlCommand comando = new SqlCommand(strSQL, sqlConn); try { sqlConn.Open(); comando.ExecuteNonQuery(); DialogResult confirm = MessageBox.Show("Adicionar Ocorrência?", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2); if (confirm.ToString().ToUpper() == "OK") { this.Visible = false; Fluxo Form2 = new Fluxo(); Ocorrencias newForm5 = new Ocorrencias(); newForm5.ShowDialog(); } } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); } finally { sqlConn.Close(); } }
private void ocorrênciasToolStripMenuItem_Click(object sender, EventArgs e) { this.Visible = false; Ocorrencias Form2 = new Ocorrencias(); Ocorrencias newForm5 = new Ocorrencias(); newForm5.ShowDialog(); }