public OperationLogViewModel DataBind(OperationLogModelFilter filter) { int totalCount = 0; if ((int)filter.SystemCode == 0) { filter.SystemCode = SystemType.LMS; } var model = new OperationLogViewModel() { FilterModel = filter, PagedList = _operateLogServices.QueryBizLogInfo(new BizLog() { SystemCode = filter.SystemCode, ModuleName = filter.ModuleName, KeywordType = filter.KeywordTypeID, Keyword = filter.Keyword, Summary = filter.Summary, UserRealName = filter.UserRealName }, filter.Page, filter.PageSize, filter.StartTime, filter.EndTime, out totalCount) }; var getSystemTypeList = new List <DataSourceBinder> { new DataSourceBinder { ValueField = "S012", TextField = "LMS", TextField_EN = "LMS" }, new DataSourceBinder { ValueField = "S010", TextField = "LIS", TextField_EN = "LIS" } }; //系统模块 getSystemTypeList.ForEach(p => model.SystemTypeList.Add( new SelectListItem() { Text = p.TextField, Value = p.ValueField, Selected = p.ValueField == filter.SystemCode.ToString() }) ); //关键字类别 OperateLog.GetKeyWordTypeList().ForEach(p => model.KeywordTypeList.Add( new SelectListItem() { Text = p.TextField, Value = p.ValueField, Selected = p.ValueField == filter.KeywordTypeID.ToString() } )); return(model); }