Пример #1
0
 public SectionValue SetSection(Guid sid)
 {
     if (sid == Guid.Empty || this.HasSection() == false)
     {
         return(null);
     }
     if (sid == Guid.Empty)
     {
         sid = this.Sections.FirstOrDefault().Sections.Id;
     }
     this.CurrentSection = this.Sections.SingleOrDefault(s => s.Sections.Id == sid);
     return(this.CurrentSection);
 }
Пример #2
0
        public void AddSection(SectionValue value)
        {
            if (value == null)
            {
                return;
            }

            if (this.Sections == null)
            {
                this.Sections = new List <SectionValue>();
            }
            this.Sections.Add(value);

            this.CurrentSection = value;
        }