Example #1
0
        void ObjectsItemEndEdit(IEditableObject sender)
        {
            ZonaUnidadViewModel UIObject = sender as ZonaUnidadViewModel;

            try
            {
                ZonaUnidadDataAccess.UpdateZonaUnidad(UIObject.GetDataObject());
            }
            catch (Exception ex)
            {
                log.Error(ex.StackTrace);
            }
        }
Example #2
0
 void ObjectsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Remove)
     {
         try
         {
             foreach (object item in e.OldItems)
             {
                 ZonaUnidadViewModel UIObject = item as ZonaUnidadViewModel;
                 ZonaUnidadDataAccess.DeleteZonaUnidad(UIObject.GetDataObject());
             }
         }
         catch (Exception ex)
         {
             log.Error(ex.StackTrace);
         }
     }
 }