コード例 #1
0
        public List <Chronozoom.Entities.Reference> GetBibliography(string exhibitID)
        {
            try
            {
                Guid guid;
                if (!Guid.TryParse(exhibitID, out guid))
                {
                    return(null);
                }

                var references        = new List <Chronozoom.Entities.Reference>();
                var exhibitReferences = DataEnvironmentAccess.AnInstance.GetIBibliographyView(guid);
                foreach (var reference in exhibitReferences)
                {
                    Chronozoom.Entities.Reference sr = new Chronozoom.Entities.Reference(reference.ID,
                                                                                         reference.Title,
                                                                                         reference.Authors,
                                                                                         reference.BookChapters,
                                                                                         reference.CitationType,
                                                                                         reference.PageNumbers,
                                                                                         reference.Publication,
                                                                                         reference.PublicationDates,
                                                                                         reference.Source
                                                                                         );
                    references.Add(sr);
                }

                return(references);
            }
            catch
            {
                //error
                return(null);
            }
        }
コード例 #2
0
ファイル: Chronozoom.svc.cs プロジェクト: fashaikh/ChronoZoom
        public List<Chronozoom.Entities.Reference> GetBibliography(string exhibitID)
        {
            try
            {
                Guid guid;
                if (!Guid.TryParse(exhibitID, out guid))
                {
                    return null;
                }

                var references = new List<Chronozoom.Entities.Reference>();
                var exhibitReferences = DataEnvironmentAccess.AnInstance.GetIBibliographyView(guid);
                foreach (var reference in exhibitReferences)
                {
                    Chronozoom.Entities.Reference sr = new Chronozoom.Entities.Reference(reference.ID,
                        reference.Title,
                        reference.Authors,
                        reference.BookChapters,
                        reference.CitationType,
                        reference.PageNumbers,
                        reference.Publication,
                        reference.PublicationDates,
                        reference.Source
                        );
                    references.Add(sr);
                }

                return references;
            }
            catch
            {
                //error
                return null;
            }
        }