コード例 #1
0
        private void btnRemove_Click(object sender, EventArgs e)
        {
            ValidacionesInicializaciones frmVI = new ValidacionesInicializaciones();

            if (dgvServices.CurrentRow == null)
            {
                return;
            }

            frmVI.service = this;
            this.Enabled  = false;
            frmVI.ShowDialog();

            /*
             * using (SqlConnection cnn = new SqlConnection("connection string"))
             * {
             *
             *  object query = "INSERT Tabla (campo) VALUES (@param)";
             *
             *  SqlCommand cmd = new SqlCommand(query, cnn);
             *  cmd.Parameters.AddWithValue("@param", id);
             *
             *  cmd.ExecuteNonQuery();
             *
             * }
             *
             *
             *
             * dgvServices.Rows.Remove(dgvServices.CurrentRow);*/
        }