Exemplo n.º 1
0
        public void ProcessRequest(HttpContext context)
        {
            int    titleId;
            String titleIdString = context.Request.QueryString["id"] as String;
            String response      = String.Empty;
            String filename      = "BHL";

            if (Int32.TryParse(titleIdString, out titleId))
            {
                try
                {
                    response = new MOBOT.BHL.Server.BHLProvider().TitleEndNoteGetCitationStringForTitleID(titleId,
                                                                                                          ConfigurationManager.AppSettings["ItemPageUrl"].ToString());
                    filename += titleId.ToString();
                }
                catch
                {
                    response = "Error retrieving EndNote citations for this title.";
                }
            }

            context.Response.ContentType = "application/x-endnote-refer";
            context.Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ".enw");
            context.Response.Write(response);
        }
Exemplo n.º 2
0
        public CustomGenericList <Name> NameSearch(string name)
        {
            if (name == String.Empty)
            {
                throw new SoapException("Please supply a name for which to search.", SoapException.ClientFaultCode);
            }

            try
            {
                CustomGenericList <Name> names = new CustomGenericList <Name>();

                // Use the existing name search functionality
                MOBOT.BHL.Server.BHLProvider provider = new MOBOT.BHL.Server.BHLProvider();
                CustomGenericList <MOBOT.BHL.DataObjects.PageName> pageNames = provider.PageNameSelectByNameLike(name);
                foreach (MOBOT.BHL.DataObjects.PageName pageName in pageNames)
                {
                    // Add names to the list to be returned
                    Name nameResult = new Name();
                    nameResult.NameConfirmed = pageName.NameConfirmed;
                    nameResult.NameBankID    = (int)pageName.NameBankID;
                    names.Add(nameResult);
                }

                return(names);
            }
            catch (Exception ex)
            {
                throw new SoapException(ex.Message, SoapException.ServerFaultCode);
            }
        }
Exemplo n.º 3
0
        public void ProcessRequest(HttpContext context)
        {
            int titleId;
            String titleIdString = context.Request.QueryString["id"] as String;
            String response = String.Empty;
            String filename = "BHL";

            if (Int32.TryParse(titleIdString, out titleId))
            {
                try
                {
                    response = new MOBOT.BHL.Server.BHLProvider().TitleEndNoteGetCitationStringForTitleID(titleId,
                        ConfigurationManager.AppSettings["ItemPageUrl"].ToString());
                    filename += titleId.ToString();
                }
                catch
                {
                    response = "Error retrieving EndNote citations for this title.";
                }
            }

            context.Response.ContentType = "application/x-endnote-refer";
            context.Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ".enw");
            context.Response.Write(response);
        }
Exemplo n.º 4
0
        public void ProcessRequest(HttpContext context)
        {
            int    titleId;
            String titleIdString = context.Request.QueryString["id"] as String;
            String response      = String.Empty;
            String filename      = "BHL";

            if (Int32.TryParse(titleIdString, out titleId))
            {
                try
                {
                    response  = new MOBOT.BHL.Server.BHLProvider().TitleBibTeXGetCitationStringForTitleID(titleId);
                    filename += titleId.ToString();
                }
                catch
                {
                    response = "Error retrieving BibTex citations for this title.";
                }
            }

            context.Response.ContentType = "application/x-bibtex";
            context.Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ".bib");
            context.Response.Write(response);
        }
Exemplo n.º 5
0
        public void ProcessRequest(HttpContext context)
        {
            int titleId;
            String titleIdString = context.Request.QueryString["id"] as String;
            String response = String.Empty;
            String filename = "BHL";

            if (Int32.TryParse(titleIdString, out titleId))
            {
                try
                {
                    response = new MOBOT.BHL.Server.BHLProvider().TitleBibTeXGetCitationStringForTitleID(titleId);
                    filename += titleId.ToString();
                }
                catch
                {
                    response = "Error retrieving BibTex citations for this title.";
                }
            }

            context.Response.ContentType = "application/x-bibtex";
            context.Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ".bib");
            context.Response.Write(response);
        }
Exemplo n.º 6
0
        public CustomGenericList<Name> NameSearch(string name)
        {
            if (name == String.Empty)
            {
                throw new SoapException("Please supply a name for which to search.", SoapException.ClientFaultCode);
            }

            try
            {
                CustomGenericList<Name> names = new CustomGenericList<Name>();

                // Use the existing name search functionality
                MOBOT.BHL.Server.BHLProvider provider = new MOBOT.BHL.Server.BHLProvider();
                CustomGenericList<MOBOT.BHL.DataObjects.PageName> pageNames = provider.PageNameSelectByNameLike(name);
                foreach (MOBOT.BHL.DataObjects.PageName pageName in pageNames)
                {
                    // Add names to the list to be returned
                    Name nameResult = new Name();
                    nameResult.NameConfirmed = pageName.NameConfirmed;
                    nameResult.NameBankID = (int)pageName.NameBankID;
                    names.Add(nameResult);
                }

                return names;
            }
            catch (Exception ex)
            {
                throw new SoapException(ex.Message, SoapException.ServerFaultCode);
            }
        }