Example #1
0
        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());
        }
Example #2
0
 private void back_Click(object sender, EventArgs e)
 {
     MainFormView.ShowForm(new CriarBD());
 }
Example #3
0
 private void button4_Click(object sender, EventArgs e)
 {
     MainFormView.ShowForm(new VerTurnosFuncionarios());
 }
Example #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     MainFormView.ShowForm(new GeneticForm());
 }
Example #5
0
 private void button2_Click(object sender, EventArgs e)
 {
     MainFormView.ShowForm(new SimulacaoPrecos());
 }
Example #6
0
 private void button5_Click(object sender, EventArgs e)
 {
     MainFormView.ShowForm(new CriarEncomenda());
 }
Example #7
0
 private void button3_Click(object sender, EventArgs e)
 {
     MainFormView.ShowForm(new BD());
 }