private object GetValueFromNTV(NTV ntv)
        {
            object result;

            if (ntv.Type == EbDbTypes.Int32)
            {
                result = Convert.ToDecimal(ntv.Value);
            }
            else if (ntv.Type == EbDbTypes.Int64)
            {
                result = Convert.ToDecimal(ntv.Value);
            }
            else if (ntv.Type == EbDbTypes.Int16)
            {
                result = Convert.ToDecimal(ntv.Value);
            }
            else if (ntv.Type == EbDbTypes.Decimal)
            {
                result = Convert.ToDecimal(ntv.Value);
            }
            else if (ntv.Type == EbDbTypes.String)
            {
                result = Convert.ToString(ntv.Value);
            }
            else if (ntv.Type == EbDbTypes.DateTime)
            {
                result = Convert.ToDateTime(ntv.Value);
            }
            else
            {
                result = Convert.ToString(ntv.Value);
            }
            return(result);
        }
        public override bool TryGetMember(GetMemberBinder binder, out object result)
        {
            string name = binder.Name;

            NTV ntv = this.Columns.Find(e => e.Name.Equals(name));

            if (ntv != null)
            {
                result = GetValueFromNTV(ntv);
                return(true);
            }

            result = null;
            return(false);
        }
 public object this[string name]
 {
     get
     {
         NTV ntv = this.Columns.Find(e => e.Name.Equals(name));
         if (ntv != null)
         {
             return(GetValueFromNTV(ntv));
         }
         else
         {
             return(null);
         }
     }
 }
 public void Add(NTV ntv)
 {
     this.Columns.Add(ntv);
 }
 public void Add(string name, NTV value)
 {
     dictionary[name] = value;
 }