private clsAllBook BuildBook(int prQuantity) { clsAllBook lcBook = new clsAllBook(); lcBook.ISBN = _Book.ISBN; lcBook.Quantity = prQuantity; return(lcBook); }
internal async static Task <string> DeleteBookAsync(clsAllBook prBook) { using (HttpClient lcHttpClient = new HttpClient()) { HttpResponseMessage lcRespMessage = await lcHttpClient.DeleteAsync ($"http://localhost:60064/api/bookstore/DeleteBook?prName=" + prBook.Name); return(await lcRespMessage.Content.ReadAsStringAsync()); } throw new NotImplementedException(); }
protected async override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.Parameter != null) { string lcBookName = e.Parameter.ToString(); _Book = await ServiceClient.GetBookAsync(lcBookName); dispatchBookContent(_Book); updateDisplay(); } }
private void btnSelect_Click(object sender, RoutedEventArgs e) { try { clsAllBook lcBook = (clsAllBook)lstGenreBooks.SelectedItem; string lcName = lcBook.Name; this.Frame.Navigate(typeof(pgBook), lcName); } catch (Exception) { } }
private async void sendOrder() { try { setOrder(); clsAllBook lcBook = BuildBook(Convert.ToInt32(tbxQuantity.Text)); await ServiceClient.UpdateBookQuantityAsync(lcBook); await ServiceClient.InsertOrderAsync(_Order); var dialogOrderComplete = new MessageDialog("Order Completed successfully, Confirmation email sent to: " + tbxCustEmailAddress.Text); await dialogOrderComplete.ShowAsync(); this.Frame.Navigate(typeof(pgMain)); } catch (Exception) { } }
private void dispatchBookContent(clsAllBook prBook) { _BooksContent[prBook.BookFormat].DynamicInvoke(prBook); updatePage(prBook); }
private void updatePage(clsAllBook prBook) { (ctcBookSpecs.Content as IBookControl).UpdateControl(prBook); }
private void RunPhysical(clsAllBook prBook) { ctcBookSpecs.Content = new ucPhysical(); }
private void RunDigital(clsAllBook prBook) { ctcBookSpecs.Content = new ucDigital(); }
public void UpdateControl(clsAllBook prBook) { txtQuantity.Text = "Quantity: " + prBook.Quantity.ToString(); txtCoverType.Text = "Cover Type: " + prBook.CoverType; }
internal async static Task <string> InsertBookAsync(clsAllBook _Book) { return(await InsertOrUpdateAsync(_Book, "http://localhost:60064/api/bookstore/PostBook", "POST")); }
internal async static Task <string> UpdateBookQuantityAsync(clsAllBook _Book) { return(await InsertOrUpdateAsync(_Book, "http://localhost:60064/api/bookstore/PutBookQuantity", "PUT")); }
public void UpdateControl(clsAllBook prBook) { txtDownloadURL.Text = "Download URL: " + prBook.DownloadURL; }