Ejemplo n.º 1
0
        private void Fill(out Ingresos oObj, NullableDataReader dr)
        {
            AuxiliaresDatos oAuxDao = new AuxiliaresDatos();

            oObj = new Ingresos(dr.GetNullableByte("idTipoIngreso") == null ? null : oAuxDao.Traer_TipoIngreso(dr.GetByte("idTipoIngreso")),
                                dr.GetNullableDateTime("fechaIngreso"),
                                this.TraeIngresadosXFechaMovimiento(dr.GetInt64("id_Beneficiario"), dr.GetInt16("codPrestacion"), dr.GetDateTime("fechaIngreso")),
                                dr.GetNullableString("observacion") == null ? "" : dr.GetString("observacion")
                                );
        }
Ejemplo n.º 2
0
 private void Fill(out Devolucion oObj, NullableDataReader dr)
 {
     oObj = new Devolucion(dr.GetDateTime("fechaMovimiento"),
                           dr.GetNullableString("destino") == null  ? "" : dr.GetString("destino"),
                           dr.GetNullableString("Observaciones") == null?"":dr.GetString("Observaciones"),
                           dr.GetNullableString("Certificado") == null ? "" : dr.GetString("Certificado"),
                           this.TraeFaltanteDevolucionXFechaMovimiento(dr.GetInt64("id_Beneficiario"), dr.GetInt16("codPrestacion"), dr.GetDateTime("fechaMovimiento").ToShortDateString()),
                           dr.GetNullableDateTime("fechaNotificacion"),
                           dr.GetNullableDateTime("fechaPresentacion")
                           );
 }
Ejemplo n.º 3
0
 private void Fill(out NotificacionesVencidas oObj, NullableDataReader dr)
 {
     oObj = new NotificacionesVencidas(dr.GetInt64("id_Beneficiario")
                                       , dr.GetString("NomApe")
                                       , dr.GetInt16("codPrestacion")
                                       , dr.GetString("DescripcionPrestacion")
                                       , dr.GetDateTime("fechaMovimiento")
                                       , dr.GetString("destino")
                                       , dr.GetString("observaciones")
                                       , dr.GetString("certificado")
                                       , dr.GetNullableDateTime("fechaNotificacion")
                                       );
 }
Ejemplo n.º 4
0
 private void Fill(out Documento_Causante oObj, NullableDataReader dr)
 {
     oObj = new Documento_Causante(dr.GetInt64("id_Beneficiario"),
                                   dr.GetString("numDoc"),
                                   dr.GetInt16("codigoDocumento"),
                                   dr.GetString("abrevDTDoc"),
                                   dr.GetBoolean("docADP"),
                                   dr.GetNullableString("abrevPais") == null ? "" : dr.GetString("abrevPais"),
                                   dr.GetNullableInt16("PaisPK"),
                                   dr.GetDateTime("fechaAlta"),
                                   dr.GetNullableDateTime("fechaBaja")
                                   );
 }
Ejemplo n.º 5
0
        public static NovedadRechazada GetObject(NullableDataReader ds)
        {
            NovedadRechazada result = new NovedadRechazada();

            result.FechaContacto         = ds.GetDateTime("fContacto");
            result.Idnovedad             = ds.GetInt64("idnovedad");
            result.Ip                    = ds.GetString("ip");
            result.Observaciones         = ds.GetString("observaciones");
            result.ContactoSatisfactorio = ds.GetBoolean("contactoSatisfactorio");
            result.OficinaContacto       = ds.GetString("oficinaContacto");
            result.Usuario               = ds.GetString("usuario");

            return(result);
        }
Ejemplo n.º 6
0
 private void Fill(out SolicitudesEFechasSolicitud oObj, NullableDataReader dr)
 {
     oObj = new SolicitudesEFechasSolicitud(
         dr.GetInt64("id_Beneficiario")
         , dr.GetInt16("codPrestacion")
         , dr.GetString("ApeNomCompleto")
         , dr.GetNullableString("cuip") == null ? "" : dr.GetString("cuip")
         , dr.GetString("DescripcionPrestacion")
         , dr.GetInt16("pais_PK")
         , dr.GetString("PaisDescCompleto")
         , dr.GetBoolean("Mercosur")
         , dr.GetString("referencia_exterior")
         , dr.GetString("ubicacion_Fisica")
         , dr.GetDateTime("fAMSolicitud")
         , dr.GetDateTime("fechaIngreso")
         );
 }
Ejemplo n.º 7
0
        public static List <Novedad> TraeCuotas(long idNovedad, long idPrestador)
        {
            List <Novedad> listNovedades = new List <Novedad>();

            string    sql       = "Cuotas_Traer";
            Database  db        = DatabaseFactory.CreateDatabase("DAT_V01");
            DbCommand dbCommand = db.GetStoredProcCommand(sql);

            try
            {
                db.AddInParameter(dbCommand, "@IdNovedad", DbType.Int64, idNovedad);
                db.AddInParameter(dbCommand, "@IdPrestador", DbType.String, idPrestador);

                using (NullableDataReader ds = new NullableDataReader(db.ExecuteReader(dbCommand)))
                {
                    while (ds.Read())
                    {
                        Novedad oNovedad = new Novedad();

                        oNovedad.IdNovedad      = ds.GetInt64("idNovedad");
                        oNovedad.UnBeneficiario = new Beneficiario(long.Parse(ds.GetInt64("idBeneficiario").ToString()), 0,
                                                                   ds.GetString("apellidoNombre"));
                        oNovedad.UnPrestador    = new Prestador();
                        oNovedad.UnPrestador.ID = ds.GetInt64("idPrestador");
                        oNovedad.UnTipoConcepto = new TipoConcepto(byte.Parse(ds.GetValue("TipoConcepto").ToString()),
                                                                   ds.GetString("descTipoConcepto"));

                        oNovedad.UnConceptoLiquidacion = new ConceptoLiquidacion(ds.GetInt32("codConceptoLiq"),
                                                                                 ds.GetString("descConceptoLiq"));

                        oNovedad.UnConceptoLiquidacion.CodSidif    = ds.GetNullableInt32("codSidif");
                        oNovedad.UnConceptoLiquidacion.Obligatorio = ds.GetBoolean("obligatorio");

                        oNovedad.FechaNovedad   = (ds.GetNullableDateTime("fecNov") == null ? new DateTime() : ds.GetDateTime("fecNov"));
                        oNovedad.ImporteTotal   = double.Parse(ds.GetValue("importeTotal").ToString());
                        oNovedad.CantidadCuotas = byte.Parse(ds.GetValue("cantCuotas").ToString());
                        //ds.GetInt16("nroCuota");
                        //ds.GetDouble("importeCuota");
                        oNovedad.FechaImportacion = ds.GetNullableDateTime("fecImportacionCuota");
                        //ds.GetInt32("mensualCuota");
                        //ds.GetInt32("importeLiq");
                        //ds.GetString("descEstadoNov");
                        //ds.GetInt32("idEstadoNov");
                        oNovedad.UnEstadoReg = new Estado(int.Parse(ds.GetValue("idEstadoReg").ToString()),
                                                          ds.GetString("descripcionEstadoReg"));

                        listNovedades.Add(oNovedad);
                    }
                }

                return(listNovedades);
            }
            catch (Exception ex)
            {
                log.Error(string.Format("{0}->{1}-> Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message));
                throw ex;
            }
            finally
            {
                db = null;
                dbCommand.Dispose();
            }
        }
Ejemplo n.º 8
0
        public List <SolicitudVamosPaseo> Solicitud_TraerXBeneficiario(long idBeneficiario)
        {
            sql = "VamosDePaseo_solicitud_Trae_Beneficiario";
            Database  db        = DatabaseFactory.CreateDatabase("DAT_V01");
            DbCommand dbCommand = db.GetStoredProcCommand(sql);
            List <SolicitudVamosPaseo> lstSol = new List <SolicitudVamosPaseo>();

            db.AddInParameter(dbCommand, "@idBeneficiario", DbType.Int64, idBeneficiario);
            dbParametros = dbCommand.Parameters;

            try
            {
                using (NullableDataReader ds = new NullableDataReader(db.ExecuteReader(dbCommand)))
                {
                    while (ds.Read())
                    {
                        SolicitudVamosPaseo oSol = new SolicitudVamosPaseo();
                        oSol.IdSolicitud       = ds.GetInt64("IdSolicitud");
                        oSol.CantCuotas        = ds.GetByte("CantCuotas");
                        oSol.FIngresoSolicitud = ds["fIngresoSolicitud"].Equals(DBNull.Value) ? new DateTime() : DateTime.Parse(ds["fIngresoSolicitud"].ToString());
                        oSol.MensualSolicitud  = ds.GetInt32("MensualSolicitud");
                        oSol.ImporteTotal      = ds.GetDecimal("ImporteTotal");
                        oSol.ImporteFinanciado = ds.GetDecimal("ImporteFinanciado");
                        oSol.FDesde            = ds["fDesde"].Equals(DBNull.Value) ? new DateTime() : DateTime.Parse(ds["fDesde"].ToString());
                        oSol.FHasta            = ds["fHasta"].Equals(DBNull.Value) ? new DateTime() : DateTime.Parse(ds["fHasta"].ToString());
                        oSol.Destino           = ds.GetString("Destino");
                        oSol.Oficina           = ds.GetString("oficina");
                        oSol.Usuario           = ds.GetString("usuario");

                        oSol.UnaAuditoria         = new Auditoria();
                        oSol.UnaAuditoria.Usuario = ds.GetString("usuario");
                        oSol.UnaAuditoria.IP      = ds.GetString("ip");


                        oSol.UnBeneficiario = new Beneficiario();
                        oSol.UnBeneficiario.ApellidoNombre = ds.GetString("ApellidoNombre");
                        oSol.UnBeneficiario.Cuil           = long.Parse(ds.GetString("cuil"));
                        oSol.UnBeneficiario.IdBeneficiario = ds.GetInt64("IdBeneficiario");

                        oSol.UnEstado          = new Estado();
                        oSol.UnEstado.IdEstado = ds.GetByte("IdEstado");

                        oSol.AgenciaMayorista             = new Agencia();
                        oSol.AgenciaMayorista.IdAgencia   = ds.GetInt32("idAgencia");
                        oSol.AgenciaMayorista.Descripcion = ds.GetString("descripcion");
                        oSol.AgenciaMayorista.Cuit        = ds.GetString("cuit");
                        oSol.AgenciaMayorista.NroCuenta   = ds.GetString("NroCuenta");
                        oSol.AgenciaMayorista.EsMayorista = true;

                        oSol.AgenciaMinorista             = new Agencia();
                        oSol.AgenciaMinorista.IdAgencia   = ds.GetInt32("idAgenciaAMin");
                        oSol.AgenciaMinorista.NroLegajo   = ds.GetInt32("NroLegajoAMin");
                        oSol.AgenciaMinorista.NroCuenta   = ds.GetString("NroCuentaAMin");
                        oSol.AgenciaMinorista.Cuit        = ds.GetString("cuitAMin");
                        oSol.AgenciaMinorista.Descripcion = ds.GetString("descripcionAMin");
                        oSol.AgenciaMinorista.EsMayorista = false;

                        lstSol.Add(oSol);
                    }
                }

                return(lstSol);
            }
            catch (Exception ex)
            {
                log.Error(string.Format("{0}->{1}->Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message));
                throw new Exception("Error en SolicitudVamosPaseoDAO.Solicitud_TraerXBeneficiario", ex);
            }
            finally
            {
                db = null;
                dbCommand.Dispose();
            }
        }