本文整理汇总了C#中LibraryChannel.GetSearchResult方法的典型用法代码示例。如果您正苦于以下问题:C# LibraryChannel.GetSearchResult方法的具体用法?C# LibraryChannel.GetSearchResult怎么用?C# LibraryChannel.GetSearchResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LibraryChannel
的用法示例。
在下文中一共展示了LibraryChannel.GetSearchResult方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SearchAllBatchNo
//.........这里部分代码省略.........
+ StringUtil.GetXmlStringSimple("")
+ "</word><match>left</match><relation>=</relation><dataType>string</dataType><maxCount>-1</maxCount></item><lang>zh</lang>";
strQueryXml += "<operator value='OR' />";
strQueryXml += "<item><word>"
+ StringUtil.GetXmlStringSimple("")
+ "</word><match>exact</match><relation>=</relation><dataType>string</dataType><maxCount>-1</maxCount></item><lang>zh</lang></target>";
#endif
long lRet = channel.Search(
stop,
text.ToString(),
"batchno",
"keycount", // strOutputStyle
out strError);
if (lRet == 0)
{
strError = "not found";
return 0; // not found
}
if (lRet == -1)
return -1;
long lHitCount = lRet;
long lStart = 0;
long lCount = lHitCount;
DigitalPlatform.CirculationClient.localhost.Record[] searchresults = null;
// 装入浏览格式
for (; ; )
{
Application.DoEvents(); // 出让界面控制权
if (stop != null && stop.State != 0)
{
strError = "用户中断";
return -1;
}
lRet = channel.GetSearchResult(
stop,
"batchno", // strResultSetName
lStart,
lCount,
"keycount",
"zh",
out searchresults,
out strError);
if (lRet == -1)
{
strError = "GetSearchResult() error: " + strError;
return -1;
}
if (lRet == 0)
{
// MessageBox.Show(this, "未命中");
return 0;
}
// 处理浏览结果
foreach (Record record in searchresults)
{
if (record.Cols == null)
{
strError = "请更新应用服务器和数据库内核到最新版本,才能使用列出批次号的功能";
return -1;
}
// 跳过数字为 0 的事项
if (record.Cols.Length > 0 && record.Cols[0] == "0")
continue;
ListViewItem item = new ListViewItem();
item.Text = string.IsNullOrEmpty(record.Path) == false ? record.Path : "[空]";
ListViewUtil.ChangeItemText(item, 1, record.Cols[0]);
this.listView_records.Items.Add(item);
}
lStart += searchresults.Length;
lCount -= searchresults.Length;
stop.SetMessage("共命中 " + lHitCount.ToString() + " 条,已装入 " + lStart.ToString() + " 条");
if (lStart >= lHitCount || lCount <= 0)
break;
}
}
finally
{
stop.EndLoop();
stop.OnStop -= new StopEventHandler(channel.DoStop);
stop.Initial("");
// EnableControls(true);
}
return 1;
}
示例2: GetCommentsSearchResult
// TODO: 结果集是和 channel 在一起的。如果 channel 不确定,就需要用全局结果集
// 获得一定范围的检索命中结果
// return:
public static int GetCommentsSearchResult(
OpacApplication app,
LibraryChannel channel,
ItemLoadEventHandler itemLoadProc,
int nStart,
int nMaxCount,
bool bGetRecord,
string strLang, // 2012/7/9
out string strError)
{
strError = "";
List<string> aPath = null;
long lRet = // this.Channel.
channel.GetSearchResult(
null,
"default",
nStart, // 0,
nMaxCount, // -1,
strLang,
out aPath,
out strError);
if (lRet == -1)
goto ERROR1;
long lHitCount = lRet;
if (aPath.Count == 0)
{
strError = "GetSearchResult aPath error";
goto ERROR1;
}
for (int i = 0; i < aPath.Count; i++)
{
if (bGetRecord == true)
{
string strXml = "";
string strMetaData = "";
byte[] timestamp = null;
string strOutputPath = "";
string strStyle = LibraryChannel.GETRES_ALL_STYLE;
lRet = // this.Channel.
channel.GetRes(
null,
aPath[i],
strStyle,
out strXml,
out strMetaData,
out timestamp,
out strOutputPath,
out strError);
if (lRet == -1)
goto ERROR1;
if (// this.ItemLoad != null
itemLoadProc != null
)
{
ItemLoadEventArgs e = new ItemLoadEventArgs();
e.Path = aPath[i];
e.Index = i;
e.Count = aPath.Count;
e.Xml = strXml;
e.Timestamp = timestamp;
e.TotalCount = (int)lHitCount;
// this.ItemLoad(this, e);
e.Channel = channel;
itemLoadProc(null, e);
}
}
else
{
if (// this.ItemLoad != null
itemLoadProc != null)
{
ItemLoadEventArgs e = new ItemLoadEventArgs();
e.Path = aPath[i];
e.Index = i;
e.Count = aPath.Count;
e.Xml = "";
e.Timestamp = null;
e.TotalCount = (int)lHitCount;
// this.ItemLoad(this, e);
e.Channel = channel;
itemLoadProc(null, e);
}
}
}
return 0;
ERROR1:
return -1;
}
示例3: SearchAllLocation
// 检索出实体库全部可用的馆藏地名称
int SearchAllLocation(
LibraryChannel channel,
Stop stop,
out string strError)
{
strError = "";
long lTotalCount = 0;
this.listView_records.Items.Clear();
// EnableControls(false);
stop.OnStop += new StopEventHandler(channel.DoStop);
stop.Initial("正在列出全部馆藏地 ...");
stop.BeginLoop();
try
{
for (int i = 0; i < 2; i++)
{
long lRet = Channel.SearchItem(
stop,
"<all>",
"", // strBatchNo
-1,
"馆藏地点",
i == 0 ? "left" : "exact", // 第二次为检索空值
"zh",
"batchno", // strResultSetName
"", // "desc",
"keycount", // strOutputStyle
out strError);
if (lRet == 0)
{
#if NO
strError = "not found";
return 0; // not found
#endif
continue;
}
if (lRet == -1)
return -1;
long lHitCount = lRet;
long lStart = 0;
long lCount = lHitCount;
DigitalPlatform.CirculationClient.localhost.Record[] searchresults = null;
// 装入浏览格式
for (; ; )
{
Application.DoEvents(); // 出让界面控制权
if (stop != null && stop.State != 0)
{
strError = "用户中断";
return -1;
}
lRet = channel.GetSearchResult(
stop,
"batchno", // strResultSetName
lStart,
lCount,
"keycount",
"zh",
out searchresults,
out strError);
if (lRet == -1)
{
strError = "GetSearchResult() error: " + strError;
return -1;
}
if (lRet == 0)
{
// MessageBox.Show(this, "未命中");
continue;
}
// 处理浏览结果
foreach (Record record in searchresults)
{
if (record.Cols == null)
{
strError = "请更新应用服务器和数据库内核到最新版本,才能使用列出馆藏地的功能";
return -1;
}
if (this._libraryCodeList.Count > 0
&& MatchLibraryCode(this._libraryCodeList, record.Path) == false)
continue;
// 跳过数字为 0 的事项
if (record.Cols.Length > 0 && record.Cols[0] == "0")
continue;
ListViewItem item = new ListViewItem();
//.........这里部分代码省略.........
示例4: GetBatchNoTable
//.........这里部分代码省略.........
"批次号",
"left",
strLang,
"batchno", // strResultSetName
"desc",
"keycount", // strOutputStyle
out strError);
}
else
{
Debug.Assert(false, "");
}
if (lRet == -1)
goto ERROR1;
if (lRet == 0)
{
strError = "没有找到任何" + strName + "批次号检索点";
return;
}
long lHitCount = lRet;
long lStart = 0;
long lCount = lHitCount;
DigitalPlatform.LibraryClient.localhost.Record[] searchresults = null;
// 装入浏览格式
for (; ; )
{
Application.DoEvents(); // 出让界面控制权
if (stop != null)
{
if (stop.State != 0)
{
strError = "用户中断";
goto ERROR1;
}
}
lRet = Channel.GetSearchResult(
stop,
"batchno", // strResultSetName
lStart,
lCount,
"keycount",
strLang,
out searchresults,
out strError);
if (lRet == -1)
{
strError = "GetSearchResult() error: " + strError;
goto ERROR1;
}
if (lRet == 0)
{
// MessageBox.Show(this, "未命中");
return;
}
// 处理浏览结果
for (int i = 0; i < searchresults.Length; i++)
{
if (searchresults[i].Cols == null)
{
strError = "请更新应用服务器和数据库内核到最新版本,才能使用列出" + strName + "批次号的功能";
goto ERROR1;
}
KeyCount keycount = new KeyCount();
keycount.Key = searchresults[i].Path;
keycount.Count = Convert.ToInt32(searchresults[i].Cols[0]);
e.KeyCounts.Add(keycount);
}
lStart += searchresults.Length;
lCount -= searchresults.Length;
stop.SetMessage("共命中 " + lHitCount.ToString() + " 条,已装入 " + lStart.ToString() + " 条");
if (lStart >= lHitCount || lCount <= 0)
break;
}
}
finally
{
stop.EndLoop();
stop.OnStop -= new StopEventHandler(Channel.DoStop);
stop.Initial("");
// EnableControls(true);
}
return;
ERROR1:
MessageBox.Show(owner, strError);
}
示例5: SearchOneLocationItems
public static int SearchOneLocationItems(
MainForm main_form,
LibraryChannel channel,
Stop stop,
string strLocation,
string strOutputStyle,
out List<string> results,
out string strError)
{
strError = "";
results = new List<string>();
long lRet = channel.SearchItem(stop,
"<all>",
strLocation, //
-1,
"馆藏地点",
"left", // this.textBox_queryWord.Text == "" ? "left" : "exact", // 原来为left 2007/10/18 changed
"zh",
null, // strResultSetName
"", // strSearchStyle
"", //strOutputStyle, // (bOutputKeyCount == true ? "keycount" : ""),
out strError);
if (lRet == -1)
return -1;
long lHitCount = lRet;
long lStart = 0;
long lCount = lHitCount;
DigitalPlatform.LibraryClient.localhost.Record[] searchresults = null;
bool bOutputBiblioRecPath = false;
bool bOutputItemRecPath = false;
string strStyle = "";
if (strOutputStyle == "bibliorecpath")
{
bOutputBiblioRecPath = true;
strStyle = "id,cols,format:@coldef:*/parent";
}
else
{
bOutputItemRecPath = true;
strStyle = "id";
}
// 实体库名 --> 书目库名
Hashtable dbname_table = new Hashtable();
// 书目库记录路径,用于去重
Hashtable bilio_recpath_table = new Hashtable();
// 装入浏览格式
for (; ; )
{
Application.DoEvents(); // 出让界面控制权
if (stop != null && stop.State != 0)
{
strError = "检索共命中 " + lHitCount.ToString() + " 条,已装入 " + lStart.ToString() + " 条,用户中断...";
return -1;
}
lRet = channel.GetSearchResult(
stop,
null, // strResultSetName
lStart,
lCount,
strStyle, // bOutputKeyCount == true ? "keycount" : "id,cols",
"zh",
out searchresults,
out strError);
if (lRet == -1)
{
strError = "检索共命中 " + lHitCount.ToString() + " 条,已装入 " + lStart.ToString() + " 条," + strError;
return -1;
}
if (lRet == 0)
{
return 0;
}
// 处理浏览结果
for (int i = 0; i < searchresults.Length; i++)
{
DigitalPlatform.LibraryClient.localhost.Record searchresult = searchresults[i];
if (bOutputBiblioRecPath == true)
{
string strItemDbName = Global.GetDbName(searchresult.Path);
string strBiblioDbName = (string)dbname_table[strItemDbName];
if (string.IsNullOrEmpty(strBiblioDbName) == true)
{
strBiblioDbName = main_form.GetBiblioDbNameFromItemDbName(strItemDbName);
dbname_table[strItemDbName] = strBiblioDbName;
}
string strBiblioRecPath = strBiblioDbName + "/" + searchresult.Cols[0];
//.........这里部分代码省略.........
示例6: SearchLineDp2library
//.........这里部分代码省略.........
"", // 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>();
// 装入浏览格式
for (; ; )
{
if (this.Progress != null && this.Progress.State != 0)
{
break;
}
lRet = _channel.GetSearchResult(
this.Progress,
null, // strResultSetName
lStart,
lCount,
strStyle, // bOutputKeyCount == true ? "keycount" : "id,cols",
this.Lang,
out searchresults,
out strError);
if (lRet == -1)
{
strError = "检索共命中 " + lHitCount.ToString() + " 条,已装入 " + lStart.ToString() + " 条," + strError;
goto ERROR1;
}
if (lRet == 0)
break;
// 处理浏览结果
foreach (DigitalPlatform.CirculationClient.localhost.Record searchresult in searchresults)
{
biblio_recpaths.Add(searchresult.Path);
}
{
// 获得书目记录
BiblioLoader loader = new BiblioLoader();
loader.Channel = _channel;
loader.Stop = this.Progress;
loader.Format = "xml";
loader.GetBiblioInfoStyle = GetBiblioInfoStyle.Timestamp;
loader.RecPaths = biblio_recpaths;
示例7: DoMutilineSearch
//.........这里部分代码省略.........
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;
long lStart = 0;
long lPerCount = Math.Min(50, lHitCount);
DigitalPlatform.LibraryClient.localhost.Record[] searchresults = null;
// 装入浏览格式
for (; ; )
{
Application.DoEvents(); // 出让界面控制权
if (stop != null)
{
if (stop.State != 0)
{
strError = "用户中断";
goto ERROR1;
}
}
stop.SetMessage("正在装入浏览信息 " + (lStart + 1).ToString() + " - " + (lStart + lPerCount).ToString() + " ('" + strLine + "' 命中 " + lHitCount.ToString() + " 条记录) ...");
lRet = Channel.GetSearchResult(
stop,
null, // strResultSetName
lStart,
lPerCount,
bFillBrowseLine == true ? "id,cols" : "id",
this.Lang,
out searchresults,
out strError);
if (lRet == -1)
goto ERROR1;
if (lRet == 0)
{
strError = "未命中";
goto ERROR1;
}
// 处理浏览结果
for (int i = 0; i < searchresults.Length; i++)
{
NewLine(
this.listView_browse,
searchresults[i].Path + "@" + strServerName,
searchresults[i].Cols);
}
lStart += searchresults.Length;
// lCount -= searchresults.Length;
if (lStart >= lHitCount || lPerCount <= 0)
break;
}
示例8: GetResultset
// 从 dp2Library(其实也可以说dp2Kernel) 端获取结果集
// parameters:
// strStyle tobibliorecpath 将实体\期\订购\评注 记录路径转换为书目记录路径,并去重
int GetResultset(LibraryChannel channel,
string strResultsetName,
string strResultsetFilename,
string strStyle,
out int nCount,
out string strError)
{
strError = "";
nCount = 0;
long lStart = 0;
long lRet = 0;
m_biblioDbNameTable.Clear();
bool bToBiblioRecPath = StringUtil.IsInList("tobibliorecpath", strStyle);
#if NO
DpResultSet item_paths = null;
if (bToBiblioRecPath == true)
item_paths = new DpResultSet(true); // 临时文件会自动丢弃
#endif
DpResultSet resultset = new DpResultSet(false, false);
resultset.Create(strResultsetFilename,
strResultsetFilename + ".index");
bool bDone = false;
try
{
Hashtable temp_table = new Hashtable();
for (; ; )
{
if (this.m_bClosed == true || this.Stopped == true)
{
strError = "中断";
return -1;
}
Thread.Sleep(1);
// List<string> aPath = null;
Record[] searchresults = null;
string strGetStyle = "id";
if (bToBiblioRecPath == true)
strGetStyle = "id,cols,format:@coldef://parent"; // "id,xml";
lRet = channel.GetSearchResult(
null,
strResultsetName,
lStart,
-1, // 100
strGetStyle,
"zh",
out searchresults,
out strError);
if (lRet == -1)
return -1;
long lHitCount = lRet;
for (int j = 0; j < searchresults.Length; j++)
{
if ((j % 10) == 9)
this.SetProgressText("从检索结果中获得记录路径 " + (lStart + j + 1).ToString() + " 条");
Record rec = searchresults[j];
if (bToBiblioRecPath == false)
{
DpRecord record = new DpRecord(rec.Path);
resultset.Add(record);
}
else
{
if (rec.RecordBody != null
&& rec.RecordBody.Result != null
&& rec.RecordBody.Result.ErrorCode != ErrorCodeValue.NoError)
{
strError = "获得结果集位置偏移 " + (lStart + j).ToString() + " 时出错,该记录已被忽略: " + rec.RecordBody.Result.ErrorString;
this.AppendResultText(strError + "\r\n");
continue;
}
string strBiblioRecPath = "";
#if NO
// 从册记录XML中获得书目记录路径
// return:
// -1 出错
// 1 成功
int nRet = GetBiblioRecPath(
rec.Path,
rec.RecordBody.Xml,
out strBiblioRecPath,
out strError);
//.........这里部分代码省略.........
示例9: DoCheckedMutilineSearch
//.........这里部分代码省略.........
}
lHitCount = lRet;
lTotalCount += lHitCount;
lPerLineHitCount += lHitCount;
if (lHitCount == 0)
continue;
// stop.SetProgressRange(0, lTotalCount);
long lStart = 0;
long lPerCount = Math.Min(50, lHitCount);
DigitalPlatform.LibraryClient.localhost.Record[] searchresults = null;
// this.listView_browse.Focus();
// 装入浏览格式
for (; ; )
{
Application.DoEvents(); // 出让界面控制权
if (stop != null)
{
if (stop.State != 0)
{
strError = "用户中断";
goto ERROR1;
}
}
stop.SetMessage("正在装入浏览信息 " + (lStart + 1).ToString() + " - " + (lStart + lPerCount).ToString() + " ('" + strLine + "' 命中 " + lHitCount.ToString() + " 条记录) ...");
lRet = Channel.GetSearchResult(
stop,
"default", // strResultSetName
lStart,
lPerCount,
bFillBrowseLine == true ? "id,cols" : "id",
this.Lang,
out searchresults,
out strError);
if (lRet == -1)
goto ERROR1;
if (lRet == 0)
{
strError = "未命中";
goto ERROR1;
}
// 处理浏览结果
for (int k = 0; k < searchresults.Length; k++)
{
ListViewItem new_item = NewLine(
this.listView_browse,
searchresults[k].Path + "@" + item.ServerName,
searchresults[k].Cols);
new_items.Add(new_item);
}
lStart += searchresults.Length;
lFillCount += searchresults.Length;
// stop.SetProgressValue(lFillCount);
// lCount -= searchresults.Length;
if (lStart >= lHitCount || lPerCount <= 0)
示例10: DoSimpleSearch
//.........这里部分代码省略.........
{
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 (; ; )
{
Application.DoEvents(); // 出让界面控制权
if (stop != null)
{
if (stop.State != 0)
{
strError = "用户中断";
goto ERROR1;
}
}
stop.SetMessage("正在装入浏览信息 " + (lStart + 1).ToString() + " - " + (lStart + lPerCount).ToString() + " (命中 " + lHitCount.ToString() + " 条记录) ...");
lRet = Channel.GetSearchResult(
stop,
null, // strResultSetName
lStart,
lPerCount,
bFillBrowseLine == true ? "id,cols" : "id",
this.Lang,
out searchresults,
out strError);
if (lRet == -1)
goto ERROR1;
if (lRet == 0)
{
strError = "未命中";
goto ERROR1;
}
// 处理浏览结果
for (int i = 0; i < searchresults.Length; i++)
{
NewLine(
this.listView_browse,
searchresults[i].Path + "@" + strServerName,
searchresults[i].Cols);
}
lStart += searchresults.Length;
// lCount -= searchresults.Length;
if (lStart >= lHitCount || lPerCount <= 0)
break;
stop.SetProgressValue(lStart);
示例11: DoLogicSearch
//.........这里部分代码省略.........
}
lHitCount = lRet;
lTotalHitCount += lHitCount;
stop.SetProgressRange(0, lTotalHitCount);
this.textBox_resultInfo.Text += "已命中 " + lTotalHitCount.ToString() + " 条,检索尚未结束...\r\n";
if (lHitCount == 0)
continue;
long lStart = 0;
long lPerCount = Math.Min(50, lHitCount);
DigitalPlatform.LibraryClient.localhost.Record[] searchresults = null;
// 装入浏览格式
for (; ; )
{
Application.DoEvents(); // 出让界面控制权
if (stop != null)
{
if (stop.State != 0)
{
strError = "用户中断";
goto ERROR1;
}
}
stop.SetMessage("正在装入浏览信息 " + (lStart + 1).ToString() + " - " + (lStart + lPerCount).ToString() + " (命中 " + lHitCount.ToString() + " 条记录) ...");
lRet = Channel.GetSearchResult(
stop,
null, // strResultSetName
lStart,
lPerCount,
bFillBrowseLine == true ? "id,cols" : "id",
this.Lang,
out searchresults,
out strError);
if (lRet == -1)
goto ERROR1;
if (lRet == 0)
{
strError = "未命中";
goto ERROR1;
}
// 处理浏览结果
for (int i = 0; i < searchresults.Length; i++)
{
NewLine(
this.listView_browse,
searchresults[i].Path + "@" + strServerName,
searchresults[i].Cols);
lLoaded++;
stop.SetProgressValue(lLoaded);
}
lStart += searchresults.Length;
// lCount -= searchresults.Length;
if (lStart >= lHitCount || lPerCount <= 0)
示例12: DoCheckedSimpleSearch
//.........这里部分代码省略.........
continue;
}
long lHitCount = lRet;
lTotalCount += lRet;
stop.SetProgressRange(0, lTotalCount);
// textBox_simpleQuery_comment.Text += "命中记录数: " + Convert.ToString(nRet) + "\r\n";
this.textBox_resultInfo.Text += "检索词 '" + this.textBox_simple_queryWord.Text + "' 命中 " + lTotalCount.ToString() + " 条记录\r\n";
if (lHitCount == 0)
continue;
long lStart = 0;
long lPerCount = Math.Min(50, lHitCount);
DigitalPlatform.LibraryClient.localhost.Record[] searchresults = null;
// 装入浏览格式
for (; ; )
{
Application.DoEvents(); // 出让界面控制权
if (stop != null)
{
if (stop.State != 0)
{
strError = "用户中断";
goto ERROR1;
}
}
stop.SetMessage("正在装入浏览信息 " + (lStart + 1).ToString() + " - " + (lStart + lPerCount).ToString() + " (命中 " + lHitCount.ToString() + " 条记录) ...");
lRet = Channel.GetSearchResult(
stop,
null, // strResultSetName
lStart,
lPerCount,
strBrowseStyle,
this.Lang,
out searchresults,
out strError);
if (lRet == -1)
goto ERROR1;
if (lRet == 0)
{
strError = "未命中";
goto ERROR1;
}
// 处理浏览结果
for (int j = 0; j < searchresults.Length; j++)
{
NewLine(
this.listView_browse,
searchresults[j].Path + "@" + item.ServerName,
searchresults[j].Cols);
}
lStart += searchresults.Length;
lFillCount += searchresults.Length;
// lCount -= searchresults.Length;
if (lStart >= lHitCount || lPerCount <= 0)
break;
示例13: ThreadFillAmercedMain
//.........这里部分代码省略.........
stop,
strQueryXml,
strResultSetName,
"", // strOutputStyle
out strError);
if (lRet == 0)
{
strError = "not found";
return; // not found
}
if (lRet == -1)
goto ERROR1;
if (m_bStopFillAmerced == true)
return;
long lHitCount = lRet;
long lStart = 0;
long lPerCount = Math.Min(50, lHitCount);
Record[] searchresults = null;
// 获得结果集,装入listview
for (; ; )
{
if (m_bStopFillAmerced == true)
{
strError = "中断,列表不完整...";
goto ERROR1;
}
// stop.SetMessage("正在装入浏览信息 " + (lStart + 1).ToString() + " - " + (lStart + lPerCount).ToString() + " (命中 " + lHitCount.ToString() + " 条记录) ...");
lRet = channel.GetSearchResult(
stop,
strResultSetName, // strResultSetName
lStart,
lPerCount,
"id", // "id,cols"
strLang,
out searchresults,
out strError);
if (lRet == -1)
goto ERROR1;
if (lRet == 0)
{
strError = "未命中";
return;
}
// 处理浏览结果
for (int i = 0; i < searchresults.Length; i++)
{
if (m_bStopFillAmerced == true)
{
strError = "中断,列表不完整...";
goto ERROR1;
}
string strPath = searchresults[i].Path;
byte[] timestamp = null;
string strXml = "";
lRet = channel.GetRecord(stop,