csharp #xaf kaskadoweodwiezanie parent objectSpace #xpo

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp #xaf kaskadoweodwiezanie parent objectSpace #xpo相关的知识,希望对你有一定的参考价值。

    public static class MyHelper
    {
        public static void CascadeCommit(IObjectSpace os, object current, bool reload)
        {
            os.CommitChanges();
            if (os is INestedObjectSpace)
            {
                IObjectSpace parent = ((INestedObjectSpace)os).ParentObjectSpace;
                CascadeCommit(parent, parent.GetObject(current), reload);
            }
            if (reload && current != null)
            {
                os.ReloadObject(current);
            }
        }
    }

And then call above method from the action
    MyHelper.CascadeCommit(View.ObjectSpace, View.CurrentObject, true);

以上是关于csharp #xaf kaskadoweodwiezanie parent objectSpace #xpo的主要内容,如果未能解决你的问题,请参考以下文章

csharp #xaf #drawing

csharp #xaf #pictureedit #zooming

csharp #xaf #lisview #viewController

csharp FilteringCriterion #xaf

csharp CriteriaController #xaf

csharp filtrowanie po oddzialach #xaf