当前位置: 首页>>代码示例>>C#>>正文


C# IDataReader.GetString方法代码示例

本文整理汇总了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";
 }
开发者ID:briandarley,项目名称:ClientImport,代码行数:7,代码来源:BaseTier.cs

示例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);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:12,代码来源:MySqlFindForeignKeysQuery.cs

示例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;
 }
开发者ID:JeremyJacquemont,项目名称:SchoolProjects,代码行数:7,代码来源:AgentDAO.cs

示例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"));
 }
开发者ID:KommuSoft,项目名称:CplKul2012,代码行数:7,代码来源:Airplane.cs

示例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);
        }
开发者ID:Klaudit,项目名称:inbox2_desktop,代码行数:35,代码来源:Person.cs

示例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);
            }
        }
开发者ID:aureliopires,项目名称:gisa,代码行数:32,代码来源:RelatorioTodosMovimentos.cs

示例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);
        }
开发者ID:Klaudit,项目名称:inbox2_desktop,代码行数:25,代码来源:DocumentVersion.cs

示例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;
    }
开发者ID:kms1837,项目名称:Non_Name_Project,代码行数:29,代码来源:DBmanager.cs

示例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"));
 }
开发者ID:skgw,项目名称:GWHRA,代码行数:14,代码来源:ModuleInfo.cs

示例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);
 }
开发者ID:rogerthat-platform,项目名称:rogerthat-api-dotnet,代码行数:8,代码来源:MeetingRoom.cs

示例11: fillPermission

 private static Permission fillPermission(IDataReader arg)
 {
     Permission p = new Permission();
     p.Name = arg.GetString(0);
     p.Description = arg.GetString(1);
     
     return p;
 }
开发者ID:Mr0Cake,项目名称:Permission-Granter,代码行数:8,代码来源:UIBLL.cs

示例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"))
 {
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:13,代码来源:DbView.cs

示例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);
		}
开发者ID:ouyangyl,项目名称:MySpringNet,代码行数:22,代码来源:AirportMapper.cs

示例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;
 }
开发者ID:cealer,项目名称:Colegio,代码行数:8,代码来源:TipoAmbienteAD.cs

示例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;
 }
开发者ID:JeremyJacquemont,项目名称:SchoolProjects,代码行数:8,代码来源:PersonneDAO.cs


注:本文中的IDataReader.GetString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。