当前位置: 首页>>代码示例>>C#>>正文


C# LibraryChannel.SearchBiblio方法代码示例

本文整理汇总了C#中LibraryChannel.SearchBiblio方法的典型用法代码示例。如果您正苦于以下问题:C# LibraryChannel.SearchBiblio方法的具体用法?C# LibraryChannel.SearchBiblio怎么用?C# LibraryChannel.SearchBiblio使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LibraryChannel的用法示例。


在下文中一共展示了LibraryChannel.SearchBiblio方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetBatchNoTable

        // 获得批次号表
        // parameters:
        //      strPubType  出版物类型。为 图书/连续出版物/(空) 之一
        internal static void GetBatchNoTable(GetKeyCountListEventArgs e,
            IWin32Window owner,
            string strPubType,  // 出版物类型
            string strType,
            Stop stop,
            LibraryChannel Channel)
        {
            string strError = "";
            long lRet = 0;


            if (e.KeyCounts == null)
                e.KeyCounts = new List<KeyCount>();

            string strName = "";
            if (strType == "order")
                strName = "订购";
            else if (strType == "item")
                strName = "册";
            else if (strType == "biblio")
                strName = "编目";
            else
                throw new Exception("未知的strType '" + strType + "' 值");

            // EnableControls(false);
            stop.OnStop += new StopEventHandler(Channel.DoStop);
            stop.Initial("正在列出全部" + strName + "批次号 ...");
            stop.BeginLoop();

            try
            {
                int nPerMax = 2000; // 一次检索命中的最大条数限制
                string strLang = "zh";

                string strDbName = "<all>";
                if (strPubType == "图书")
                    strDbName = "<all book>";
                else if (strPubType == "连续出版物")
                    strDbName = "<all series>";
                else
                    strDbName = "<all>";

                if (strType == "order")
                {
                    lRet = Channel.SearchOrder(
                        stop,
                        strDbName,  // "<all>",
                        "", // strBatchNo
                        nPerMax,   // -1,
                        "批次号",
                        "left",
                        strLang,
                        "batchno",   // strResultSetName
                        "desc",
                        "keycount", // strOutputStyle
                        out strError);
                }
                else if (strType == "biblio")
                {
                    string strQueryXml = "";

                    lRet = Channel.SearchBiblio(
                        stop,
                        strDbName,  // "<all>",    // 尽管可以用 this.comboBox_inputBiblioDbName.Text, 以便获得和少数书目库相关的批次号实例,但是容易造成误会:因为数据库名列表刷新后,这里却不会刷新?
                        "", // strBatchNo,
                        nPerMax,   // -1,    // nPerMax
                        "batchno",
                        "left",
                        strLang,
                        "batchno",   // strResultSetName
                        "desc",
                        "keycount", // strOutputStyle
                        "",
                        out strQueryXml,
                        out strError);
                }
                else if (strType == "item")
                {

                    lRet = Channel.SearchItem(
                        stop,
                        strDbName,   // "<all>",
                        "", // strBatchNo
                        nPerMax,  // -1,
                        "批次号",
                        "left",
                        strLang,
                        "batchno",   // strResultSetName
                        "desc",
                        "keycount", // strOutputStyle
                        out strError);
                }
                else
                {
                    Debug.Assert(false, "");
                }

//.........这里部分代码省略.........
开发者ID:renyh1013,项目名称:dp2,代码行数:101,代码来源:Global.cs

示例2: DoMutilineSearch


//.........这里部分代码省略.........
                            ref bDontAsk);
                        if (bDontAsk == true)
                        {
                            this.MainForm.AppInfo.SetBoolean(
                                "dp2_search_muline_query",
                                "matchstyle_middle_dontask",
                                bDontAsk);
                        }
                    }

                    DateTime start_time = DateTime.Now;

                    stop.SetProgressRange(0, this.textBox_mutiline_queryContent.Lines.Length);

                    for (int j = 0; j < this.textBox_mutiline_queryContent.Lines.Length; j++)
                    {
                        if (stop != null)
                        {
                            if (stop.State != 0)
                            {
                                strError = "用户中断";
                                goto ERROR1;
                            }
                        }

                        string strLine = this.textBox_mutiline_queryContent.Lines[j].Trim();

                        stop.SetProgressValue(j);

                        if (String.IsNullOrEmpty(strLine) == true)
                            continue;

                        string strQueryXml = "";
                        long lRet = Channel.SearchBiblio(stop,
                            strDbName,
                            strLine,
                            this.SearchMaxCount,    // 1000,
                            strFromStyle,
                            strMatchStyle,
                            this.Lang,
                            null,   // strResultSetName
                            "",    // strSearchStyle
                            "", // strOutputStyle
                            "",
                            out strQueryXml,
                            out strError);
                        if (lRet == -1)
                        {
                            this.textBox_resultInfo.Text += "检索词 '" + strLine + "' 检索时发生错误:" + strError + "\r\n";
                            continue;
                        }

                        lHitCount = lRet;

                        nLineCount++;

                        lTotalHitCount += lHitCount;
                        // this.textBox_resultInfo.Text += "检索词 '" + strLine + "' 命中 " + lHitCount.ToString() + " 条记录\r\n";
                        if (lHitCount == 0)
                            nothited_lines.Add(strLine);
                        else
                            hited_lines.Add(strLine + "\t" + lHitCount.ToString());

                        if (lHitCount == 0)
                            continue;
开发者ID:renyh1013,项目名称:dp2,代码行数:66,代码来源:dp2SearchForm.cs

示例3: SearchLineDp2library


//.........这里部分代码省略.........
                        // 为了在检索词为空的时候,检索出全部的记录
                        strMatchStyle = "left";
                    }
                }
                else
                {
                    if (strMatchStyle == "null")
                    {
                        strError = "检索空值的时候,请保持检索词为空";
                        goto ERROR1;
                    }
                }

                ServerInfo server_info = null;

                //if (line != null)
                //    line.BiblioSummary = "正在获取服务器 " + account.ServerName + " 的配置信息 ...";
                this.ShowMessage("正在获取服务器 " + account.ServerName + " 的配置信息 ...", 
                    "progress", false);

                // 准备服务器信息
                nRet = _base.GetServerInfo(
                    _channel,
                    account,
                    out server_info,
                    out strError);
                if (nRet == -1)
                    goto ERROR1;    // 可以不报错 ?

                this.ShowMessage("正在针对 " + account.ServerName + " \r\n检索 " + strQueryWord + " ...",
                    "progress", false);

                string strQueryXml = "";
                long lRet = _channel.SearchBiblio(Progress,
                    server_info == null ? "<全部>" : server_info.GetBiblioDbNames(),    // "<全部>",
                    strQueryWord,   // this.textBox_queryWord.Text,
                    1000,
                    strFromStyle,
                    strMatchStyle,
                    this.Lang,
                    null,   // strResultSetName
                    "",    // strSearchStyle
                    "", // strOutputStyle
                    out strQueryXml,
                    out strError);
                if (lRet == -1)
                {
                    strError = "针对服务器 '" + account.ServerName + "' 检索出错: " + strError;
                    goto ERROR1;
                }
                if (lRet == 0)
                {
                    strError = "没有命中";
                    return 0;
                }

                // 装入浏览格式
                long lHitCount = lRet;

                long lStart = 0;
                long lCount = lHitCount;
                DigitalPlatform.CirculationClient.localhost.Record[] searchresults = null;

                string strStyle = "id";

                List<string> biblio_recpaths = new List<string>();
开发者ID:paopaofeng,项目名称:dp2,代码行数:67,代码来源:EntityRegisterWizard.cs

示例4: DoSimpleSearch


//.........这里部分代码省略.........
                    if (String.IsNullOrEmpty(strFromStyle) == true)
                    {
                        strFromStyle = "<all>";
                    }

                    // 注:"null"只能在前端短暂存在,而内核是不认这个所谓的matchstyle的
                    string strMatchStyle = GetMatchStyle(this.comboBox_simple_matchStyle.Text);

                    if (this.textBox_simple_queryWord.Text == "")
                    {
                        if (strMatchStyle == "null")
                        {
                            this.textBox_simple_queryWord.Text = "";

                            // 专门检索空值
                            strMatchStyle = "exact";
                        }
                        else
                        {
                            // 为了在检索词为空的时候,检索出全部的记录
                            strMatchStyle = "left";
                        }
                    }
                    else
                    {
                        if (strMatchStyle == "null")
                        {
                            strError = "检索空值的时候,请保持检索词为空";
                            goto ERROR1;
                        }
                    }

                    string strQueryXml = "";
                    long lRet = Channel.SearchBiblio(stop,
                        strDbName,
                        this.textBox_simple_queryWord.Text,
                        this.SearchMaxCount,    // 1000,
                        strFromStyle,
                        strMatchStyle,
                        this.Lang,
                        null,   // strResultSetName
                        "", // strSearchStyle
                        "", // strOutputStyle
                        "",
                        out strQueryXml,
                        out strError);
                    if (lRet == -1)
                    {
                        this.textBox_resultInfo.Text += "检索词 '" + this.textBox_simple_queryWord.Text + "' 检索时发生错误:" + strError + "\r\n";
                        goto ERROR1;
                    }

                    lHitCount = lRet;

                    this.textBox_resultInfo.Text += "检索词 '" + this.textBox_simple_queryWord.Text + "' 命中 " + lHitCount.ToString() + " 条记录\r\n";

                    stop.SetProgressRange(0, lHitCount);

                    long lStart = 0;
                    long lPerCount = Math.Min(50, lHitCount);
                    DigitalPlatform.LibraryClient.localhost.Record[] searchresults = null;

                    this.listView_browse.Focus();

                    // 装入浏览格式
                    for (; ; )
开发者ID:renyh1013,项目名称:dp2,代码行数:67,代码来源:dp2SearchForm.cs


注:本文中的LibraryChannel.SearchBiblio方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。