private void EditOrder()
        {
            MostRecentOrdersRecord record = dataGrid.SelectedItem as MostRecentOrdersRecord;

            if (record == null)
            {
                return;
            }

            EditOrderViewModel edit_model = new EditOrderViewModel
            {
                Mode    = EditOrderViewModel.ModelMode.Edit,
                OrderID = record.OrderID
            };

            EditOrderWindow window = new EditOrderWindow(edit_model);

            window.Owner = this;
            window.ShowDialog();

            if (window.DialogResult == false)
            {
                return;
            }
        }
        private void ButtonNew_Click(object sender, RoutedEventArgs e)
        {
            EditOrderViewModel edit_model = new EditOrderViewModel
            {
                Mode = EditOrderViewModel.ModelMode.New
            };

            EditOrderWindow window = new EditOrderWindow(edit_model);

            window.Owner = this;
            window.ShowDialog();

            if (window.DialogResult == false)
            {
                return;
            }
        }