DeviceManager/DeviceRepair.Models/OperationHistory/HistoryQueryParam.cs
2024-11-09 12:25:57 +08:00

122 lines
2.6 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using DeviceRepair.Models.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
namespace DeviceRepair.Models.OperationHistory
{
/// <summary>
/// 查询条件对象
/// </summary>
public class HistoryQueryParam
{
#region Property
#region \
/// <summary>
/// 用在界面上不显示,但是默认执行的查询条件参数字段
/// </summary>
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;
}
/// <summary>
/// ComboBox预制值列表多个用英文半角逗号隔开
/// </summary>
public IList<ComboBoxValueStruct> 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(',');
}
}
}
/// <summary>
/// 是否模糊匹配
/// </summary>
public bool bFuzzy
{
get;
set;
}
#endregion
#region Ctor
public HistoryQueryParam()
{
ShowSequence = 0;
bFuzzy = false;
}
#endregion
}
}