获取一周前更改的页数
我想要在内联网首页上放置一个小部件。 它应该显示 n 天前已更改的页面数。
我尝试过类似的方法,但它总是返回 0
var changeLog = (IChangeLog)ClassFactory.CreateInstance(typeof(IChangeLog), new object[0]);
ChangeLogQueryInfo query = new ChangeLogQueryInfo();
query.From = DateTime.Now.AddDays(-7);
query.Category = new int?(1);
query.Action = (int)ChangeLogPage.ActionType.Publish;
query.MaxRecordsToReturn = 100;
return changeLog.GetChangeCountBackwards(query);
有什么建议吗?
I want a widget on the front page of an intranet.
It should display the count of number of pages that have been changed n number of days back.
I tried something like this, but it always returns 0
var changeLog = (IChangeLog)ClassFactory.CreateInstance(typeof(IChangeLog), new object[0]);
ChangeLogQueryInfo query = new ChangeLogQueryInfo();
query.From = DateTime.Now.AddDays(-7);
query.Category = new int?(1);
query.Action = (int)ChangeLogPage.ActionType.Publish;
query.MaxRecordsToReturn = 100;
return changeLog.GetChangeCountBackwards(query);
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
愚蠢的问题,但是更改日志已启用吗?
您尝试过吗?
有结果吗?
另外值得注意的是,使用更改日志是 不支持
Silly question but is the change log enabled?
Have you tried
Do you get any results?
Also it's worth noting that using the change log is unsupported