using DeviceRepair.Models.Enum; using System; using System.Collections.Generic; using System.Linq; namespace DeviceRepair.Models.OperationHistory { /// /// 查询条件对象 /// public class HistoryQueryParam { #region Property #region 用在界面上不显示,但是默认执行的查询条件参数字段\ /// /// 用在界面上不显示,但是默认执行的查询条件参数字段 /// public string DefaultNotShowQueryParamValue { get; set; } #endregion public string QueryCode { get; set; } public string QueryDescription { get; set; } public Type QueryType { get; set; } //列展示顺序【预留】 public int ShowSequence { get; set; } public string DefaultValue { get; set; } public HistoryFilterCtlType CtlType { get; set; } /// /// ComboBox预制值列表(多个用英文半角逗号隔开) /// public IList QueryItems { get; set; } public string this[string comboBoxDisplay] { get { if (QueryItems == null) { return string.Empty; } var vFind = QueryItems.FirstOrDefault(A => { return A.Display == comboBoxDisplay; }); return vFind?.Value ?? string.Empty; } } public string ComboBoxQueryDisplays { get { if (QueryItems == null) { return ""; } else { var vValues = ""; foreach (var item in QueryItems) { vValues += $"{item.Display},"; } return vValues.TrimEnd(','); } } } /// /// 是否模糊匹配 /// public bool bFuzzy { get; set; } #endregion #region Ctor public HistoryQueryParam() { ShowSequence = 0; bFuzzy = false; } #endregion } }