/// <remarks>expand access</remarks> public object this[int indx, TLColumnInfo col] { get { return(col?.GetRowValue(Data[indx])); } set { if (col.Index > 0) { col?.SetRowValue(Data[indx], value); if (col.DrillDown.Count == 0) { SetRowState(indx, TLRowState.Changed); } } } }
public static TableList <T> GetTableList <T>(this IDataProvider dp, bool newConn, IDataCommand command, int capacity = 0) { TableList <T> result = null; dp.Read(newConn, command, x => { var tlc = new TLColumnInfo[x.FieldCount]; for (var i = 0; i < tlc.Length; i++) { tlc[i] = new TLColumnInfo(x.GetFieldName(i), x.GetFieldType(i)); } result = new TableList <T>(tlc) { Capacity = capacity }; } , x => { var v = result.Load((T)x.Get(0)); for (var i = 1; i < v.Length; i++) { v[i] = x.Get(i); } }); return(result); }
public _PropertyDescriptor(TLColumnInfo ci) : base(ci.Name, null) { this.ci = ci; }