コード例 #1
0
        private static void CanExecuteUndo(object target, CanExecuteRoutedEventArgs e)
        {
            bool result = false;
            CslaDataProviderCommandManager ctl = target as CslaDataProviderCommandManager;

            if (ctl != null && ctl.Provider != null)
            {
                if (ctl.Provider.Data != null)
                {
                    Csla.Core.IEditableBusinessObject ibiz = ctl.Provider.Data as Csla.Core.IEditableBusinessObject;
                    if (ibiz != null)
                    {
                        result = ibiz.IsDirty;
                    }
                    else
                    {
                        Csla.Core.IEditableCollection icol = ctl.Provider.Data as Csla.Core.IEditableCollection;
                        if (icol != null)
                        {
                            result = icol.IsDirty;
                        }
                    }
                }
            }
            e.CanExecute = result;
        }
コード例 #2
0
 /// <summary>
 /// This method is called by a child object when it
 /// wants to be removed from the collection.
 /// </summary>
 /// <param name="child">The child object to remove.</param>
 void Core.IEditableCollection.RemoveChild(Csla.Core.IEditableBusinessObject child)
 {
     Remove((C)child);
 }
コード例 #3
0
 /// <summary>
 /// This method is called by a child object when it
 /// wants to be removed from the collection.
 /// </summary>
 /// <param name="child">The child object to remove.</param>
 void Core.IParent.RemoveChild(Csla.Core.IEditableBusinessObject child)
 {
     Remove((C)child);
 }