本文整理汇总了C#中DotNetNuke.Services.Log.EventLog.LogController.GetLogs方法的典型用法代码示例。如果您正苦于以下问题:C# LogController.GetLogs方法的具体用法?C# LogController.GetLogs怎么用?C# LogController.GetLogs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Services.Log.EventLog.LogController
的用法示例。
在下文中一共展示了LogController.GetLogs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindData
public void BindData()
{
if (UserInfo.IsSuperUser)
{
if (!Page.IsPostBack && Request.QueryString["pid"] != null)
{
ddlPortalid.FindItemByValue(Request.QueryString["pid"]).Selected = true;
}
_portalId = Int32.Parse(ddlPortalid.SelectedItem.Value);
}
else
{
_portalId = PortalId;
}
var totalRecords = 0;
var pageSize = Convert.ToInt32(ddlRecordsPerPage.SelectedValue);
if (!Page.IsPostBack && Request.QueryString["LogTypeKey"] != null)
{
var li = ddlLogType.FindItemByValue(Request.QueryString["LogTypeKey"]);
if (li != null)
{
li.Selected = true;
}
}
_logTypeKey = ddlLogType.SelectedItem.Value;
var currentPage = _pageIndex;
if (currentPage > 0)
{
currentPage = currentPage - 1;
}
var logController = new LogController();
var filteredKey = _logTypeKey;
if (_logTypeKey == "*" && !String.IsNullOrEmpty(EventFilter))
{
filteredKey = EventFilter + "%";
}
var logs = logController.GetLogs(_portalId, filteredKey == "*" ? String.Empty : filteredKey, pageSize, currentPage, ref totalRecords);
if (logs.Count > 0)
{
dlLog.Visible = true;
btnDelete.Visible = UserInfo.IsSuperUser;
btnClear.Visible = UserInfo.IsSuperUser;
dlLog.DataSource = logs;
dlLog.DataBind();
InitializePaging(ctlPagingControlBottom, totalRecords, pageSize);
}
else
{
UI.Skins.Skin.AddModuleMessage(this, Localization.GetString("NoEntries", LocalResourceFile), ModuleMessage.ModuleMessageType.YellowWarning);
dlLog.Visible = false;
btnDelete.Visible = false;
btnClear.Visible = false;
ctlPagingControlBottom.Visible = false;
}
editSettings.Visible = UserInfo.IsSuperUser;
}