CatalogData.cs
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:1k
- using System;
- using System.Data;
- namespace qminoa.Common.Data
- {
- /// <summary>
- /// CatalogData 的摘要说明。
- /// </summary>
- public class CatalogData : DataSet
- {
- //表格名称
- public const string CATALOG_TABLE_NAME = "CatalogData";
- public const string PK_FIELD = "pkid";
- public const string TABID_FIELD = "tabid";
- public const string INDEXID_FIELD = "indexid";
- public const string NAME_FIELD = "name";
- public const string DESCRIPTION_FIELD = "description";
- public const string URL_FIELD = "url";
- //构造函数
- public CatalogData()
- {
- BuildTable();
- }
- //创建数据结构表格
- private void BuildTable()
- {
- DataTable table = new DataTable(CATALOG_TABLE_NAME);
- DataColumnCollection cols = table.Columns;
- cols.Add(PK_FIELD,typeof(System.Int16));
- cols.Add(TABID_FIELD,typeof(System.String));
- cols.Add(INDEXID_FIELD,typeof(System.String));
- cols.Add(NAME_FIELD,typeof(System.String));
- cols.Add(DESCRIPTION_FIELD,typeof(System.String));
- cols.Add(URL_FIELD,typeof(System.String));
- Tables.Add(table);
- }
- }
- }