解决MySql布尔型新旧版本兼容问题,采用枚举来表示布尔型的数据表。由正向工程赋值
大石头
authored at
2018-05-15 21:21:05
X
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
namespace XControl
{
[AttributeUsage(AttributeTargets.All)]
internal class WebSysDescriptionAttribute : DescriptionAttribute
{
// Fields
private bool replaced;
// Methods
internal WebSysDescriptionAttribute(string description)
: base(description)
{
}
// Properties
public override string Description
{
get
{
if (!this.replaced)
{
this.replaced = true;
base.DescriptionValue = SR.GetString(base.Description);
}
return base.Description;
}
}
public override object TypeId
{
get
{
return typeof(DescriptionAttribute);
}
}
}
}
|