Beispiel #1
0
        public IList <ADM_ATENCION> GetAllFilters(ADM_ATENCION entity)
        {
            List <ADM_ATENCION> atenciones = new List <ADM_ATENCION>();

            using (var comando = _database.GetStoredProcCommand(string.Format("{0}{1}", ConectionStringRepository.EsquemaName, "p_ADM_PACIENTE_GetAllFilter")))
            {
                _database.AddInParameter(comando, "@id_paciente", DbType.Int32, entity.id_paciente);
                _database.AddInParameter(comando, "@d_fecha_registro_1", DbType.DateTime, entity.d_fecha_registro_1);
                _database.AddInParameter(comando, "@d_fecha_registro_2", DbType.DateTime, entity.d_fecha_registro_2);



                using (var lector = _database.ExecuteReader(comando))
                {
                    while (lector.Read())
                    {
                        atenciones.Add(new ADM_ATENCION
                        {
                            id_nro_interno  = lector.IsDBNull(lector.GetOrdinal("id_nro_interno")) ? default(int) : lector.GetInt64(lector.GetOrdinal("id_nro_interno")),
                            d_fecha_ingreso = lector.IsDBNull(lector.GetOrdinal("d_fecha_ingreso")) ? default(DateTime) : lector.GetDateTime(lector.GetOrdinal("d_fecha_ingreso")),
                            tipo_paciente   = lector.IsDBNull(lector.GetOrdinal("tipo_paciente")) ? default(string) : lector.GetString(lector.GetOrdinal("tipo_paciente")),
                            tipo_atencion   = lector.IsDBNull(lector.GetOrdinal("tipo_atencion")) ? default(string) : lector.GetString(lector.GetOrdinal("tipo_atencion")),
                            garante         = lector.IsDBNull(lector.GetOrdinal("garante")) ? default(string) : lector.GetString(lector.GetOrdinal("garante")),
                            contratante     = lector.IsDBNull(lector.GetOrdinal("t_direccion")) ? default(string) : lector.GetString(lector.GetOrdinal("t_direccion")),
                            estado          = lector.IsDBNull(lector.GetOrdinal("estado")) ? default(string) : lector.GetString(lector.GetOrdinal("estado")),
                        });
                    }
                }
            }

            return(atenciones);
        }
Beispiel #2
0
 public int Update(ADM_ATENCION entity)
 {
     throw new NotImplementedException();
 }
Beispiel #3
0
 public IList <ADM_ATENCION> GetById(ADM_ATENCION entity)
 {
     throw new NotImplementedException();
 }
Beispiel #4
0
 public IList <ADM_ATENCION> GetAllFilters(ADM_ATENCION entity)
 {
     return(ADM_ATENCIONRepository.Instancia.GetAllFilters(entity));
 }
Beispiel #5
0
 public bool Exists(ADM_ATENCION entity)
 {
     throw new NotImplementedException();
 }