コード例 #1
0
        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);
                        }
                    }
                }
            }
        }
コード例 #2
0
ファイル: SLGroup.cs プロジェクト: rahmatsyaparudin/KP_Raport
        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;
        }
コード例 #3
0
ファイル: SLGroup.cs プロジェクト: nunezger/berkeleyshoe
        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);
        }
コード例 #4
0
ファイル: SLGroupLevel.cs プロジェクト: nunezger/berkeleyshoe
        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);
                        }
                    }
                }
            }
        }