-
Notifications
You must be signed in to change notification settings - Fork 54
SetReaderInfo()接口参数说明
lunvo edited this page Sep 27, 2018
·
1 revision
在统计方案中,使用DigitalPlatform.LibraryClient.LibraryChannel类的SetReaderInfo()函数。
// 保存读者记录
public long SetReaderInfo(
DigitalPlatform.Stop stop,
string strAction,
string strRecPath,
string strNewXml,
string strOldXml,
byte[] baOldTimestamp,
out string strExistingXml,
out string strSavedXml,
out string strSavedRecPath,
out byte[] baNewTimestamp,
out ErrorCodeValue kernel_errorcode,
out string strError)
参数说明请参考 参考手册第3.12节SetReaderInfo()
该示例是在一个框架统计方案中,写入读者信息的写法。
LibraryChannel channel = this.MainForm.GetChannel();
try
{
string strExistingXml = "";
string strSavedXml = "";
string strSavedRecPath = "";
byte[] baNewTimestamp = null;
ErrorCodeValue kernel_errorcode = ErrorCodeValue.NoError;
lRet = channel.SetReaderInfo(null,
"change", //修改一条读者记录
strRecPath, //读者记录路径
dom.DocumentElement.OuterXml, //要写入的读者XML记录
strXml, //修改前的读者XML记录
baTimestamp, //旧记录的时间戳
out strExistingXml, //返回被本次操作所覆盖的读者XML记录
out strSavedXml, //返回实际被保存的读者XML记录
out strSavedRecPath, //返回实际保存的记录路径
out baNewTimestamp, //返回保存后的读者记录的新时间戳
out kernel_errorcode, //返回dp2Kernel层次的错误码
out strError);
if (lRet == -1) //出错
{
MessageBox.Show(strError);
return;
}
else if (lRet == 1)
{
// TODO: 部分字段成功
continue;
}
finally
{
this.MainForm.ReturnChannel(channel);
}
继续卖力的生长吧 / 离参天还很远呢 / 继续飞快的发芽吧 / 要遮天蔽日还要许久呢