Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection connection   = BDConnect.connection();
            apartados     objApartados = new apartados();

            bool estado = objApartados.insertar(connection, clname.Text);

            if (estado)
            {
                MessageBox.Show("datos insertados con exito");
                this.Dispose();
                this.Close();
                client_List.Items.Clear();
                interfazApartado ap = new interfazApartado();
                ap.ShowDialog();
            }
            else
            {
                MessageBox.Show("Error con la insercion");
            }
        }