Пример #1
0
        public override void CheckIn()
        {
            if (IsDirty && !IsDeleted)
            {
                _DBController.Update(_Connection, this);

                if (_Elements != null)
                {
                    foreach (AFElement ele in _Elements.Where(x => x.IsNew))
                    {
                        _DBController.CreateElement(_Connection, WebID, ele);
                    }
                }

                if (_EventFrames != null)
                {
                    foreach (AFEventFrame frame in _EventFrames.Where(x => x.IsNew))
                    {
                        _DBController.CreateEventFrame(_Connection, WebID, frame);
                    }
                }

                ResetState();
            }
        }
Пример #2
0
        public void CheckIn()
        {
            if (_IsDirty)
            {
                _ElementController.Update(_Connection, this);

                if (_Elements != null)
                {
                    foreach (AFElement ele in _Elements.Where(x => x.IsNew))
                    {
                        _ElementController.CreateChildElement(_Connection, _WebID, ele);
                    }
                }

                if (_Attributes != null)
                {
                    foreach (AFAttribute attr in _Attributes.Where(x => x.IsNew))
                    {
                        _ElementController.CreateAttribute(_Connection, _WebID, attr);
                    }
                }
            }

            ResetState();
        }
Пример #3
0
        public void CheckIn()
        {
            _DBController.Update(_Connection, this);

            if (_IsDirty)
            {
                _DBController.Update(_Connection, this);

                if (_Elements != null)
                {
                    foreach (AFElement ele in _Elements.Where(x => x.IsNew))
                    {
                        _DBController.CreateElement(_Connection, _WebID, ele);
                    }
                }

                if (_EventFrames != null)
                {
                    foreach (AFEventFrame frame in _EventFrames.Where(x => x.IsNew))
                    {
                        _DBController.CreateEventFrame(_Connection, _WebID, frame);
                    }
                }
            }
        }