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

                var data = new ProjectUserMemberData();

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

                // this.FieldManager.UpdateChildren(data);
            }
        }
Ejemplo n.º 2
0
        internal static ProjectUser FetchProjectUser(ProjectUserMemberData data)
        {
            var result = new ProjectUser();

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

            return result;
        }
Ejemplo n.º 3
0
 private void Child_Fetch(ProjectUserMemberData data)
 {
     this.ProjectUserMemberId = data.ProjectUserMemberId;
     this.ProjectId = data.ProjectId;
     this.ProjectName = data.Project.Name;
     this.RoleId = data.RoleId;
     this.UserId = data.UserId;
     this.UserName = data.User.Name;
     this.UserEmail = data.User.Email;
     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;
 }
Ejemplo n.º 4
0
 protected void Update(ProjectUserMemberData data)
 {
     data.ProjectUserMemberId = this.ProjectUserMemberId;
     data.ProjectId = this.ProjectId;
     data.RoleId = this.RoleId;
     data.UserId = this.UserId;
     data.CreatedBy = this.CreatedBy;
     data.CreatedDate = this.CreatedDate;
     data.ModifiedBy = this.ModifiedBy;
     data.ModifiedDate = this.ModifiedDate;
 }
Ejemplo n.º 5
0
 protected void Insert(ProjectUserMemberData data)
 {
     this.Update(data);
 }