Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }