/// <summary> /// 返回首列值清单 /// </summary> /// <param name="data">数据</param> /// <returns>首列值清单</returns> protected string[] GetValues(IDataWrapper data) { try { List <string> lst = new List <string>(); while (data.Read()) { object obj = data.GetValue(0); if (obj == DBNull.Value || obj == null) { lst.Add(null); } else { lst.Add(obj.ToString()); } } return(lst.ToArray()); } finally { data.Close(); } }
public object GetValue(IDataWrapper data, int fieldIndex, string fieldName) { switch (fieldName.ToLower()) { default: return(data.GetValue(fieldIndex)); } }
public object GetValue(IDataWrapper data, int fieldIndex, string fieldName) { return(data.GetValue(fieldIndex)); }