private void back_Click(object sender, EventArgs e) // apagar a BD { try { //delete the database string connectionString = ConfigurationManager.ConnectionStrings["MedirmDB"].ConnectionString; SqlConnection con = new SqlConnection(connectionString); SqlCommand com = new SqlCommand("DELETE FROM VerPrecos", con); com.CommandType = CommandType.Text; con.Open(); int i = com.ExecuteNonQuery(); con.Close(); //Clear the fields textBox3.Clear(); comboBox2.ResetText(); comboBox1.ResetText(); } catch (Exception x) { //Error Message MessageBox.Show("Erro."); } MainFormView.ShowForm(new Menu()); }
private void back_Click(object sender, EventArgs e) { MainFormView.ShowForm(new CriarBD()); }
private void button4_Click(object sender, EventArgs e) { MainFormView.ShowForm(new VerTurnosFuncionarios()); }
private void button1_Click(object sender, EventArgs e) { MainFormView.ShowForm(new GeneticForm()); }
private void button2_Click(object sender, EventArgs e) { MainFormView.ShowForm(new SimulacaoPrecos()); }
private void button5_Click(object sender, EventArgs e) { MainFormView.ShowForm(new CriarEncomenda()); }
private void button3_Click(object sender, EventArgs e) { MainFormView.ShowForm(new BD()); }