コード例 #1
0
        void ObjectsItemEndEdit(IEditableObject sender)
        {
            PeriodicNonConventionalPlantsViewModel UIObject = sender as PeriodicNonConventionalPlantsViewModel;

            try
            {
                if (UIObject.Name != null)
                {
                    PeriodicNonConventionalPlantsDataAccess.UpdatePeriodicNonConventionalPlant(UIObject.GetDataObject());
                }
            }
            catch (Exception ex)
            {
                log.Error(ex.StackTrace);
            }
        }
コード例 #2
0
 void ObjectsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Remove)
     {
         try
         {
             foreach (object item in e.OldItems)
             {
                 PeriodicNonConventionalPlantsViewModel UIObject = item as PeriodicNonConventionalPlantsViewModel;
                 PeriodicNonConventionalPlantsDataAccess.DeletePeriodicNonConventionalPlant(UIObject.GetDataObject());
             }
         }
         catch (Exception ex)
         {
             log.Error(ex.StackTrace);
         }
     }
 }