示例#1
0
        public int ImportReference(ReferenceImport r)
        {
            var retval = ReturnParam("NewRefID");
            StoredProcUpdate("spReferenceImport",
                _P("vchrRefCode", r.RefCode),
                _P("vchrAuthor", r.Author),
                _P("vchrTitle", r.Title),
                _P("vchrBookTitle", r.BookTitle),
                _P("vchrEditor", r.Editor),
                _P("vchrRefType", r.RefType),
                _P("vchrYearOfPub", r.YearOfPub),
                _P("vchrActualDate", r.ActualDate),
                _P("vchrJournalAbbrevName", r.JournalAbbrevName),
                _P("vchrJournalFullName", r.JournalFullName),
                _P("vchrPartNo", r.PartNo),
                _P("vchrSeries", r.Series),
                _P("vchrPublisher", r.Publisher),
                _P("vchrPlace", r.Place),
                _P("vchrVolume", r.Volume),
                _P("vchrPages", r.Pages),
                _P("vchrTotalPages", r.TotalPages),
                _P("vchrPossess", r.Possess),
                _P("vchrSource", r.Source),
                _P("vchrEdition", r.Edition),
                _P("vchrISBN", r.ISBN),
                _P("vchrISSN", r.ISSN),
                _P("txtAbstract", r.Abstract),
                _P("txtDateQual", r.DateQual),
                _P("intStartPage", r.StartPage),
                _P("intEndPage", r.EndPage),
                retval
            );

            return (int)retval.Value;
        }
示例#2
0
        protected override void ImportRowImpl(int rowId, System.Data.Common.DbConnection connection)
        {
            var service = new ImportService(User);

            string strJAbbrev = Get("References.Journal Abbreviated Name");
            string strJName = Get("References.Journal name");
            string strBookTitle = Get("References.Book title");
            string strPublisher = Get("References.Book Publisher");
            string strPlacePublished = Get("References.Book Place of publication");

            string strRefType = null;

            if (!string.IsNullOrWhiteSpace(strJAbbrev) || !string.IsNullOrWhiteSpace(strJName)) {
                if (!string.IsNullOrWhiteSpace(strBookTitle)) {
                    strRefType = "JS";
                } else {
                    strRefType = "J";
                }
            } else if (!string.IsNullOrWhiteSpace(strPublisher) || !string.IsNullOrWhiteSpace(strPlacePublished)) {
                if (!string.IsNullOrWhiteSpace(strBookTitle)) {
                    strRefType = "BS";
                } else {
                    strRefType = "B";
                }

            } else {
                strRefType = "M";
            }

            int? startPage;
            int? endPage;

            ParserStartEndPages(Get("References.Total pages"), out startPage, out endPage);

            var r = new ReferenceImport {
                RefCode = Get("References.ReferenceCode"),
                Author = Get("References.Author(s)"),
                Title = Get("References.Article title"),
                BookTitle = strBookTitle,
                Editor = Get("References.Editor"),
                RefType = strRefType,
                YearOfPub = Get("References.Year of publication"),
                ActualDate = Get("References.Actual publication date"),
                JournalAbbrevName = strJAbbrev,
                JournalFullName = strJName,
                PartNo = Get("References.Part Number"),
                Series = Get("References.Series Number"),
                Publisher = strPublisher,
                Place = strPlacePublished,
                Volume = Get("References.Volume"),
                Pages = Get("References.Pages"),
                TotalPages = Get("References.Total pages"),
                Possess = Get("References.Possession"),
                Source = Get("References.Source"),
                Edition = Get("References.Edition"),
                ISBN = Get("References.ISBN"),
                ISSN = Get("References.ISSN"),
                Abstract = Get("References.Qualification"),
                DateQual = Get("References.Qualification-date"),
                StartPage = startPage,
                EndPage = endPage
            };

            r.RefID = Service.ImportReference(r);
        }
        protected override void ImportRowImpl(int rowId, System.Data.Common.DbConnection connection)
        {
            var service = new ImportService(User);

            string strJAbbrev        = Get("References.Journal Abbreviated Name");
            string strJName          = Get("References.Journal name");
            string strBookTitle      = Get("References.Book title");
            string strPublisher      = Get("References.Book Publisher");
            string strPlacePublished = Get("References.Book Place of publication");

            string strRefType = null;

            if (!string.IsNullOrWhiteSpace(strJAbbrev) || !string.IsNullOrWhiteSpace(strJName))
            {
                if (!string.IsNullOrWhiteSpace(strBookTitle))
                {
                    strRefType = "JS";
                }
                else
                {
                    strRefType = "J";
                }
            }
            else if (!string.IsNullOrWhiteSpace(strPublisher) || !string.IsNullOrWhiteSpace(strPlacePublished))
            {
                if (!string.IsNullOrWhiteSpace(strBookTitle))
                {
                    strRefType = "BS";
                }
                else
                {
                    strRefType = "B";
                }
            }
            else
            {
                strRefType = "M";
            }

            int?startPage;
            int?endPage;

            ParserStartEndPages(Get("References.Total pages"), out startPage, out endPage);


            var r = new ReferenceImport {
                RefCode           = Get("References.ReferenceCode"),
                Author            = Get("References.Author(s)"),
                Title             = Get("References.Article title"),
                BookTitle         = strBookTitle,
                Editor            = Get("References.Editor"),
                RefType           = strRefType,
                YearOfPub         = Get("References.Year of publication"),
                ActualDate        = Get("References.Actual publication date"),
                JournalAbbrevName = strJAbbrev,
                JournalFullName   = strJName,
                PartNo            = Get("References.Part Number"),
                Series            = Get("References.Series Number"),
                Publisher         = strPublisher,
                Place             = strPlacePublished,
                Volume            = Get("References.Volume"),
                Pages             = Get("References.Pages"),
                TotalPages        = Get("References.Total pages"),
                Possess           = Get("References.Possession"),
                Source            = Get("References.Source"),
                Edition           = Get("References.Edition"),
                ISBN      = Get("References.ISBN"),
                ISSN      = Get("References.ISSN"),
                Abstract  = Get("References.Qualification"),
                DateQual  = Get("References.Qualification-date"),
                StartPage = startPage,
                EndPage   = endPage
            };

            r.RefID = Service.ImportReference(r);
        }