private void listBox_newOrders_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (listBox_newOrders.SelectedItem != null) { listBox_shippedOrders.SelectedItem = null; CrudOrder.Selected = CrudOrder.SetSelected <Order>(listBox_newOrders.SelectedItem); CrudProduct.Selected = CrudProduct.SetSelected <Product>(CrudProduct.GetProductById(CrudOrder.Selected.ProductId)); ToggleButtons(); SetSelectedProductGrid(); } }
private void listBox_product_SelectionChanged(object sender, SelectionChangedEventArgs e) { CrudProduct.Selected = CrudProduct.SetSelected <Product>(listBox_product.SelectedItem); SetProductValues(); if (CrudUser.Selected.AccountType == 1) { button_review.IsEnabled = true; } PopulateReviewList(); }