コード例 #1
0
        Dictionary <string, object> GetResult(IDataRow dataRow, List <string> fieldList)
        {
            var d = new Dictionary <string, object>();

            foreach (var field in fieldList)
            {
                d.Add(field, dataRow.GetValue(field));
            }
            d.Add(QueryFieldName, dataRow.GetValue(0).ToString());
            return(d);
        }
コード例 #2
0
        /// <summary>
        /// 获取当前指定成员名的数据
        /// </summary>
        /// <param name="dataMemberName">成员名</param>
        /// <returns>数据</returns>
        public object GetData(string dataMemberName)
        {
            IDataRow row = Current;

            if (null != row)
            {
                return(row.GetValue(dataMemberName));
            }
            throw new Exception("未指当前定到行");
        }
コード例 #3
0
        public bool IsMatch(IDataRow row)
        {
            var fieldValue = row.GetValue(fieldName);

            if (fieldValue == null && value == null)
            {
                return(true);
            }
            if (fieldValue == null)
            {
                return(false);
            }

            return(fieldValue.ToString().Equals(value, StringComparison.CurrentCultureIgnoreCase));
        }