public async void UpdateDisplay(string prBookId) { _Book = await ServiceClient.GetBooksDetailsAsync(prBookId); txtBookId.Text = _Book.BookId.ToString(); tbBookName.Text = _Book.BookName; txtAuthor.Text = _Book.AuthorName; txtISBN.Text = _Book.ISBN.ToString(); rtbDesc.Text = _Book.BookDesc; tbPrice.Text = _Book.Price.ToString(); tbItemLeft.Text = _Book.BooksLeft.ToString(); ddlType.SelectedItem = _Book.Condition; ddlGenre.DataSource = null; ddlGenre.DataSource = await ServiceClient.GetGenreNamesAsync(); string genre = await ServiceClient.GetGenreNameAsync(_Book.GenreId.ToString()); ddlGenre.Text = genre; cbAntique.Checked = bool.Parse(_Book.Antique.ToString()); if (_Book.Package == "Paperback") { ddlPackage.SelectedIndex = 0; } else { ddlPackage.SelectedIndex = 1; } txtWeight.Text = _Book.Weight.ToString(); }
internal async static Task <string> UpdateBookAsync(clsBook prBook) { return(await InsertOrUpdateAsync(prBook, "http://localhost:60064/api/book/UpdateBook", "POST")); }