using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace WalkingTec.Mvvm.Core { /// /// ListVM接口 /// /// ListVM中的Model类 /// ListVM使用的Searcher类 public interface IBasePagedListVM : IBaseVM where T : TopBasePoco where S : ISearcher { Type ModelType { get; } /// /// 多级表头深度 默认 1级 /// int GetChildrenDepth(); /// /// GetHeaders /// /// IEnumerable> GetHeaders(); /// /// 页面动作 /// List GetGridActions(); /// /// 查询并生成Excel /// /// Excel文件 byte[] GenerateExcel(); string TotalText { get; set; } #region Old event Action> OnAfterInitList; /// ///记录批量操作时列表中选择的Id /// List Ids { get; set; } string SelectorValueField { get; set; } /// /// 获取Model集合 /// /// Model集合 IEnumerable GetEntityList(); void ClearEntityList(); /// /// 获取Searcher /// S Searcher { get; } /// /// GetIsSelected /// /// /// bool GetIsSelected(object item); /// /// 是否已经搜索过 /// bool IsSearched { get; set; } /// /// PassSearch /// bool PassSearch { get; set; } /// /// 搜索模式 /// ListVMSearchModeEnum SearcherMode { get; set; } /// /// 是否需要分页 /// bool NeedPage { get; set; } /// /// 允许导出Excel的最大行数,超过行数会分成多个文件,最多不能超过100万 /// int ExportMaxCount { get; set; } /// /// 根据允许导出的Excel最大行数,算出最终导出的Excel个数 /// int ExportExcelCount { get; set; } /// /// 移除操作列 /// void RemoveActionColumn(object root = null); void RemoveAction(); /// /// 填加错误信息列,用于批量操作的列表 /// void AddErrorColumn(); /// /// 搜索条件Panel的Id /// string SearcherDivId { get; } /// /// GetSearchQuery /// /// IOrderedQueryable GetSearchQuery(); /// /// DoSearch /// void DoSearch(); /// /// CopyContext /// /// void CopyContext(BaseVM vm); /// /// ReplaceWhere /// Expression ReplaceWhere { get; set; } /// /// SetFullRowColor /// /// /// string SetFullRowColor(object entity); /// /// SetFullRowBgColor /// /// /// string SetFullRowBgColor(object entity); T CreateEmptyEntity(); /// /// 用于为子表生成可编辑Grid时,内部控件名称前缀 /// string DetailGridPrix { get; set; } void DoInitListVM(); #endregion } }