示例#1
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            //SqlCommand cmd = new SqlCommand("sp_insert", cnn);//crear stored procedure
            //cmd.CommandType = CommandType.StoredProcedure;
            ////tabla pacient
            data_contact[0] = txtContacto.Text;
            data_contact[1] = txtDireccion.Text;
            data_contact[2] = txtEmail.Text;
            data_contact[3] = txtTelefono.Text;

            cnx.InsertData(data_contact, columns_contacts);
            MessageBox.Show("Contacto guardado correctamente.");
            this.Hide();
            menu.Show();
        }