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 MenuItemCreateOrderFromMaster_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewOrderLog.SelectedItems.Count > 0)
     {
         foreach (ClientOrder clientOrder in this.ListViewOrderLog.SelectedItems)
         {
             if (clientOrder.IsMasterOrder == true)
             {
                 ClientOrder stagnantClientOrder = clientOrder;
                 ClientOrder freshClientOrder    = ClientOrderCollection.GetByClientOrderId(stagnantClientOrder.ClientOrderId);
                 ClientOrder cloned = freshClientOrder.CreateNewFromMaster();
                 cloned.Save();
             }
         }
         MessageBox.Show("Orders have been created.");
     }
     else
     {
         MessageBox.Show("Please select one or more orders to copy.");
     }
 }