本文整理汇总了C#中SessionInfo.Close方法的典型用法代码示例。如果您正苦于以下问题:C# SessionInfo.Close方法的具体用法?C# SessionInfo.Close怎么用?C# SessionInfo.Close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SessionInfo
的用法示例。
在下文中一共展示了SessionInfo.Close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddNotifyRecordToQueueDatabase
//.........这里部分代码省略.........
account.Type = "";
account.Barcode = "";
account.Name = "AddNotifyRecordToQueue";
account.UserID = "AddNotifyRecordToQueue";
account.RmsUserName = this.ManagerUserName;
account.RmsPassword = this.ManagerPassword;
sessioninfo.Account = account;
try
{
string strBiblioRecPath = "";
LibraryServerResult result = this.GetBiblioSummary(
sessioninfo,
strItemBarcode,
"", // strConfirmItemRecPath,
null,
out strBiblioRecPath,
out strSummary);
if (result.Value == -1)
{
strSummary = "ERROR: " + result.ErrorInfo;
}
else
{
// 截断
if (strSummary.Length > 25)
strSummary = strSummary.Substring(0, 25) + "...";
}
}
finally
{
sessioninfo.Close();
sessioninfo = null;
}
#endif
// 发送短消息通知
string strTotalError = "";
// *** dpmail
if (this.MessageCenter != null
&& StringUtil.IsInList("dpmail", this.ArrivedNotifyTypes))
{
string strTemplate = "";
// 获得邮件模板
nRet = GetMailTemplate(
"dpmail",
bOnShelf == false ? "预约到书通知" : "预约到书通知(在架)",
out strTemplate,
out strError);
if (nRet == -1)
return -1;
if (nRet == 0)
{
strError = "预约到书通知<mailTemplate/template>尚未配置。";
return -1;
}
/*
%item% 册信息
%reservetime% 保留期限
%today% 发出email的当天
%summary% 书目摘要
%itembarcode% 册条码号
示例2: AddNotifyRecordToQueue
//.........这里部分代码省略.........
account.Type = "";
account.Barcode = "";
account.Name = "AddNotifyRecordToQueue";
account.UserID = "AddNotifyRecordToQueue";
account.RmsUserName = this.ManagerUserName;
account.RmsPassword = this.ManagerPassword;
sessioninfo.Account = account;
try
{
string strBiblioRecPath = "";
LibraryServerResult result = this.GetBiblioSummary(
sessioninfo,
strItemBarcode,
"", // strConfirmItemRecPath,
null,
out strBiblioRecPath,
out strSummary);
if (result.Value == -1)
{
strSummary = "ERROR: " + result.ErrorInfo;
}
else
{
// 截断
if (strSummary.Length > 25)
strSummary = strSummary.Substring(0, 25) + "...";
}
}
finally
{
sessioninfo.Close();
sessioninfo = null;
}
#endif
// 发送短消息通知
string strTotalError = "";
// *** dpmail
if (this.MessageCenter != null)
{
string strTemplate = "";
// 获得邮件模板
nRet = GetMailTemplate(
"dpmail",
bOnShelf == false ? "预约到书通知" : "预约到书通知(在架)",
out strTemplate,
out strError);
if (nRet == -1)
return -1;
if (nRet == 0)
{
strError = "预约到书通知<mailTemplate/template>尚未配置。";
return -1;
}
/*
%item% 册信息
%reservetime% 保留期限
%today% 发出email的当天
%summary% 书目摘要
%itembarcode% 册条码号