Exemplo n.º 1
0
        protected override void DataPortal_Insert()
        {
            using (var dalManager = DataFactoryManager.GetManager())
            {
                var dalFactory = dalManager.GetProvider<ISprintDataFactory>();

                var data = new SprintData();

                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.SprintId = data.SprintId;
                }

                // this.FieldManager.UpdateChildren(data);
            }
        }
Exemplo n.º 2
0
        internal static Sprint FetchSprint(SprintData data)
        {
            var result = new Sprint();

            result.Fetch(data);
            result.MarkOld();

            return result;
        }
Exemplo n.º 3
0
 protected void Update(SprintData data)
 {
     data.SprintId = this.SprintId;
     data.CompletedDate = this.CompletedDate;
     data.Description = this.Description;
     data.IsActive = this.IsActive;
     data.IsArchived = this.IsArchived;
     data.IsCompleted = this.IsCompleted;
     data.Duration = this.Duration;
     data.EstimatedCompletedDate = this.EstimatedCompletedDate;
     data.EstimatedDuration = this.EstimatedDuration;
     data.Name = this.Name;
     data.ProjectId = this.ProjectId;
     data.CreatedBy = this.CreatedBy;
     data.CreatedDate = this.CreatedDate;
     data.ModifiedBy = this.ModifiedBy;
     data.ModifiedDate = this.ModifiedDate;
 }
Exemplo n.º 4
0
 protected void Insert(SprintData data)
 {
     this.Update(data);
 }
Exemplo n.º 5
0
 protected void Fetch(SprintData data)
 {
     this.SprintId = data.SprintId;
     this.CompletedDate = data.CompletedDate;
     this.Description = data.Description;
     this.IsActive = data.IsActive;
     this.IsArchived = data.IsArchived;
     this.IsCompleted = data.IsCompleted;
     this.Duration = data.Duration;
     this.EstimatedCompletedDate = data.EstimatedCompletedDate;
     this.EstimatedDuration = data.EstimatedDuration;
     this.Name = data.Name;
     this.ProjectId = data.ProjectId;
     this.ProjectName = data.Project.Name;
     this.CreatedBy = data.CreatedBy;
     this.CreatedByName = data.CreatedByUser.Name;
     this.CreatedDate = data.CreatedDate;
     this.ModifiedBy = data.ModifiedBy;
     this.ModifiedByName = data.ModifiedByUser.Name;
     this.ModifiedDate = data.ModifiedDate;
 }