using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BP.En.FrmUI { /// /// 级联 /// public class Connection { /// /// 主表字段 /// public string KeyOfEn = null; /// /// 联动字段 /// public string RelKeyOfEn = null; /// /// 联动的数据源 /// public string SQL = null; /// /// 构造 /// public Connection() { } } /// /// 级联s /// public class Connections : System.Collections.CollectionBase { /// /// 构造 /// public Connections() { } /// /// 获得数据 /// /// /// public Connection this[int index] { get { return this.InnerList[index] as Connection; } } /// /// 增加级联关系. /// /// /// /// public void Add(string keyOfEn, string refKeyOfEn, string sql) { Connection en = new Connection(); en.KeyOfEn=keyOfEn; en.RelKeyOfEn = refKeyOfEn; en.SQL = sql; } } }