一个对记录类型数据的封装,类似表结构封装
调试环境:Visual Stdio 2005,C#.net
/// <summary>
/// 记录类型数据(表结构)
/// </summary>
public class DBRecordInfo
{
private IList<DBFieldInfo> fields;
protected string tableName;
protected string[] fieldNameItem;
public DBRecordInfo()
{
this.fields = new List<DBFieldInfo>();
GetTableMsg();
}
public DBRecordInfo(IList<DBFieldInfo> fields)
{
this.fields = fields;
GetTableMsg();
}
/// <summary>
/// 增加字段
/// </summary>
public bool Add(DBFieldInfo field)
{
try
{
this[field.FieldName] = field;
return true;
}
调试环境:Visual Stdio 2005,C#.net
/// <summary>
/// 记录类型数据(表结构)
/// </summary>
public class DBRecordInfo
{
private IList<DBFieldInfo> fields;
protected string tableName;
protected string[] fieldNameItem;
public DBRecordInfo()
{
this.fields = new List<DBFieldInfo>();
GetTableMsg();
}
public DBRecordInfo(IList<DBFieldInfo> fields)
{
this.fields = fields;
GetTableMsg();
}
/// <summary>
/// 增加字段
/// </summary>
public bool Add(DBFieldInfo field)
{
try
{
this[field.FieldName] = field;
return true;
}