Esempio n. 1
0
 public void UnlinkSection(int sectionId)
 {
     try
     {
         int index = AlbumsInSections.ToList().FindIndex(o => o.SectionId == sectionId);
         AlbumsInSections.RemoveAt(index);
     }
     catch { }
 }
Esempio n. 2
0
        public void LinkSection(int sectionId)
        {
            try
            {
                int index = AlbumsInSections.ToList().FindIndex(o => o.SectionId == sectionId);

                if (index < 0)
                {
                    AlbumsInSections.Add(new AlbumsInSections {
                        SectionId = sectionId
                    });
                }
            }
            catch { }
        }