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); } } } }
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(); } }
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(); } }