private void btnDelete_Click(object sender, EventArgs e) { var book = new Book { Id = int.Parse(lblId.Text), Title = txtTitle.Text, Author = txtAuthor.Text, Price = decimal.Parse(txtPrice.Text), Description = txtDescription.Text, CountryId = (int)cmbCountry.SelectedValue }; BookRepo repo = new BookRepo(); repo.DeleteBookId(book.Id); LoadBooks(); }