// Increase selected customer orders by 1000 public void IncreaseOrders() { if (SelectedCustomer == null) { return; } // Hide message MessageVisibility = Visibility.Collapsed; // Increase orders SelectedCustomer.Orders += 1000; var increaseInfo = new IncreaseInfo(SelectedCustomer.CustomerName, 1000); // STEP 4: Broadcast increase message using the MessageBus, // specifying a callback that the subscriber can invoke SendMessage(MessageTokens.IncreaseOrders, new NotificationEventArgs <IncreaseInfo, ApprovalInfo>(null, increaseInfo, OnIncreaseResponse)); }
public ApproveIncreaseView(IncreaseInfo info) { InitializeComponent(); QuantityText.Text = info.Amount.ToString(); CustomerText.Text = info.CustomerName; }