@using Bowin.Web.Controls.Mvc; @using EMIS.Entities; @using EMIS.Web.Controls; @{ ViewBag.Title = "List"; } @section scripts{ }
@Html.Position()
查询条件
@Html.PositionCondition()
开始时间:@Html.TextBox(new TextBoxOptions { ID = "StartTime", Name = "StartTime", TextBoxType = TextBoxType.DateTime, Validator = new ValidatorBox { Required = true, MissingMessage = "必须填写开始结束时间才能进行查询" }, Value = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss") }, new Dictionary { { "data-condition", "dgLogList" } })  结束时间:@Html.TextBox(new TextBoxOptions { ID = "EndTime", Name = "EndTime", TextBoxType = TextBoxType.DateTime, Validator = new ValidatorBox { Required = true, MissingMessage = "必须填写开始结束时间才能进行查询" }, Value = DateTime.Now.AddHours(+1).ToString("yyyy-MM-dd HH:mm:ss") }, new Dictionary { { "data-condition", "dgLogList" } })
操作日志列表
@Html.ContextMenuBar("List")
@Html.DataGrid(new DataGridOptions { Columns = new List() { new CheckBoxFieldColumn{ HeaderText="", FieldName="OperateID"}, new BoundFieldColumn { FieldName="LoginID", HeaderText="用户名", Align=AlignStyle.Center, Width=0.1 }, new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.06 }, new BoundFieldColumn { FieldName="IP", HeaderText="IP地址", Align=AlignStyle.Center, Width=0.08 }, new BoundFieldColumn { FieldName="Operate", HeaderText="操作类型", Align=AlignStyle.Center, Width=0.04 }, new BoundFieldColumn { FieldName="IsSuccessDesc", HeaderText="是否成功", Align=AlignStyle.Center, Width=0.04 }, new BoundFieldColumn { FieldName="TableName", HeaderText="操作表名", Align=AlignStyle.Center, Width=0.1, OverflowLength=20 }, new BoundFieldColumn { FieldName="OperateTime", HeaderText="操作时间", Align=AlignStyle.Center, Width=0.1 , Formatter = Formatter.LongDate }, new BoundFieldColumn { FieldName="SourceUrl", HeaderText="页面地址", Align=AlignStyle.Center, Width=0.1, OverflowLength=15 }, new BoundFieldColumn { FieldName="Detail", HeaderText="操作详情", Align=AlignStyle.Center, Width=0.1, OverflowLength=15 } }, PageSize = 50, IsCheckOnSelect = true, DataSourceUrl = Url.Content("~/OperateLog/List"), ID = "dgLogList", IsAutoLoad = false, IsPagination = true, IsShowRowNumbers = true, IsSingleSelect = false })