protected override void DataPortal_Insert()
        {
            using (var dalManager = DataFactoryManager.GetManager())
            {
                var dalFactory = dalManager.GetProvider<IOrganizationUserMemberDataFactory>();

                var data = new OrganizationUserMemberData();

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

                // this.FieldManager.UpdateChildren(data);
            }
        }
        internal static OrganizationUser FetchOrganizationUser(OrganizationUserMemberData data)
        {
            var result = new OrganizationUser();

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

            return result;
        }
 private void Child_Fetch(OrganizationUserMemberData data)
 {
     this.OrganizationUserMemberId = data.OrganizationUserMemberId;
     this.OrganizationId = data.OrganizationId;
     this.OrganizationName = data.Organization.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;
 }
 protected void Update(OrganizationUserMemberData data)
 {
     data.OrganizationUserMemberId = this.OrganizationUserMemberId;
     data.OrganizationId = this.OrganizationId;
     data.RoleId = this.RoleId;
     data.UserId = this.UserId;
     data.CreatedBy = this.CreatedBy;
     data.CreatedDate = this.CreatedDate;
     data.ModifiedBy = this.ModifiedBy;
     data.ModifiedDate = this.ModifiedDate;
 }
 protected void Insert(OrganizationUserMemberData data)
 {
     this.Update(data);
 }