using DeviceRepair.Models.Enum; using System; using System.Runtime.InteropServices; namespace DeviceRepair.Models.Attr { [Serializable] [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)] [ComVisible(true)] public sealed class HistoryGridFieldAttribute : Attribute { #region Fields /// /// 编码 /// private string _Code; /// /// 文本描述 /// private string _Description; private string _FormatString; private bool _AllowExport = true; private bool _AllowPrint = true; private int _ColumnSequence; /// /// 控件类型 /// private HistoryFilterCtlType _CtlType; #endregion #region Ctor /// /// Ctor /// public HistoryGridFieldAttribute() { } /// /// Ctor /// public HistoryGridFieldAttribute(string _code, string _Desc, string _formatString, HistoryType _ctlType) { _Code = _code; _Description = _Desc; _FormatString = _formatString; } #endregion #region Property /// /// 编码 /// public string Code { get { return _Code; } set { _Code = value; } } /// /// 文本描述 /// public string Description { get { return _Description; } set { _Description = value; } } public string FormatString { get { return _FormatString; } set { _FormatString = value; } } //列展示顺序【预留】 public int ShowSequence { get { return _ColumnSequence; } set { _ColumnSequence = value; } } //是否允许打印【预留】 public bool AllowPrint { get { return _AllowPrint; } set { _AllowPrint = value; } } //是否允许打印【导出】 public bool AllowExport { get { return _AllowExport; } set { _AllowExport = value; } } /// /// 控件类型 /// public HistoryFilterCtlType CtlType { get { return _CtlType; } set { _CtlType = value; } } #endregion } }