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