Esempio n. 1
0
 public void DeleteCustomField(CustomFieldRecord cfr)
 {
     try
     {
         lock (_customFieldsLock)
         {
             for (int i = CustomFields.Count - 1; i >= 0; i--)
             {
                 CustomFieldRecord item = CustomFields[i];
                 if (cfr.Tag == item.Tag)
                 {
                     CustomFields.RemoveAt(i);
                 }
             }
         }
     }
     catch (Exception e)
     {
         Trace.WriteLine(e.ToString());
     }
 }
Esempio n. 2
0
        private void DeleteCommandHandler(object sender, ExecutedRoutedEventArgs e)
        {
            CustomFieldRecord cfr = lvCustomFields.SelectedItem as CustomFieldRecord;

            (DataContext as OrderViewModel).DeleteCustomField(cfr);
        }