private void ButtonListProducts_Click(object sender, RoutedEventArgs e) { int id = (int)((DataRowView)ordersGrid.SelectedItem).Row.ItemArray[0]; Window listProduct = new OrderProductListWindow(id); listProduct.ShowDialog(); RefreshList(); }
private void ButtonListProducts_Click(object sender, RoutedEventArgs e) { var windowListProducts = new OrderProductListWindow(idRecord); if (windowListProducts.ShowDialog().Value) { var result = windowListProducts.Result; if (!result) { comboBoxStatusOfOrder.IsEnabled = false; comboBoxStatusOfOrder.SelectedValue = "Отменён"; } } order.UpdateTotalPrice(connection); textBoxTotal_Price.Text = order.totalPrice.ToString(); textBoxDebt.Text = order.debt.ToString(); }