private void ToolBarButtonAddOrder_Click(object sender, RoutedEventArgs e)
        {
            ClientOrder           clientOrder           = ClientOrder.GetNew();
            ClientOrderEditDialog clientOrderEditDialog = new ClientOrderEditDialog(clientOrder);

            clientOrderEditDialog.ShowDialog();
        }
 private void ToolBarButtonEdit_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewOrderLog.SelectedItem != null)
     {
         ClientOrder stagnantClientOrder = (ClientOrder)this.ListViewOrderLog.SelectedItem;
         ClientOrder freshClientOrder    = ClientOrderCollection.GetByClientOrderId(stagnantClientOrder.ClientOrderId);
         freshClientOrder.RowOperationType = RowOperationTypeEnum.Update;
         ClientOrderEditDialog clientOrderEditDialog = new ClientOrderEditDialog(freshClientOrder);
         clientOrderEditDialog.Closed += ClientOrderEditDialog_Closed;
         clientOrderEditDialog.ShowDialog();
     }
 }
        private void ClientOrderEditDialog_Closed(object sender, EventArgs e)
        {
            ClientOrderEditDialog clientOrderEditDialog = (ClientOrderEditDialog)sender;
            ClientOrder           clientOrder           = clientOrderEditDialog.ClientOrderClone;

            foreach (ClientOrder co in this.m_ClientOrderCollection)
            {
                if (co.ClientOrderId == clientOrder.ClientOrderId)
                {
                    co.UpdateFromClone(clientOrder);
                    break;
                }
            }
            this.NotifyPropertyChanged(string.Empty);
        }