private void btnChange_Click(object sender, RoutedEventArgs e) { string ISBN = txtBoxBookISBN.Text; string title = txtBoxTitle.Text; string publisher = txtBoxPublisher.Text; string author = txtBoxAuthor.Text; string numberofpages = txtBoxNrOfPages.Text; int nrpages = Convert.ToInt32(numberofpages); string printyear = txtBoxYearPrinted.Text; int pyear = Convert.ToInt32(printyear); controller.ChangeBook(ISBN, title, nrpages, pyear, publisher, author); this.Close(); }