本文整理汇总了C#中LibraryChannel.GetBiblioSummary方法的典型用法代码示例。如果您正苦于以下问题:C# LibraryChannel.GetBiblioSummary方法的具体用法?C# LibraryChannel.GetBiblioSummary怎么用?C# LibraryChannel.GetBiblioSummary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LibraryChannel
的用法示例。
在下文中一共展示了LibraryChannel.GetBiblioSummary方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBarcodesSummary
// 获得一系列册的摘要字符串
//
// paramters:
// strStyle 风格。逗号间隔的列表。如果包含html text表示格式。forcelogin
// strOtherParams <a>命令中其余的参数。例如" target='_blank' "可以用来打开新窗口
public static string GetBarcodesSummary(
OpacApplication app,
// SessionInfo sessioninfo,
LibraryChannel channel,
string strBarcodes,
string strArrivedItemBarcode,
string strStyle,
string strOtherParams)
{
string strSummary = "";
if (strOtherParams == null)
strOtherParams = "";
string strDisableClass = "";
if (string.IsNullOrEmpty(strArrivedItemBarcode) == false)
strDisableClass = "deleted";
bool bForceLogin = false;
if (StringUtil.IsInList("forcelogin", strStyle) == true)
bForceLogin = true;
string strPrevBiblioRecPath = "";
string[] barcodes = strBarcodes.Split(new char[] { ',' });
for (int j = 0; j < barcodes.Length; j++)
{
string strBarcode = barcodes[j];
if (String.IsNullOrEmpty(strBarcode) == true)
continue;
// 获得摘要
string strOneSummary = "";
string strBiblioRecPath = "";
string strError = "";
long lRet = channel.GetBiblioSummary(
null,
strBarcode,
null,
strPrevBiblioRecPath, // 前一个path
out strBiblioRecPath,
out strOneSummary,
out strError);
if (lRet == -1 || lRet == 0)
strOneSummary = strError;
/*
LibraryServerResult result = this.GetBiblioSummary(sessioninfo,
strBarcode,
null,
strPrevBiblioRecPath, // 前一个path
out strBiblioRecPath,
out strOneSummary);
if (result.Value == -1 || result.Value == 0)
strOneSummary = result.ErrorInfo;
* */
if (strOneSummary == ""
&& strPrevBiblioRecPath == strBiblioRecPath)
strOneSummary = "(同上)";
if (StringUtil.IsInList("html", strStyle) == true)
{
string strBarcodeLink = "<a "
+ (string.IsNullOrEmpty(strDisableClass) == false && strBarcode != strArrivedItemBarcode ? "class='" + strDisableClass + "'" : "")
+ " href='book.aspx?barcode=" + strBarcode +
(bForceLogin == true ? "&forcelogin=userid" : "")
+ "' " + strOtherParams + " >" + strBarcode + "</a>";
strSummary += strBarcodeLink + " : " + strOneSummary + "<br/>";
}
else
{
strSummary += strBarcode + " : " + strOneSummary + "<br/>";
}
strPrevBiblioRecPath = strBiblioRecPath;
}
return strSummary;
}
示例2: ThreadFillAmercingMain
//.........这里部分代码省略.........
// item.SubItems.Add(strBorrowPeriod);
ListViewUtil.ChangeItemText(item, COLUMN_AMERCING_BORROWPERIOD, strBorrowPeriod);
// 还书日期
// item.SubItems.Add(strReturnDate);
ListViewUtil.ChangeItemText(item, COLUMN_AMERCING_RETURNDATE, strReturnDate);
// id
// item.SubItems.Add(strID);
ListViewUtil.ChangeItemText(item, COLUMN_AMERCING_ID, strID);
ListViewUtil.ChangeItemText(item, COLUMN_AMERCING_BORROWOPERATOR, strBorrowOperator);
ListViewUtil.ChangeItemText(item, COLUMN_AMERCING_RETURNOPERATOR, strReturnOperator);
// 储存原始价格和注释备用
AmercingItemInfo info = new AmercingItemInfo();
info.Price = strPrice;
info.Comment = strComment;
info.Xml = node.OuterXml;
item.Tag = info;
Safe_addListItem(this.listView_overdues, item);
}
if (dup_ids.Count > 0)
{
StringUtil.RemoveDupNoSort(ref dup_ids);
Debug.Assert(dup_ids.Count >= 1, "");
strError = "未交费用列表中发现下列ID出现了重复,这是一个严重错误,请系统管理员尽快排除。\r\n---\r\n" + StringUtil.MakePathList(dup_ids, "; ");
goto ERROR1;
}
// 第二阶段,填充摘要
if (this.FillAmercingParam.FillSummary == true)
{
List<ListViewItem> items = Safe_getItemList(listView_overdues);
for (int i = 0; i < items.Count; i++)
{
if (this.m_bStopFillAmercing == true)
return;
ListViewItem item = items[i];
string strSummary = "";
string strItemBarcode = "";
Safe_getBarcodeAndSummary(listView_overdues,
item,
out strItemBarcode,
out strSummary);
// 已经有内容了,就不刷新了
if (String.IsNullOrEmpty(strSummary) == false)
continue;
if (String.IsNullOrEmpty(strItemBarcode) == true
/*&& String.IsNullOrEmpty(strItemRecPath) == true*/)
continue;
try
{
string strBiblioRecPath = "";
long lRet = channel.GetBiblioSummary(
null,
strItemBarcode,
"", // strItemRecPath,
null,
out strBiblioRecPath,
out strSummary,
out strError);
if (lRet == -1)
{
strSummary = strError; // 2009/3/13 changed
// return -1;
}
}
finally
{
}
Safe_changeItemText(item, COLUMN_AMERCING_BIBLIOSUMMARY, strSummary);
}
}
return;
}
finally
{
channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
channel.Close();
m_bStopFillAmercing = true;
}
ERROR1:
Safe_setError(this.listView_overdues, strError);
// Safe_errorBox(strError);
}
示例3: FillSummary
void FillSummary(
ListView list,
LibraryChannel channel,
int iColumnBarcode,
int iColumnSummary)
{
string strError = "";
for (int i = 0; i < list.Items.Count; i++)
{
if (m_bStopFilling == true)
return;
ListViewItem item = list.Items[i];
string strSummary = ListViewUtil.GetItemText(item, iColumnSummary);
string strItemBarcode = ListViewUtil.GetItemText(item, iColumnBarcode);
// string strItemRecPath = ListViewUtil.GetItemText(item, iColumnSummary);
if (String.IsNullOrEmpty(strSummary) == false)
continue;
if (String.IsNullOrEmpty(strItemBarcode) == true
/*&& String.IsNullOrEmpty(strItemRecPath) == true*/)
continue;
this.stop.SetMessage("正在后台获取摘要 " + strItemBarcode + " ...");
try
{
string strBiblioRecPath = "";
long lRet = channel.GetBiblioSummary(
null,
strItemBarcode,
"", // strItemRecPath,
null,
out strBiblioRecPath,
out strSummary,
out strError);
if (lRet == -1)
{
strSummary = strError; // 2009/3/13 changed
// return -1;
}
}
finally
{
}
ListViewUtil.ChangeItemText(item, iColumnSummary, strSummary);
}
this.stop.SetMessage("");
}
示例4: ThreadFillAmercedMain
//.........这里部分代码省略.........
string strPath = searchresults[i].Path;
byte[] timestamp = null;
string strXml = "";
lRet = channel.GetRecord(stop,
strPath,
out timestamp,
out strXml,
out strError);
if (lRet == -1)
{
if (channel.ErrorCode == ErrorCode.AccessDenied)
continue;
goto ERROR1;
}
int nRet = Safe_fillAmercedLine(
stop,
strXml,
strPath,
out strError);
if (nRet == -1)
goto ERROR1;
}
lStart += searchresults.Length;
if (lStart >= lHitCount || lPerCount <= 0)
break;
}
// 第二阶段,填充摘要
if (this.FillAmercedParam.FillSummary == true)
{
List<ListViewItem> items = Safe_getItemList(this.listView_amerced);
for (int i = 0; i < items.Count; i++)
{
if (this.m_bStopFillAmerced == true)
return;
ListViewItem item = items[i];
string strSummary = "";
string strItemBarcode = "";
Safe_getBarcodeAndSummary(listView_amerced,
item,
out strItemBarcode,
out strSummary);
// 已经有内容了,就不刷新了
if (String.IsNullOrEmpty(strSummary) == false)
continue;
if (String.IsNullOrEmpty(strItemBarcode) == true
/*&& String.IsNullOrEmpty(strItemRecPath) == true*/)
continue;
try
{
string strBiblioRecPath = "";
lRet = channel.GetBiblioSummary(
null,
strItemBarcode,
"", // strItemRecPath,
null,
out strBiblioRecPath,
out strSummary,
out strError);
if (lRet == -1)
{
strSummary = strError; // 2009/3/13 changed
// return -1;
}
}
finally
{
}
Safe_changeItemText(item, COLUMN_AMERCING_BIBLIOSUMMARY, strSummary);
}
}
return;
}
finally
{
channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
channel.AfterLogin -= new AfterLoginEventHandle(Channel_AfterLogin);
channel.Close();
m_bStopFillAmerced = true;
}
ERROR1:
Safe_setError(this.listView_amerced, strError);
// Safe_errorBox(strError);
}