Beispiel #1
0
        virtual public void CancelUpdate()
        {
            IDataTransactionBasic dataTa;

            if (TryGet(out dataTa))
            {
                dataTa.CancelUpdate();
                State = DataTransactionState.Cancel;
                return;
            }
            DataTransactionHelper.CancelUpdate(PropertyDataPairList);
            State = DataTransactionState.Cancel;
        }
        public void CancelUpdate()
        {
            object value = CurrentData;

            if (DataTransactionHelper.IsDataTransactionObject(value))
            {
                DataTransactionHelper.CancelUpdate(value);
                if (value is IList)
                {
                    Restore(oldPropertyValue);
                }
                State = DataTransactionState.Cancel;
                return;
            }
            if (isUpdating)
            {
                Restore(oldPropertyValue);
                isUpdating = false;
                State      = DataTransactionState.Cancel;
            }
        }