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

            try
            {
                if (UIObject.Name != null)
                {
                    PeriodicAreasDataAccess.UpdatePeriodicArea(UIObject.GetDataObject());
                }
            }
            catch (Exception ex)
            {
                log.Error(ex.StackTrace);
            }
        }
Exemplo n.º 2
0
 void ObjectsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Remove)
     {
         try
         {
             foreach (object item in e.OldItems)
             {
                 PeriodicAreaViewModel UIObject = item as PeriodicAreaViewModel;
                 PeriodicAreasDataAccess.DeletePeriodicArea(UIObject.GetDataObject());
             }
         }
         catch (Exception ex)
         {
             log.Error(ex.StackTrace);
         }
     }
 }