private void btn_cancelar_Click(object sender, EventArgs e)
        {
            Paquetes ol = new Paquetes();

            ol.Show();
            this.Hide();
        }
Пример #2
0
        private void btn_Paquetes_Click(object sender, EventArgs e)
        {
            Paquetes paqe = new Paquetes();

            paqe.Show();
            this.Hide();
        }
        private void btn_Eliminar_Click(object sender, EventArgs e)
        {
            String id = comboBox1.Text;

            if (conexion.State == System.Data.ConnectionState.Closed)
            {
                conexion.Open();
            }
            MySqlCommand Eliminar = new MySqlCommand("delete from paquetes where id_paq = @id_paq", conexion);

            Eliminar.Parameters.AddWithValue("@id_paq", id);
            Eliminar.ExecuteNonQuery();
            MessageBox.Show("El paquete se ha eliminado");

            Paquetes ol = new Paquetes();

            ol.Show();
            this.Hide();
            conexion.Close();
        }
 private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox4.Text == "Agregar")
     {
         Paquetes paq = new Paquetes();
         paq.Show();
         this.Hide();
     }
     if (comboBox4.Text == "Eliminar")
     {
         Eliminar_paquetes paq = new Eliminar_paquetes();
         paq.Show();
         this.Hide();
     }
     if (comboBox4.Text == "Modificar")
     {
         Modificar_paquetes paq = new Modificar_paquetes();
         paq.Show();
         this.Hide();
     }
 }