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

                var data = new ProjectData();

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

                // this.FieldManager.UpdateChildren(data);
            }
        }
예제 #2
0
        internal static Project FetchProject(ProjectData data)
        {
            var result = new Project();

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

            return result;
        }
예제 #3
0
 private void Child_Fetch(ProjectData data)
 {
     this.ProjectId = data.ProjectId;
     this.Description = data.Description;
     this.IsActive = data.IsActive;
     this.IsArchived = data.IsArchived;
     this.Name = data.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;
 }
예제 #4
0
 protected void Update(ProjectData data)
 {
     data.ProjectId = this.ProjectId;
     data.Description = this.Description;
     data.IsActive = this.IsActive;
     data.IsArchived = this.IsArchived;
     data.Name = this.Name;
     data.CreatedBy = this.CreatedBy;
     data.CreatedDate = this.CreatedDate;
     data.ModifiedBy = this.ModifiedBy;
     data.ModifiedDate = this.ModifiedDate;
 }
예제 #5
0
 protected void Insert(ProjectData data)
 {
     this.Update(data);
 }