예제 #1
0
        private void No_Click(object sender, EventArgs e)
        {
            Form back = new Eliminar_Hogar_Temporal();

            back.Show();
            this.Close();
        }
예제 #2
0
        private void Si_Click(object sender, EventArgs e)
        {
            try
            {
                SqlConnection con = new SqlConnection("server=AMADEUS ; database=QUILTROS ; integrated security=True");
                con.Open();
                String     qry = "DELETE FROM HOGAR_TEMPORAL WHERE cod_socio=(SELECT rut FROM SOCIO WHERE nombre='" + hogar + "')";
                SqlCommand cmd = new SqlCommand(qry, con);
                cmd.ExecuteNonQuery();
                MessageBox.Show("El hogar de " + hogar + " Ha sido eliminado correctamente.");
                con.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message);
            }
            Form back = new Eliminar_Hogar_Temporal();

            back.Show();
            this.Close();
        }
예제 #3
0
        private void EliminarHogarTemporalToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form deletehogar = new Eliminar_Hogar_Temporal();

            deletehogar.Show();
        }