Ejemplo n.º 1
0
        void ObjectsItemEndEdit(IEditableObject sender)
        {
            PeriodicHydroSystemsViewModel UIObject = sender as PeriodicHydroSystemsViewModel;

            try
            {
                if (UIObject.Name != null)
                {
                    PeriodicHydroSystemsDataAccess.UpdatePeriodicHydroSystem(UIObject.GetDataObject());
                }
            }
            catch (Exception ex)
            {
                log.Error(ex.StackTrace);
            }
        }
Ejemplo n.º 2
0
 void ObjectsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Remove)
     {
         try
         {
             foreach (object item in e.OldItems)
             {
                 PeriodicHydroSystemsViewModel UIObject = item as PeriodicHydroSystemsViewModel;
                 PeriodicHydroSystemsDataAccess.DeletePeriodicHydroSystem(UIObject.GetDataObject());
             }
         }
         catch (Exception ex)
         {
             log.Error(ex.StackTrace);
         }
     }
 }