Пример #1
0
        public PageManager(DataTable table)
        {
            mDataTable = table;
            mDataRule  = TableUtil.GetDataRule(mDataTable);

            this.SetPageInfo(TableUtil.GetPageInfo(table));
        }
Пример #2
0
        public void RemoveTable(DataTable table)
        {
            if (table != null && mDataTableList.Contains(table))
            {
                mDataTableList.Remove(table);

                DataRule dr = TableUtil.GetDataRule(table);
                if (dr != null)
                {
                    dr.OnRuleExceptionEvent -= new RuleExceptionEventHandle(SendRuleExceptionEvent);
                }
            }
        }
Пример #3
0
        public void ClearTable()
        {
            DataRule dr;

            foreach (DataTable table in mDataTableList)
            {
                dr = TableUtil.GetDataRule(table);
                if (dr != null)
                {
                    dr.OnRuleExceptionEvent -= new RuleExceptionEventHandle(SendRuleExceptionEvent);
                }
            }
            mDataTableList.Clear();
        }
Пример #4
0
        public void AddTable(DataTable table)
        {
            if (table != null && !mDataTableList.Contains(table))
            {
                TableUtil.SetProperty(table, AUTOCOMMIT, "1");
                mDataTableList.AddLast(table);

                DataRule dr = TableUtil.GetDataRule(table);
                if (dr != null)
                {
                    dr.OnRuleExceptionEvent -= new RuleExceptionEventHandle(SendRuleExceptionEvent);
                    dr.OnRuleExceptionEvent += new RuleExceptionEventHandle(SendRuleExceptionEvent);
                }
            }
        }