private void updateButton_Click(object sender, EventArgs e) { addBook addBookOBj = new addBook(); addBookOBj.bID = int.Parse(bIDTextBox.Text); addBookOBj.titel = titelTextBox.Text; addBookOBj.cID = int.Parse(cIDTextBox.Text); addBookOBj.isbn = isbnTextBox.Text; addBookOBj.publisher = publisherTextBox.Text; addBookOBj.edition = editionTextBox.Text; addBookOBj.arthor = arthorTextBox.Text; addBookOBj.copies = int.Parse(copiesTextBox.Text); addBookBL bookBLOBj = new addBookBL(); bool result = bookBLOBj.UpdateBookAndSendToBL(addBookOBj); if (result) { MessageBox.Show("Succesfuly Update!!!!"); this.PopulateGridView(); IntitialButtonMood(); CleanTextBar(); } else { MessageBox.Show("ERROR!!"); } }
private void PopulateGridView() { DataTable dt = new DataTable(); addBookBL studentBLOBj = new addBookBL(); dt = studentBLOBj.GetExistingdBookBL(); bookDataGridView.DataSource = dt; }