本文整理汇总了C#中IDataReader.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.GetString方法的具体用法?C# IDataReader.GetString怎么用?C# IDataReader.GetString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataReader
的用法示例。
在下文中一共展示了IDataReader.GetString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BaseTier
protected BaseTier(IDataReader dr, string prefix)
{
Id = dr.GetString($"{prefix}_id");
Name = dr.GetString($"{prefix}_name");
Number = dr.GetString($"{prefix}_cpcpnum");
WcLob = dr.GetString($"{prefix}_wc_lob_yn") == "W";
}
示例2: ReadRow
/// <summary>
/// Reads a single row from the results of this query.
/// </summary>
/// <param name="reader">The <see cref="IDataReader"/> to read from.</param>
/// <returns>The values read from the <see cref="IDataReader"/>.</returns>
protected override SchemaTableColumn ReadRow(IDataReader reader)
{
var retSchema = reader.GetString("TABLE_SCHEMA");
var retTable = reader.GetString("TABLE_NAME");
var retColumn = reader.GetString("COLUMN_NAME");
return new SchemaTableColumn(retSchema, retTable, retColumn);
}
示例3: Mapper
internal AgentDTO Mapper(IDataReader rd, AgentDTO agent)
{
base.Mapper(rd, agent);
agent.MotDePasse = rd.GetString("MOTDEPASSE");
agent.Login = rd.GetString("LOGIN");
return agent;
}
示例4: Airplane
public Airplane(IDataReader reader)
{
ID = reader.GetInt32(reader.GetOrdinal("id"));
seat = Util.parse<int>(reader.GetString(reader.GetOrdinal("seat")));
type = reader.GetString(reader.GetOrdinal("type"));
code = reader.GetString(reader.GetOrdinal("code"));
}
示例5: Person
public Person(IDataReader reader)
: this()
{
PersonId = reader.GetInt64(0);
if (!reader.IsDBNull(1))
PersonKey = reader.GetString(1);
if (!reader.IsDBNull(2))
RedirectPersonId = reader.ReadInt64OrNull(2);
if (!reader.IsDBNull(3))
SourceChannelId = reader.GetInt64(3);
if (!reader.IsDBNull(4))
Firstname = reader.GetString(4);
if (!reader.IsDBNull(5))
Lastname = reader.GetString(5);
if (!reader.IsDBNull(6))
DateOfBirth = reader.ReadDateTimeOrNull(6);
if (!reader.IsDBNull(7))
Locale = reader.GetString(7);
if (!reader.IsDBNull(8))
Gender = reader.GetString(8);
if (!reader.IsDBNull(9))
Timezone = reader.GetString(9);
if (!reader.IsDBNull(10))
DateCreated = reader.ReadDateTime(10);
}
示例6: LoadContents
protected override void LoadContents(IDbConnection connection, ref IDataReader reader)
{
try
{
var data_inicio = (DateTime)this.mParameters[0];
var data_fim = (DateTime)this.mParameters[1];
reader = DBAbstractDataLayer.DataAccessRules.MovimentoRule.Current.GetAllMovimentos(data_inicio, data_fim, connection);
}
catch (Exception e)
{
Debug.WriteLine(e);
throw;
}
var mov = default(Movimento);
movimentos = new List<Movimento>();
while (reader.Read())
{
mov = new Movimento();
mov.IDDocumento = reader.GetInt64(0);
mov.CodDocumento = reader.GetString(1);
mov.TituloDocumento = reader.GetString(2);
mov.IDMovimento = reader.GetInt64(3);
mov.TipoMovimento = reader.GetString(4);
mov.DataMovimento = reader.GetValue(5).ToString();
mov.Entidade = reader.GetString(6);
movimentos.Add(mov);
DoAddedEntries(1);
}
}
示例7: DocumentVersion
public DocumentVersion(IDataReader reader)
: this()
{
VersionId = reader.GetInt64(0);
DocumentId = reader.GetInt64(1);
MessageId = reader.ReadInt64OrNull(2);
Filename = reader.GetString(3);
SourceChannelId = reader.GetInt64(4);
TargetChannelId = reader.GetInt64(5);
From = new SourceAddress(reader.GetString(6));
To = new SourceAddressCollection(reader.GetString(7));
StreamName = reader.GetString(8);
Crc32 = reader.GetString(9);
Size = reader.GetInt32(10);
DateReceived = reader.ReadDateTimeOrNull(11);
DateSent = reader.ReadDateTimeOrNull(12);
DateCreated = reader.ReadDateTimeOrNull(13);
DateModified = reader.ReadDateTimeOrNull(14);
}
示例8: readSkillToCode
public SkillInfo readSkillToCode(int code)
{
sqlQuery = "select * from BasicSkillTable Where SkillCode = " + code.ToString();
dbcmd.CommandText = sqlQuery;
reader = dbcmd.ExecuteReader();
reader.Read ();
SkillInfo info = new SkillInfo ();
info.skillCode = reader.GetInt32 (0);
info.name = reader.GetString (1);
info.prefabName = reader.GetString (2);
info.attribute = reader.GetInt32 (3);
info.demage = reader.GetInt32 (4);
info.numberOfObject = reader.GetInt32 (5);
info.coolTime = reader.GetFloat (6);
info.useLimit = reader.GetInt32 (7);
info.etc1 = reader.GetInt32(8);
info.etc2 = reader.GetInt32(9);
info.etc3 = reader.GetInt32(10);
info.ICon = reader.GetString(11);
reader.Close();
reader = null;
return info;
}
示例9: ModuleInfo
/// <summary>
/// Initializes a new instance of the ModuleInfo class (Overloaded constructor)
/// </summary>
/// <param name="rdr">
/// Safe DataReader
/// </param>
public ModuleInfo(IDataReader rdr)
{
mID = rdr.GetInt64(rdr.GetOrdinal("ID"));
mName = rdr.GetString(rdr.GetOrdinal("ModuleName"));
// mDescription = rdr.GetString("Description");
mIsEnabled = rdr.GetString(rdr.GetOrdinal("IsEnabled")).Equals("A");
mStatus = rdr.GetString(rdr.GetOrdinal("Status"));
}
示例10: MeetingRoom
private MeetingRoom(IDataReader reader)
{
this.Id = reader.GetInt32(0);
this.Name = reader.GetString(1);
this.Capacity = reader.GetInt32(2);
this.Beacon = reader.IsDBNull(3) ? null : reader.GetString(3);
this.Timezone = reader.IsDBNull(4) ? null : reader.GetString(4);
}
示例11: fillPermission
private static Permission fillPermission(IDataReader arg)
{
Permission p = new Permission();
p.Name = arg.GetString(0);
p.Description = arg.GetString(1);
return p;
}
示例12: DbView
/// <summary>
///
/// </summary>
/// <param name="databaseId"></param>
/// <param name="reader"></param>
internal DbView(Guid databaseId, IDataReader reader)
: this(databaseId, reader.GetString(reader.GetOrdinal("Id")),
reader.GetString(reader.GetOrdinal("CatalogName")),
reader.GetString(reader.GetOrdinal("SchemaName")),
reader.GetString(reader.GetOrdinal("Name")),
reader.GetNullableString("Description"))
{
}
示例13: MapRow
/// <summary>
/// Maps values stripped from the supplied <paramref name="results"/>
/// object into an <see cref="SpringAir.Domain.Airport"/> instance.
/// </summary>
/// <param name="results">
/// The <see cref="System.Data.IDataReader"/> containing the result values.
/// </param>
/// <param name="rowNumber">
/// The number of the current row.
/// </param>
/// <returns>
/// An <see cref="SpringAir.Domain.Airport"/> instance containing the results
/// of the mapping.
/// </returns>
public object MapRow(IDataReader results, int rowNumber)
{
long id = results.GetInt32(0);
string code = results.GetString(1);
string city = results.GetString(2);
string description = results.GetString(3);
return new Airport(id, code, city, description);
}
示例14: CrearEntidad
public static TipoAmbiente CrearEntidad(IDataReader lector)
{
var aux = new TipoAmbiente();
aux.Id = lector.GetString(0);
aux.Descripcion = lector.GetString(1);
aux.Estado = lector.GetString(2);
return aux;
}
示例15: Mapper
internal PersonneDTO Mapper(IDataReader rd, PersonneDTO personne)
{
personne.Nom = rd.GetString("NOM");
personne.Prenom = rd.GetString("PRENOM");
personne.Telephone = rd.GetString("TELEPHONE");
personne.IdPersonne = rd.GetInt("ID");
return personne;
}