Пример #1
0
        protected override void DataPortal_Insert()
        {
            using (var dalManager = DataFactoryManager.GetManager())
            {
                var dalFactory = dalManager.GetProvider<IWeekDataFactory>();

                var data = new WeekData();

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

                // this.FieldManager.UpdateChildren(data);
            }
        }
Пример #2
0
        internal static Week FetchWeek(WeekData data)
        {
            var result = new Week();

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

            return result;
        }
Пример #3
0
 private void Child_Fetch(WeekData data)
 {
     this.WeekId = data.WeekId;
     this.EndDate = data.EndDate;
     this.Period = data.Period;
     this.StartDate = data.StartDate;
     this.Year = data.Year;
     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;
 }
Пример #4
0
 protected void Update(WeekData data)
 {
     data.WeekId = this.WeekId;
     data.EndDate = this.EndDate;
     data.Period = this.Period;
     data.StartDate = this.StartDate;
     data.Year = this.Year;
     data.CreatedBy = this.CreatedBy;
     data.CreatedDate = this.CreatedDate;
     data.ModifiedBy = this.ModifiedBy;
     data.ModifiedDate = this.ModifiedDate;
 }
Пример #5
0
 protected void Insert(WeekData data)
 {
     this.Update(data);
 }