#region
using System.Collections.Generic;
using System.Reflection;
#endregion
namespace CSFrameworkV5.DataAccess
{
///
/// 公共字段(标准字段)管理类
///
public static class CommonFields
{
private static List _Fields;
///
/// 静态构造器
///
static CommonFields()
{
_Fields = new List();
//获取所有常量定义,字段名
var mi = typeof(CommonFields).GetMembers();
foreach (var M in mi)
if (M.MemberType == MemberTypes.Field)
_Fields.Add(M.Name);
}
///
/// 是否公共字段
///
/// 字段名
///
public static bool IsCommonField(string fieldName)
{
return _Fields.IndexOf(fieldName) >= 0;
}
///
/// 是否自增字段
///
///
///
public static bool IsIdentity(string fieldName)
{
return fieldName == isid;
}
///
/// 是否时间戳字段
///
///
///
public static bool IsTimeStamp(string fieldName)
{
return fieldName == TS;
}
#region 字段名常量定义
///
/// 用于Lookup组件显示的字段,如显示:C01 - 人民币,编号+名称
///
public const string LookupDisplayText = "LookupDisplayText";
///
/// 作为记录主键,自增字段
///
public const string isid = "isid";
///
/// 作为记录主键,自增字段
///
public const string ISID = "ISID";
///
/// 作为并发控制用途的字段,TS:TimeStamp类型
///
public const string TS = "TS";
///
/// 制单日期
///
public const string CreationDate = "CreationDate";
///
/// 制单人
///
public const string CreatedBy = "CreatedBy";
///
/// 最后修改日期
///
public const string LastUpdateDate = "LastUpdateDate";
///
/// 最后修改人
///
public const string LastUpdatedBy = "LastUpdatedBy";
///
/// 审核标记
///
public const string FlagApp = "FlagApp";
///
/// 审核人
///
public const string AppUser = "AppUser";
///
/// 审核日期
///
public const string AppDate = "AppDate";
///
/// 模块名
///
public const string AppNAME = "AppNAME";
#endregion
}
}