private void BindList() { Query q = Query.Build(new { SortFields = "OperateDate desc" }); string LogTypes = PubCom.CheckString(dpLogType.SelectedValue.Trim()); string OperateUser = PubCom.CheckString(txtOperateUser.Text.Trim()); if (LogTypes != "==请选择==") { q.Add("LogType", LogTypes); } //处理日期类 if (StarTime.Text.Trim() != "") { q.Gt("OperateDate", StarTime.Text.Trim()); } if (EndTime.Text.Trim() != "") { q.Lt("OperateDate", EndTime.Text.Trim()); } if (OperateUser != "") { q.Add("OperateUser", OperateUser); } int rec = 0; rplist.DataSource = bsol.GetSysOperateLogList(q, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, out rec); rplist.DataBind(); AspNetPager1.RecordCount = rec; //// 插入日志 SysOperateLog log = new SysOperateLog(); log.LogID = StringHelper.getKey(); log.LogType = LogType.日志信息.ToString(); log.OperateUser = GetLogUserName(); log.OperateDate = DateTime.Now; log.LogOperateType = "日志信息查询"; log.LogAfterObject = JsonHelper.Obj2Json <string>(q.GetCondition(true)); bsol.Insert(log); }