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


C# IDataReader.GetInt方法代码示例

本文整理汇总了C#中IDataReader.GetInt方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.GetInt方法的具体用法?C# IDataReader.GetInt怎么用?C# IDataReader.GetInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDataReader的用法示例。


在下文中一共展示了IDataReader.GetInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Select

 /// <summary>
 ///  Mapea un IDataReader a una entidad Linea Base.
 /// </summary>
 /// <param name="reader">Interfas IDataReader</param>
 /// <returns>LineaBase</returns>
 public static LineaBase Select(IDataReader reader)
 {
     return new LineaBase
     {
         Id = reader.GetInt("CODIGO"),
         Nombre = reader.GetString("NOMBRE"),
         Descripcion = reader.GetString("DESCRIPCION"),
         ProyectoFase = new ProyectoFase { Id = reader.GetInt("CODIGO_PROYECTO_FASE"), Fase = new Fase { Nombre = reader.GetString("NOMBRE_FASE") } },
         Estado = reader.GetString("ESTADO"),
         FechaLiberacion = reader.GetDateTime("FECHA_LIBERACION")
     };
 }
开发者ID:berczeck,项目名称:TMD.GestionConfiguracion,代码行数:17,代码来源:LineaBaseMap.cs

示例2: Select

 public static ElementoConfiguracion Select(IDataReader reader)
 {
     return new ElementoConfiguracion
     {
         Id = reader.GetInt("CODIGO"),
         Nombre = reader.GetString("NOMBRE"),
         Descripcion = reader.GetString("DECRIPCION"),
         Fase = new Fase
         {
             Id = reader.GetInt("CODIGO_FASE")
         },
         Tipo = "DOC".Equals(reader.GetInt("TIPO")) ? TipoElementoConfiguracion.Documento : TipoElementoConfiguracion.Release
     };
 }
开发者ID:berczeck,项目名称:TMD.GestionConfiguracion,代码行数:14,代码来源:ElementoConfiguracionMap.cs

示例3: GetConcepts

 public override IEnumerable<IEntity> GetConcepts(Concept concept, IDataReader reader, KeyMasterOffset keyMaster)
 {
     var concepts = base.GetConcepts(concept, reader, keyMaster).ToList();
      if (concepts.Count > 0)
      {
     var baseConcept = concepts[0];
     var died = reader.GetInt(Died);
     if (died.HasValue && died.Value == 1)
     {
        yield return new Death((Entity) baseConcept) {Primary = true};
     }
     else //Medical claim diagnostic code indicating death
     {
         if (Concepts.Count() > 1)
         {
             for (int i = 1; i < Concepts.Count(); i++)
             {
                 foreach (var entity in PopulateDeath(reader, Concepts[i], baseConcept)) yield return entity;
             }
         }
         else
         {
             foreach (var entity in PopulateDeath(reader, Concepts[0], baseConcept)) yield return entity;
         }
     }
      }
 }
开发者ID:bradanton,项目名称:ETL-CDMBuilder,代码行数:27,代码来源:DeathDefinition.cs

示例4: Select

 /// <summary>
 /// Mapea un IDataReader a una entidad Proyecto.
 /// </summary>
 /// <param name="reader">Interfas IDataReader</param>
 /// <returns>Proyecto</returns>
 public static Proyecto Select(IDataReader reader)
 {
     return new Proyecto
     {
         Id = reader.GetInt("CODIGO"),
         Nombre = reader.GetString("NOMBRE"),
         Descripcion = reader.GetString("DESCRIPCION"),
         FechaInicio = reader.GetDateTime("FECHA_INICIO"),
         FechaFin = reader.GetDateTime("FECHA_FIN"),
         JefeProyecto = new Usuario
         {
              Id = reader.GetInt("CODIGO_JEFE_PROYECTO")
         },
         Estado = reader.GetString("ESTADO")
     };
 }
开发者ID:berczeck,项目名称:TMD.GestionConfiguracion,代码行数:21,代码来源:ProyectoDataMap.cs

示例5: Select

 /// <summary>
 /// Mapea un IDataReader a una entidad Fase.
 /// </summary>
 /// <param name="reader">Interfas IDataReader</param>
 /// <returns>Fase</returns>
 public static Fase Select(IDataReader reader)
 {
     return new Fase
     {
         Id = reader.GetInt("CODIGO"),
         Nombre = reader.GetString("NOMBRE")
     };
 }
开发者ID:berczeck,项目名称:TMD.GestionConfiguracion,代码行数:13,代码来源:FaseDataMap.cs

示例6: Select

 /// <summary>
 ///  Mapea un IDataReader a una entidad Usuario.
 /// </summary>
 /// <param name="reader">Interfas IDataReader</param>
 /// <returns>Usuario</returns>
 public static Usuario Select(IDataReader reader)
 {
     return new Usuario
     {
         Id = reader.GetInt("CODIGO"),
         Nombre = reader.GetString("NOMBRE")
     };
 }
开发者ID:berczeck,项目名称:TMD.GestionConfiguracion,代码行数:13,代码来源:UsuarioDataMap.cs

示例7: 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

示例8: AddRecord

        public override void AddRecord(IDataReader reader)
        {
            var prodcode = reader.GetInt("prodcode");

             var ndd = reader.GetDecimal("ndd");
             var quantity = reader.GetDecimal("qty");
             var numpacks = reader.GetInt("numpacks");
             var dayssupply = reader.GetInt("numdays");

             if (prodcode.HasValue && dayssupply.HasValue)
             {
            var key = CompositeKeyHelper.GetCprdDaysSupplyKey(prodcode.Value, ndd, quantity, numpacks);

            if (!lookup.ContainsKey(key))
            {
               lookup.Add(key, dayssupply.Value);
            }
             }
        }
开发者ID:bradanton,项目名称:ETL-CDMBuilder,代码行数:19,代码来源:DaysSupplyLookup.cs

示例9: GetConcepts

        public override IEnumerable<IEntity> GetConcepts(Concept concept, IDataReader reader, KeyMasterOffset keyMaster)
        {
            long? relevantConditionConceptId = 0;
             DateTime? endDate = null;

             if(Concepts.Length == 2)
             {
            var relevantConcepts = Concepts[1].GetValues(Vocabulary, Concepts[1].Fields[0], reader);

            if (relevantConcepts.Count > 0)
                relevantConditionConceptId = relevantConcepts.Min(c => c.ConceptId);
             }

             foreach (var c in base.GetConcepts(concept, reader, keyMaster))
             {
            var e = (Entity) c;

            var calculatedDaysSupply = GetDaysSupply(reader, e);
            if (!string.IsNullOrEmpty(EndDate))
            {
               if (calculatedDaysSupply > 0 && calculatedDaysSupply <= 365)
                  endDate = e.StartDate.AddDays(calculatedDaysSupply - 1);
               else
                  endDate = reader.GetDateTime(EndDate);
            }

            var refillString = reader.GetString(Refill);

            int? refill = null;

            if (!string.IsNullOrEmpty(refillString))
            {
               int refillValue;

               // in Optum Refill looks like: 01, 02...
               int.TryParse(refillString, out refillValue);

               refill = refillValue;
            }

            yield return new DrugExposure(e)
                            {
                               Id = keyMaster.DrugExposureId,
                               Refills = refill,
                               DaysSupply = reader.GetInt(DaysSupply),
                               CalculatedDaysSupply = calculatedDaysSupply,
                               Quantity = GetQuantity(reader),
                               RelevantConditionConceptId = relevantConditionConceptId,
                               EndDate = endDate == DateTime.MinValue ? null : endDate,
                               GetEraConceptIdsCall = Vocabulary.LookupIngredientLevel
                            };

             }
        }
开发者ID:bradanton,项目名称:ETL-CDMBuilder,代码行数:54,代码来源:DrugExposureDefinition.cs

示例10: Mapper

 internal BienDTO Mapper(IDataReader rd, BienDTO bien)
 {
     bien.IdBien = rd.GetInt("BIENID");
     bien.Description = rd.GetString("DESCRIPTION");
     bien.Latitude = rd.GetString("LATITUDE");
     bien.Longitude = rd.GetString("LONGITUDE");
     bien.Titre = rd.GetString("TITRE");
     //on fait volontairement le choix de ne pas charger le propriétaire ; il sera chargé à la demande.
     bien.Proprietaire = null;
     bien.Adresse = rd.GetString("ADRESSE");
     TypeBienDAO.Mapper(rd, bien);
     return bien;
 }
开发者ID:JeremyJacquemont,项目名称:SchoolProjects,代码行数:13,代码来源:BienDAO.cs

示例11: GetValues

        public List<LookupValue> GetValues(Vocabulary vocabulary, Field field, IDataReader reader)
        {
            if (!string.IsNullOrEmpty(field.ConceptId))
             {
            var conceptId = reader.GetInt(field.ConceptId);
            return new List<LookupValue> { new LookupValue { ConceptId = conceptId } };
             }

             var mapper = FindMapper(ConceptIdMappers, reader);

             if (mapper == null)
            return new List<LookupValue> { new LookupValue { ConceptId = field.DefaultConceptId } };

             var conceptKey = reader.GetString(field.Key);

             if (conceptKey == null) return new List<LookupValue>();

             return mapper.Map(vocabulary, field.Key, conceptKey, reader.GetDateTime(field.EventDate));
        }
开发者ID:bradanton,项目名称:ETL-CDMBuilder,代码行数:19,代码来源:Concept.cs

示例12: GetTypeId

        public int? GetTypeId(Field field, IDataReader reader)
        {
            if (!string.IsNullOrEmpty(field.TypeId))
             {
            return reader.GetInt(field.TypeId);
             }

             var mapper = FindMapper(TypeIdMappers, reader);
             if (mapper == null)
             {
            return field.DefaultTypeId;
             }

             var typeIds = mapper.Map(null, field.Key, reader[field.Key].ToString(), reader.GetDateTime(field.EventDate));

             if (typeIds.Count == 0)
            return null;

             return (int?)typeIds[0].ConceptId;
        }
开发者ID:bradanton,项目名称:ETL-CDMBuilder,代码行数:20,代码来源:Concept.cs

示例13: GetConcepts

        public override IEnumerable<IEntity> GetConcepts(Concept concept, IDataReader reader, KeyMasterOffset keyMaster)
        {
            var visitOccurrences = base.GetConcepts(concept, reader, keyMaster).ToList();

             if(visitOccurrences.Count > 0)
             {
            var id = reader.GetLong(Id);
            var visitOccurrence = new VisitOccurrence((Entity) visitOccurrences[0])
                                     {
                                        CareSiteId = reader.GetInt(CareSiteId) ?? 0
                                     };
            if(id.HasValue)
            {
               visitOccurrence.Id = id.Value;
            }
            else
            {
               visitOccurrence.IdUndefined = true;
            }

            yield return visitOccurrence;
             }
        }
开发者ID:bradanton,项目名称:ETL-CDMBuilder,代码行数:23,代码来源:VisitOccurrenceDefinition.cs

示例14: Mapper

        internal AgendaDTO Mapper(IDataReader rd, AgendaDTO agenda)
        {
            agenda.Date = rd.GetDateTime("DATEENTREE");
            agenda.Description = rd.GetString("DESCRIPTION");
            agenda.Titre = rd.GetString("TITRE");
            if (rd.GetNullableInt("PROSPECTPERSONNEID") != null) {
                ProspectDAO prospect = new ProspectDAO();
                agenda.Prospect = prospect.Charger(rd.GetInt("PROSPECTPERSONNEID"));
            }
            if (rd.GetNullableInt("AGENTPERSONNEID") != null) {
                AgentDAO agent = new AgentDAO();
                agenda.Agent = agent.Charger(rd.GetInt("AGENTPERSONNEID"));
            }
            if (rd.GetNullableInt("ANNONCEID") != null) {
                AnnonceDAO annonce = new AnnonceDAO();
                agenda.Annonce = annonce.Charger(rd.GetInt("ANNONCEID"));
            }
            agenda.IdAgenda = rd.GetInt("ID");

            return agenda;
        }
开发者ID:JeremyJacquemont,项目名称:SchoolProjects,代码行数:21,代码来源:AgendaDAO.cs

示例15: GetConcepts

        public override IEnumerable<IEntity> GetConcepts(Concept concept, IDataReader reader, KeyMasterOffset keyMaster)
        {
            long id;
             var idUndefined = false;
             if (string.IsNullOrEmpty(Id))
             {
            id = KeyMaster.GetProviderId();
            idUndefined = true;
             }
             else
             {
            id = reader.GetLong(Id).Value;
             }

             if (concept == null)
             {
            yield return new Provider
               {
                  Id = id,
                  CareSiteId = reader.GetInt(CareSiteId) ?? 0,
                  ProviderSourceValue = reader.GetString(ProviderSourceValue),
                  SourceValue = reader.GetString(SpecialtySourceValue)
               };
             }
             else
             {
            var conceptField = concept.Fields[0];

            var source = reader.GetString(conceptField.Key) ?? reader.GetString(conceptField.SourceKey);

            if (source != null && source.Length == 0)
               source = null;

            var specialtyConceptIds = concept.GetValues(Vocabulary, conceptField, reader).ToList();
            long? specialtyConcept = null;

            //(Unknown Physician Specialty)
            long defaultConceptId = 38004514;

            if (conceptField.DefaultConceptId.HasValue)
            {
               defaultConceptId = conceptField.DefaultConceptId.Value;
            }

            if (specialtyConceptIds.Count > 0)
            {
               specialtyConcept = specialtyConceptIds[0].ConceptId;
            }

            yield return new Provider
               {
                  Id = id,
                  IdUndefined = idUndefined,
                  CareSiteId = reader.GetInt(CareSiteId) ?? 0,
                  ConceptId = specialtyConcept.HasValue ? specialtyConcept.Value : defaultConceptId,
                  ProviderSourceValue = reader.GetString(ProviderSourceValue),
                  SourceValue =
                     string.IsNullOrEmpty(conceptField.SourceKey) ? source : reader.GetString(conceptField.SourceKey)
               };
             }
        }
开发者ID:bradanton,项目名称:ETL-CDMBuilder,代码行数:61,代码来源:ProviderDefinition.cs


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