예제 #1
0
 public decimal PreencheAtributo(System.Data.IDataReader lDataReader, int NumeroColuna, decimal Atributo)
 {
     if ((lDataReader.IsDBNull(NumeroColuna) == true))
     {
         return(decimal.MinValue);
     }
     else
     {
         return(lDataReader.GetDecimal(NumeroColuna));
     }
 }
예제 #2
0
        public override int DrToInt32(System.Data.IDataReader dr, int index)
        {
            Type t = dr.GetFieldType(index);

            if (t.Equals(typeof(decimal)))
            {
                return(dr.IsDBNull(index) ? 0 : (int)dr.GetDecimal(index));
            }
            else if (t.Equals(typeof(Int32)))
            {
                return(dr.IsDBNull(index) ? 0 : (int)dr.GetInt32(index));
            }
            else
            {
                throw new NotImplementedException();
            }
        }
예제 #3
0
        public override float DrToFloat(System.Data.IDataReader dr, int index)
        {
            Type t = dr.GetFieldType(index);

            if (t.Equals(typeof(decimal)))
            {
                return(dr.IsDBNull(index) ? 0 : (float)dr.GetDecimal(index));
            }
            else if (t.Equals(typeof(double)))
            {
                return(dr.IsDBNull(index) ? 0 : (float)dr.GetDouble(index));
            }
            else if (t.Equals(typeof(float)))
            {
                return(dr.IsDBNull(index) ? 0 : dr.GetFloat(index));
            }
            throw new NotImplementedException();
        }
예제 #4
0
 public decimal GetDecimal(int i)
 {
     return(_innerReader.GetDecimal(i));
 }