解决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 sealed class WebCategoryAttribute : CategoryAttribute
{
// Methods
internal WebCategoryAttribute(string category)
: base(category)
{
}
protected override string GetLocalizedString(string value)
{
string localizedString = base.GetLocalizedString(value);
if (localizedString == null)
{
localizedString = SR.GetString("Category_" + value);
}
return localizedString;
}
// Properties
public override object TypeId
{
get
{
return typeof(CategoryAttribute);
}
}
}
}
|