| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System;
- namespace Core.StlMes.Client.Qcm
- {
- public enum ControlAttributeType
- {
- QueryControl = 1, //如果不填,则二进制只有一位。就无法正常使用枚举的异或、与运算了。
- NoQueryControl = 2
- }
- /// <summary>
- /// 用来标识实体类的属性,以被转换器使用。
- /// </summary>
- [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
- class ControlAttribute : Attribute
- {
- private string _controlName = "";
- private bool _isGetValue = false;
- private ControlAttributeType _controlAttributeType;
- public string ControlName
- {
- get { return _controlName; }
- set { _controlName = value; }
- }
- public bool IsGetValue
- {
- get { return _isGetValue; }
- set { _isGetValue = value; }
- }
- public ControlAttributeType ControlAttributeType
- {
- get { return _controlAttributeType; }
- set { _controlAttributeType = value; }
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="controlName">控件名称</param>
- /// <param name="isGetValue">是获取Value值,还是获取Text值</param>
- /// <param name="controlAttributeType"></param>
- public ControlAttribute(string controlName, bool isGetValue, ControlAttributeType controlAttributeType)
- {
- _controlName = controlName;
- _isGetValue = isGetValue;
- _controlAttributeType = controlAttributeType;
- }
- }
- }
|