internal void FromGroupLevel(GroupLevel gl) { this.SetAllNull(); if (gl.UniqueName != null) this.UniqueName = gl.UniqueName.Value; if (gl.Caption != null) this.Caption = gl.Caption.Value; if (gl.User != null) this.User = gl.User.Value; if (gl.CustomRollUp != null) this.CustomRollUp = gl.CustomRollUp.Value; if (gl.Groups != null) { SLGroup g; using (OpenXmlReader oxr = OpenXmlReader.Create(gl.Groups)) { while (oxr.Read()) { if (oxr.ElementType == typeof(Group)) { g = new SLGroup(); g.FromGroup((Group)oxr.LoadCurrentElement()); this.Groups.Add(g); } } } } }
internal SLGroup Clone() { SLGroup g = new SLGroup(); g.Name = this.Name; g.UniqueName = this.UniqueName; g.Caption = this.Caption; g.UniqueParent = this.UniqueParent; g.Id = this.Id; g.GroupMembers = new List<SLGroupMember>(); foreach (SLGroupMember gm in this.GroupMembers) { g.GroupMembers.Add(gm.Clone()); } return g; }
internal SLGroup Clone() { SLGroup g = new SLGroup(); g.Name = this.Name; g.UniqueName = this.UniqueName; g.Caption = this.Caption; g.UniqueParent = this.UniqueParent; g.Id = this.Id; g.GroupMembers = new List <SLGroupMember>(); foreach (SLGroupMember gm in this.GroupMembers) { g.GroupMembers.Add(gm.Clone()); } return(g); }
internal void FromGroupLevel(GroupLevel gl) { this.SetAllNull(); if (gl.UniqueName != null) { this.UniqueName = gl.UniqueName.Value; } if (gl.Caption != null) { this.Caption = gl.Caption.Value; } if (gl.User != null) { this.User = gl.User.Value; } if (gl.CustomRollUp != null) { this.CustomRollUp = gl.CustomRollUp.Value; } if (gl.Groups != null) { SLGroup g; using (OpenXmlReader oxr = OpenXmlReader.Create(gl.Groups)) { while (oxr.Read()) { if (oxr.ElementType == typeof(Group)) { g = new SLGroup(); g.FromGroup((Group)oxr.LoadCurrentElement()); this.Groups.Add(g); } } } } }