public PageManager(DataTable table) { mDataTable = table; mDataRule = TableUtil.GetDataRule(mDataTable); this.SetPageInfo(TableUtil.GetPageInfo(table)); }
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); } } }
public void ClearTable() { DataRule dr; foreach (DataTable table in mDataTableList) { dr = TableUtil.GetDataRule(table); if (dr != null) { dr.OnRuleExceptionEvent -= new RuleExceptionEventHandle(SendRuleExceptionEvent); } } mDataTableList.Clear(); }
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); } } }