我想从数据库中删除该行数据,目前我可以通过单击删除按钮删除该行数据,但是数据库表没有更新,我该怎么做?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace project
{
public partial class frmTestPrint : Form
{
public frmTestPrint()
{
InitializeComponent();
}
private void frmTestPrint_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'usersDataSet1.Booking' table. You can move, or remove it, as needed.
this.bookingTableAdapter.Fill(this.usersDataSet1.Booking);
}
private void btnDelete_Click(object sender, EventArgs e)
{
dataGridView1.Rows.RemoveAt(dataGridView1.CurrentRow.Index);
}
}
}