Beispiel #1
0
 protected override void SetCollection(RsReportCollection aCollection)
 {
     base.SetCollection(aCollection);
     foreach (object iItem in _SubItems)
     {
         ((CReportItem)iItem).SetCollection();
     }
 }
        public void AddCollection(RsReportCollection aCollection)
        {
            RsCollectionConfig lConfig = new RsCollectionConfig();
                        lConfig.Path = aCollection.FileName;
                        lConfig.Name = aCollection.CollectionName;
                        lConfig.Type = RsCollectionType.Custom;

                        ProfileManager.Profile.Collections.Add(lConfig);
                        ProfileManager.SaveProfile();
        }
Beispiel #3
0
        protected virtual void SetCollection(RsReportCollection aCollection)
        {
            RsReportCollection lLastCollection = _Collection;

            _Collection = aCollection;
            edit();
            if (lLastCollection != null)
            {
                lLastCollection.setModified(true);
            }
        }
Beispiel #4
0
 public void RemoveCollection(RsReportCollection aCollection)
 {
     foreach (RsCollectionConfig iConfig in ProfileManager.Profile.Collections)
     {
         if (aCollection.FileName.ToUpper().Equals(iConfig.Path.ToUpper()))
         {
             ProfileManager.Profile.Collections.Remove(iConfig);
             break;
         }
     }
 }
Beispiel #5
0
        public void AddCollection(RsReportCollection aCollection)
        {
            RsCollectionConfig lConfig = new RsCollectionConfig();

            lConfig.Path = aCollection.FileName;
            lConfig.Name = aCollection.CollectionName;
            lConfig.Type = RsCollectionType.Custom;

            ProfileManager.Profile.Collections.Add(lConfig);
            ProfileManager.SaveProfile();
        }
        public RsReportCollection GetCollection(string aCollectionName)
        {
            foreach (RsCollectionConfig iConfig in ProfileManager.Profile.Collections) {
                                if (iConfig.Name.ToUpper().Equals(aCollectionName.ToUpper())) {
                                        RsReportCollection lResult = new RsReportCollection();
                                        lResult.LoadFromXML(iConfig.Path);
                                        return lResult;
                                    }
                            }

                        return null;
        }
Beispiel #7
0
 public void BuildFromXML(XmlNode aSource)
 {
     this.ItemName = aSource.Attributes["name"].Value;
     for (int i = 0; i < aSource.ChildNodes.Count; i++)
     {
         CReportItem lNewItem = RsReportCollection.CreateItemFromXMLNode(aSource.ChildNodes[i]);
         lNewItem.Parent = this;
         if (lNewItem is CReportFolder)
         {
             ((CReportFolder)lNewItem).BuildFromXML(aSource.ChildNodes[i]);
         }
     }
 }
Beispiel #8
0
        public RsReportCollection GetCollection(string aCollectionName)
        {
            foreach (RsCollectionConfig iConfig in ProfileManager.Profile.Collections)
            {
                if (iConfig.Name.ToUpper().Equals(aCollectionName.ToUpper()))
                {
                    RsReportCollection lResult = new RsReportCollection();
                    lResult.LoadFromXML(iConfig.Path);
                    return(lResult);
                }
            }

            return(null);
        }
        public RsReportCollection CreateCollection(string aCollectionName, string aFile)
        {
            // TODO Create a method to handle more than one collection with the same name

                        RsReportCollection lResult;

                        RsReportCollection lCollection = GetCollection(aCollectionName);
                        if (lCollection != null)
                                throw new Exception("Collection named \"" + aCollectionName + "\" already linked.");

                            else {
                                lResult = new RsReportCollection();
                                lResult.CollectionName = aCollectionName;
                                lResult.SaveToXML(aFile);
                                AddCollection(lResult);
                            }

                        return lResult;
        }
Beispiel #10
0
        public RsReportCollection CreateCollection(string aCollectionName, string aFile)
        {
            // TODO Create a method to handle more than one collection with the same name

            RsReportCollection lResult;

            RsReportCollection lCollection = GetCollection(aCollectionName);

            if (lCollection != null)
            {
                throw new Exception("Collection named \"" + aCollectionName + "\" already linked.");
            }

            else
            {
                lResult = new RsReportCollection();
                lResult.CollectionName = aCollectionName;
                lResult.SaveToXML(aFile);
                AddCollection(lResult);
            }

            return(lResult);
        }
Beispiel #11
0
 protected override void SetCollection(RsReportCollection aCollection)
 {
     base.SetCollection(aCollection);
                 foreach (object iItem in _SubItems)
                         ((CReportItem)iItem).SetCollection();
 }
Beispiel #12
0
 protected virtual void SetCollection(RsReportCollection aCollection)
 {
     RsReportCollection lLastCollection = _Collection;
                 _Collection = aCollection;
                 edit();
                 if (lLastCollection != null)
                         lLastCollection.setModified(true);
 }
 public void RemoveCollection(RsReportCollection aCollection)
 {
     foreach (RsCollectionConfig iConfig in ProfileManager.Profile.Collections) {
                         if (aCollection.FileName.ToUpper().Equals(iConfig.Path.ToUpper())) {
                                 ProfileManager.Profile.Collections.Remove(iConfig);
                                 break;
                             }
                     }
 }