Example #1
0
        protected override void DataPortal_Insert()
        {
            using (var dalManager = DataFactoryManager.GetManager())
            {
                var dalFactory = dalManager.GetProvider<IHourDataFactory>();

                var data = new HourData();

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

                // this.FieldManager.UpdateChildren(data);
            }
        }
Example #2
0
        internal static Hour FetchHour(HourData data)
        {
            var result = new Hour();

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

            return result;
        }
Example #3
0
 private void Child_Fetch(HourData data)
 {
     this.HourId = data.HourId;
     this.Date = data.Date;
     this.Duration = data.Duration;
     this.IsArchived = data.IsArchived;
     this.Notes = data.Notes;
     this.ProjectId = data.ProjectId;
     this.ProjectName = data.Project.Name;
     this.SprintId = data.SprintId;
     this.SprintName = data.Sprint.Name;
     this.StoryId = data.StoryId;
     this.UserId = data.UserId;
     this.UserName = data.User.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;
 }
Example #4
0
 protected void Update(HourData data)
 {
     data.HourId = this.HourId;
     data.Date = this.Date;
     data.Duration = this.Duration;
     data.IsArchived = this.IsArchived;
     data.Notes = this.Notes;
     data.StoryId = this.StoryId;
     data.UserId = this.UserId;
     data.CreatedBy = this.CreatedBy;
     data.CreatedDate = this.CreatedDate;
     data.ModifiedBy = this.ModifiedBy;
     data.ModifiedDate = this.ModifiedDate;
 }
Example #5
0
 protected void Insert(HourData data)
 {
     this.Update(data);
 }