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

            try
            {
                CortePeriodoDataAccess.UpdateCortePeriodo(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)
             {
                 CortePeriodoViewModel UIObject = item as CortePeriodoViewModel;
                 CortePeriodoDataAccess.DeleteCortePeriodo(UIObject.GetDataObject());
             }
         }
         catch (Exception ex)
         {
             log.Error(ex.StackTrace);
         }
     }
 }