BootstrapAdmin11/Bootstrap.Admin/Query/QueryLogOption.cs

40 lines
948 B
C#
Raw Normal View History

2018-06-07 00:45:47 +08:00
using Bootstrap.DataAccess;
using Longbow.Web.Mvc;
using System;
namespace Bootstrap.Admin.Query
{
/// <summary>
///
/// </summary>
2018-06-07 00:45:47 +08:00
public class QueryLogOption : PaginationOption
{
/// <summary>
///
/// </summary>
public string OperateType { get; set; }
2018-06-07 00:45:47 +08:00
/// <summary>
///
/// </summary>
public DateTime? OperateTimeStart { get; set; }
2018-06-07 00:45:47 +08:00
/// <summary>
///
/// </summary>
public DateTime? OperateTimeEnd { get; set; }
2018-06-07 00:45:47 +08:00
/// <summary>
///
/// </summary>
/// <returns></returns>
public QueryData<Log> RetrieveData()
{
var data = LogHelper.RetrievePages(this, OperateTimeStart, OperateTimeEnd, OperateType);
2018-06-07 00:45:47 +08:00
var ret = new QueryData<Log>();
ret.total = data.TotalItems;
ret.rows = data.Items;
2018-06-07 00:45:47 +08:00
return ret;
}
}
}