protected override void DataPortal_Insert() { using (var dalManager = DataFactoryManager.GetManager()) { var dalFactory = dalManager.GetProvider<ITimelineDataFactory>(); var data = new TimelineData(); using (this.BypassPropertyChecks) { this.ModifiedBy = ((IBusinessIdentity)Csla.ApplicationContext.User.Identity).UserId; this.ModifiedDate = DateTime.Now; this.CreatedBy = this.ModifiedBy; this.CreatedDate = this.ModifiedDate; this.Insert(data); data = dalFactory.Insert(data); this.TimelineId = data.TimelineId; } // this.FieldManager.UpdateChildren(data); } }
internal static Timeline FetchTimeline(TimelineData data) { var result = new Timeline(); result.Fetch(data); result.MarkOld(); return result; }
private void Child_Fetch(TimelineData data) { this.TimelineId = data.TimelineId; this.Body = data.Body; this.IsArchived = data.IsArchived; this.SourceId = data.SourceId; this.SourceName = data.Source.Name; this.SourceTypeId = data.SourceTypeId; this.CreatedBy = data.CreatedBy; this.CreatedByEmail = data.CreatedByUser.Email; this.CreatedByName = data.CreatedByUser.Name; this.CreatedDate = data.CreatedDate; this.ModifiedBy = data.ModifiedBy; this.ModifiedByEmail = data.ModifiedByUser.Email; this.ModifiedByName = data.ModifiedByUser.Name; this.ModifiedDate = data.ModifiedDate; }
protected void Update(TimelineData data) { data.TimelineId = this.TimelineId; data.Body = this.Body; data.IsArchived = this.IsArchived; data.SourceId = this.SourceId; data.SourceTypeId = this.SourceTypeId; data.CreatedBy = this.CreatedBy; data.CreatedDate = this.CreatedDate; data.ModifiedBy = this.ModifiedBy; data.ModifiedDate = this.ModifiedDate; }
protected void Insert(TimelineData data) { this.Update(data); }