public decimal PreencheAtributo(System.Data.IDataReader lDataReader, int NumeroColuna, decimal Atributo) { if ((lDataReader.IsDBNull(NumeroColuna) == true)) { return(decimal.MinValue); } else { return(lDataReader.GetDecimal(NumeroColuna)); } }
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(); } }
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(); }
public decimal GetDecimal(int i) { return(_innerReader.GetDecimal(i)); }