protected void Fetch(FeedData data) { this.FeedId = data.FeedId; this.Action = data.Action; this.Description = data.Description; this.SourceId = data.SourceId; this.SourceTypeId = data.SourceTypeId; this.CreatedBy = data.CreatedBy; this.CreatedByEmail = data.CreatedByUser.Email; this.CreatedByName = data.CreatedByUser.Name; this.CreatedDate = data.CreatedDate; }
private void Child_Fetch(FeedData parentData) { using (var dalManager = DataFactoryManager.GetManager()) { var dalFactory = dalManager.GetProvider<IFeedSourceMemberDataFactory>(); var data = dalFactory.Fetch(parentData); this.RaiseListChangedEvents = false; foreach (var item in data) { this.Add(Csla.DataPortal.FetchChild<FeedSource>(item)); } this.RaiseListChangedEvents = true; } }
private void Child_Fetch(FeedData data) { this.FeedId = data.FeedId; this.Action = data.Action; this.Description = data.Description; 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.Sources = new List<FeedSourceInfo>(); foreach (var source in data.Sources) { this.Sources.Add(Csla.DataPortal.FetchChild<FeedSourceInfo>(source)); } }
protected override void DataPortal_Insert() { using (var dalManager = DataFactoryManager.GetManager()) { var dalFactory = dalManager.GetProvider<IFeedDataFactory>(); var data = new FeedData(); using (this.BypassPropertyChecks) { this.CreatedBy = ((IBusinessIdentity)Csla.ApplicationContext.User.Identity).UserId; this.CreatedDate = DateTime.Now; this.Insert(data); data = dalFactory.Insert(data); this.FeedId = data.FeedId; } this.FieldManager.UpdateChildren(this); } }
protected void Update(FeedData data) { data.FeedId = this.FeedId; data.Action = this.Action; data.Description = this.Description; data.SourceId = this.SourceId; data.SourceTypeId = this.SourceTypeId; data.CreatedBy = this.CreatedBy; data.CreatedDate = this.CreatedDate; }
protected void Insert(FeedData data) { this.Update(data); }