Example #1
0
        public override void CheckIn()
        {
            if (IsDirty && !IsDeleted)
            {
                _EventFrameController.Update(_Connection, this);

                if (_EventFrames != null)
                {
                    foreach (AFEventFrame frame in _EventFrames.Where(x => x.IsNew || x.IsDeleted))
                    {
                        if (frame.IsNew)
                        {
                            _EventFrameController.CreateEventFrame(_Connection, WebID, frame);
                        }
                        else if (frame.IsDeleted)
                        {
                            frame.Delete();
                            frame.CheckIn();
                        }
                    }
                }

                if (_Attributes != null)
                {
                    foreach (AFAttribute attr in _Attributes.Where(x => x.IsDeleted))
                    {
                        AFAttribute.Delete(_Connection, attr.WebID);
                    }
                }

                ResetState();
            }
        }
Example #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();
        }
Example #3
0
        public void CheckIn()
        {
            if (IsDirty && !IsDeleted)
            {
                _AttrController.Update(_Connection, this);

                if (_Attributes != null)
                {
                    foreach (AFAttribute attr in _Attributes.Where(x => x.IsNew))
                    {
                        _AttrController.CreateChild(_Connection, WebID, attr);
                    }
                }
            }
        }