예제 #1
0
 /// <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));
 }
예제 #2
0
        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);
        }
예제 #3
0
 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);
     }
 }