public void RemoveContainer(ContainerInfo container) { // remove container from this section Common.DatabaseProvider.RemoveSectionContainerLink(this, container); // reset containers collection this._Containers = null; }
public abstract void RemoveSectionContainerLink(SectionInfo section, ContainerInfo container);
public abstract void UpdateContainerPortletLink(ContainerInfo container, PortletInfo portlet, int order);
public abstract int[] GetPortletsForContainer(ContainerInfo container);
public abstract int GetSectionContainerLinkPosition(SectionInfo section, ContainerInfo container);
public static void RemoveContainer(ContainerInfo container) { Collection.Remove(container); }
public abstract bool ContainerPortletLinked(ContainerInfo container, PortletInfo portlet);
public override bool ContainerPortletLinked(ContainerInfo container, PortletInfo portlet) { ContainerPortletLink link = ContainerPortletLink.GetByContainerIDAndPortletID( container.Identity, portlet.Identity ); try { // return if combination is found return link.ContainerID != 0 && link.PortletID != 0; } catch (Exception) { return false; } }
public override int GetContainerPortletLinkOrder(ContainerInfo container, PortletInfo portlet) { ContainerPortletLink link = ContainerPortletLink.GetByContainerIDAndPortletID( container.Identity, portlet.Identity ); return (link.ContainerID != 0 && link.PortletID != 0) ? link.SortOrder : -1; }
public override void AddSectionContainerLink(SectionInfo section, ContainerInfo container, int order, int position) { SectionContainerLink link = new SectionContainerLink( section.Identity, container.Identity, order, position ); try { // add combination link.CommitChanges(); } catch (Exception) { } }
public override void CommitContainerChanges(ContainerInfo container) { switch (container.State) { case State.Added : // insert Container.Insert((Container)container); break; case State.Changed : // commit changes Container.Update((Container)container); break; case State.Deleted : // remove Container.Delete((Container)container); break; } }
public override void AddContainerPortletLink(ContainerInfo container, PortletInfo portlet, int order) { ContainerPortletLink link = new ContainerPortletLink( container.Identity, portlet.Identity, order ); try { // add combination link.CommitChanges(); } catch (Exception) { } }
public override void UpdateSectionContainerLink(SectionInfo section, ContainerInfo container, int order, int position) { SectionContainerLink link = SectionContainerLink.GetBySectionIDAndContainerID( section.Identity, container.Identity ); link.SortOrder = order; link.Position = position; try { // update combination link.CommitChanges(); } catch (Exception) { } }
public void UpdateContainer(ContainerInfo container, int order, int position) { // update container to this section Common.DatabaseProvider.UpdateSectionContainerLink(this, container, order, position); }
public static void AddContainer(ContainerInfo container) { Collection.Add(container); }
public override int[] GetPortletsForContainer(ContainerInfo container) { // get portets for specific container List<ContainerPortletLink> links = ContainerPortletLink.GetByContainerID(container.Identity); List<int> list = new List<int>(links.Count); foreach (ContainerPortletLink link in links) list.Add(link.PortletID); // return array of portlet ids return list.ToArray(); }
public static ContainerInfo CreateNew() { ContainerInfo container = new ContainerInfo(); container.SetState(State.Added); return container; }
public override int GetSectionContainerLinkOrder(SectionInfo section, ContainerInfo container) { SectionContainerLink link = SectionContainerLink.GetBySectionIDAndContainerID( section.Identity, container.Identity ); return (link.SectionID != 0 && link.ContainerID != 0) ? link.SortOrder : -1; }
public abstract void CommitContainerChanges(ContainerInfo container);
public override int GetSectionContainerLinkPosition(SectionInfo section, ContainerInfo container) { SectionContainerLink link = SectionContainerLink.GetBySectionIDAndContainerID( section.Identity, container.Identity ); return (link.SectionID != 0 && link.ContainerID != 0) ? link.Position : Int32.MinValue; }
public abstract int GetContainerPortletLinkOrder(ContainerInfo container, PortletInfo portlet);
public override void RemoveContainerPortletLink(ContainerInfo container, PortletInfo portlet) { ContainerPortletLink link = ContainerPortletLink.GetByContainerIDAndPortletID( container.Identity, portlet.Identity ); try { // delete combination link.Delete(); link.CommitChanges(); } catch (Exception) { } }
public abstract int GetSectionContainerLinkOrder(SectionInfo section, ContainerInfo container);
public override void RemoveSectionContainerLink(SectionInfo section, ContainerInfo container) { SectionContainerLink link = SectionContainerLink.GetBySectionIDAndContainerID( section.Identity, container.Identity ); try { // delete combination link.Delete(); link.CommitChanges(); } catch (Exception) { } }
public abstract void RemoveContainerPortletLink(ContainerInfo container, PortletInfo portlet);
public override bool SectionContainerLinked(SectionInfo section, ContainerInfo container) { SectionContainerLink link = SectionContainerLink.GetBySectionIDAndContainerID( section.Identity, container.Identity ); try { // return if combination is found return link.SectionID != 0 && link.ContainerID != 0; } catch (Exception) { return false; } }
public abstract bool SectionContainerLinked(SectionInfo section, ContainerInfo container);
public override void UpdateContainerPortletLink(ContainerInfo container, PortletInfo portlet, int order) { ContainerPortletLink link = ContainerPortletLink.GetByContainerIDAndPortletID( container.Identity, portlet.Identity ); link.SortOrder = order; try { // update combination link.CommitChanges(); } catch (Exception) { } }
public abstract void UpdateSectionContainerLink(SectionInfo section, ContainerInfo container, int order, int position);
public void AddContainer(ContainerInfo container, int order, int position) { // add container to this section Common.DatabaseProvider.AddSectionContainerLink(this, container, order, position); // reset containers collection this._Containers = null; }