private void btnDelete_Click(object sender, EventArgs e) { if (d.TaskID != null) { SqliteDataAccess.Delete(d); MessageBox.Show("Successfully Deleted Task"); } d.TaskID = null; }