/// <summary> /// 获取分组值 /// </summary> /// <param name="holder"></param> /// <param name="table"></param> /// <param name="valueIndex"></param> /// <returns></returns> public object GetGroupValue(GroupDataHolder holder, DataTable table, int valueIndex) { if (ReusedKey == null) { ReusedKey = SearchKey.FindReusedKey(TplGroupColumnName); } return(ReusedKey.GetReusedValue(table, valueIndex)); }
public static ReusedKey FindReusedKey(string keyName) { foreach (var reusedKey in ReusedKeyPool) { if (Equals(reusedKey.KeyName, keyName)) { return(reusedKey); } } var item = new ReusedKey { KeyName = keyName }; ReusedKeyPool.Add(item); return(item); }
public void FillKey(DataTable table, int rowIndex) { if (!IsFixedValue) { if (string.IsNullOrEmpty(KeyName)) { KeyValue = null; } if (ReusedKey == null) { ReusedKey = FindReusedKey(KeyName); } KeyValue = ReusedKey.GetReusedValue(table, rowIndex); } if (NextKey != null) { NextKey.FillKey(table, rowIndex); } }