一步一步建立我的MIS系统:数据表管理TableMan

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

using EwEAI.Data;

namespace EwEAI.Business.Classes.IT
{
    public class TableMan:BusinessObject
    {
        public TableMan()
            : base("Tables")
        {
        }

        protected override void ProcessBusinessFlow(System.Data.DataSet set)
        {
            //throw new Exception("The method or operation is not implemented.");
        }

        protected override void AfterFill()
        {
            TableTable.ChildRelations.Add(new DataRelation("字段",
                    TableTable.Columns["TableName"],
                    FieldTable.Columns["TableName"]
                )
              );

            _TableCaptions["Tables"] = "表管理";
            _TableCaptions["Fields"] = "字段管理";
        }

        protected override void InializeStruct()
        {
            //表权限
            ChildData AChild = new ChildData(new DataObject("Fields", IT.UserMan.UserName),
                "字段",
                new string[] { "TableName" },
                new string[] { "TableName" },
                TableName);

            Children[AChild.TableName] = AChild;
    
        }

        public DataTable TableTable
        {
            get
            {
                return BusinessData.Tables["Tables"];
            }
        }

        public DataTable FieldTable
        {
            get
            {
                return BusinessData.Tables["Fields"];
            }
        }
    }
}

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页