Example #1
0
    //protected void gv_Grilla_DataBound(object sender, EventArgs e)
    //{
    //    try
    //    {
    //        BindDdl();
    //    }
    //    catch (Exception ex)
    //    {
    //        if (log.IsErrorEnabled)
    //            log.ErrorFormat("Se generó una excepción : {0}", ex.Message);
    //        throw ex;
    //    }
    //}

    protected void gv_Grilla_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName.Equals("Insert"))
            {
                DropDownList ddlFrecuente = gv_Grilla.FooterRow.FindControl("Frecuente") as DropDownList;
                TextBox txtWebSite = gv_Grilla.FooterRow.FindControl("WebSite") as TextBox;
                TextBox txtDescripcion = gv_Grilla.FooterRow.FindControl("Descripcion") as TextBox;

                
                string msjError = "";

                //Alta
                InvocaWsDao.AMBanco(null, ddlFrecuente.SelectedValue.Equals("S") ? true : false, txtDescripcion.Text, txtWebSite.Text , out msjError);

                VariableSession.oTipoDocumentacion_Prestacion = null;

                mensaje.QuienLLama = "btnAlerta";
                mensaje.TipoMensaje = Mensaje.infoMensaje.Alerta;
                mensaje.DescripcionMensaje = "La nueva asignación de documentación se ha cargado correctamente.";
                mensaje.Mostrar();

                LlenaGrilla(string.Empty, string.Empty);

            }
        }
        catch (Exception err)
        {
            if (log.IsErrorEnabled)
                log.ErrorFormat("Se generó una excepción : {0}", err.Message);

            throw err;
        }
    }
Example #2
0
    private void cargarDevolucionesNotificadasVencidas(Int64 pageNum)
    {
        string mensaje = "";

        //PageNum = 1;
        PageSize = long.Parse(ConfigurationManager.AppSettings["RowsPorPagina"].ToString());
        Int64 Total;
        List <NotificacionesVencidas> n = null;

        n = InvocaWsDao.TraeDevolucionesNotificadasVencidasXPlazo(pageNum, PageSize, 1, out Total, out mensaje);

        TotalRowsNum             = Total;
        txtPageTotalRowsNum.Text = TotalRowsNum.ToString();

        MError.MensajeError = mensaje;
        if (n != null && n.Count > 0)
        {
            sesNotificacionesVencidas = (List <NotificacionesVencidas>)n;
            gridListadoDevolucionesNotificadasVencidas.DataSource = (DataTable)ToDatatable.toDataTable(n);
            gridListadoDevolucionesNotificadasVencidas.DataBind();
            divListadoNoNotificados.Visible = true;
            dvNoDevNotifVencidas.Visible    = false;
            btnToExcell.Visible             = true;
            Navigation(TotalRowsNum);
        }
        else
        {
            divListadoNoNotificados.Visible = false;
            dvNoDevNotifVencidas.Visible    = true;
            btnToExcell.Visible             = false;
            lblTotalPages.Text = "0";
        }
    }
Example #3
0
    protected void gv_Grilla_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName.Equals("Insert"))
            {
                TextBox tbDescripcion = gv_Grilla.FooterRow.FindControl("Descripcion") as TextBox;

                TipoDocumentacion tDoc = new TipoDocumentacion();

                tDoc.Descripcion = tbDescripcion.Text;
                string mensajeer = "";

                InvocaWsDao.AMTiposdeDocumentacion(null, tDoc.Descripcion, out mensajeer);

                mensaje.QuienLLama         = "btnAlerta";
                mensaje.TipoMensaje        = Mensaje.infoMensaje.Alerta;
                mensaje.DescripcionMensaje = "La nueva linea se ha cargado correctamente.";
                mensaje.Mostrar();

                LstTiposDocumentacion.Add(tDoc);
                LlenaGrilla(string.Empty, string.Empty);
            }
        }
        catch (Exception err)
        {
            if (log.IsErrorEnabled)
            {
                log.ErrorFormat("Se generó una excepción : {0}", err.Message);
            }

            throw err;
        }
    }
Example #4
0
    private void TraeNotasXBeneficiario(Int64 Id_Beneficiario)
    {
        string mensajeer = string.Empty;
        List <BeneficiarioNotas> _Notas = InvocaWsDao.TraeBeneficiario_Notas(Id_Beneficiario, out mensajeer);

        if (mensajeer.Equals(string.Empty))
        {
            if (_Notas.Count == 0)
            {
                dvShowNotasOld.Visible = false;
            }
            else
            {
                //rptNotas.DataSource = ToDatatable.toDataTable( _Notas);
                rptNotas.DataSource = _Notas;
                rptNotas.DataBind();
                dvShowNotasOld.Visible = true;
            }
        }
        else
        {
            MError.MensajeError    = "Ocurrió un error al traer las notas del solicitante";
            dvShowNotasOld.Visible = false;
        }
    }
Example #5
0
    protected void gv_Grilla_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        try
        {
            IndexGrilla = UtilsPresentacionX5.CalcularIndiceGrilla(gv_Grilla, e.RowIndex);
            GridViewRow row = gv_Grilla.Rows[e.RowIndex];

            TextBox tbWebSite = row.FindControl("WebSite") as TextBox;

            DropDownList ddlFrecuente = row.FindControl("Frecuente") as DropDownList;

            TextBox tbDescripcion = row.FindControl("Descripcion") as TextBox;

            
            //Modificar
            string mensajeer = "";
            InvocaWsDao.AMBanco(LstDatosBancos[IndexGrilla].Id_Banco, ddlFrecuente.SelectedValue.Equals("S") ? true : false, tbDescripcion.Text, tbWebSite.Text, out mensajeer);

            gv_Grilla.EditIndex = -1;

            //LlenaGrilla(busquedaGrilla.BusquedaSeleccionada(), busquedaGrilla.BusquedaIngresada());
            LlenaGrilla(string.Empty, string.Empty);
        }
        catch (Exception ex)
        {
            if (log.IsErrorEnabled)
                log.ErrorFormat("Se generó una excepción : {0}", ex.Message);
            throw ex;
        }
    }
Example #6
0
    private void GrabarModificaciones()
    {
        int mensajeTot = 0;

        foreach (DataRow dr in ListaChecks.Rows)
        {
            string mensaje = "";
            InvocaWsDao.ModificaPais(Int32.Parse(dr["Pais_PK"].ToString()), Boolean.Parse(dr["Check"].ToString()), out mensaje);
            if (!mensaje.Equals(string.Empty))
            {
                mensajeTot = mensajeTot + 1;
            }
        }
        if (mensajeTot == 0)
        {
            ListaChecks = null;
            //Resetea la session para traer las modificaxciones
            VariableSession.oPaisConvenios = null;
            VariableSession.oPaisTodos     = null;
            MError.MensajeError            = "";
        }
        else
        {
            MError.MensajeError = mensajeTot.ToString() + " países no pudieron modificarse por un error inesperado.</br> Revise el Log para mayor detalle.";
        }
    }
Example #7
0
    protected void rptSolicitudes_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        RepeaterItem item = e.Item; // elemento del Repeater

        ConsultasWS.Movimiento_Solicitud oMov = null;
        if (item.ItemType == ListItemType.AlternatingItem || item.ItemType == ListItemType.Item)
        {
            PrestacionBeneficiario oPrestacionBenef = (PrestacionBeneficiario)e.Item.DataItem;

            Label lblPaisPrest = (Label)item.FindControl("lblPaisPrest"); // obtenemos el control.
            lblPaisPrest.Text = oPrestacionBenef.PaisDescCompleto + " - " + oPrestacionBenef.DescripcionPrestacion;

            string merror         = "";
            Label  lblfmovestSect = (Label)item.FindControl("lblfmovestSect"); // obtenemos el control.
            try
            {
                oMov = InvocaWsDao.TraeUltimoMovimientoSolicitud(oPrestacionBenef.IdBeneficiario, oPrestacionBenef.CodPrestacion, out merror);
                if (oMov != null && merror == "")
                {
                    lblfmovestSect.Text = oMov.Fecha_Movimiento.ToShortDateString() + " - " + oMov.Estado.Descripcion + " - " + oMov.Sector.Descripcion;
                }
                else
                {
                    lblfmovestSect.Text = "";
                }
            }
            catch (Exception)
            {
                lblfmovestSect.Text = "";
            }

            Label lblMercosur = (Label)item.FindControl("lblMercosur"); // obtenemos el control.
            lblMercosur.Text = oPrestacionBenef.Mercosur ? "SI" : "NO";
        }
    }
Example #8
0
    private void TraeNotasXBeneficiario(Int64 Id_Beneficiario)
    {
        string mensajeer = string.Empty;
        List <BeneficiarioNotas> _Notas = InvocaWsDao.TraeBeneficiario_Notas(Id_Beneficiario, out mensajeer);

        if (mensajeer.Equals(string.Empty))
        {
            if (_Notas.Count == 0)
            {
                mensaje.DescripcionMensaje = "No existen notas para el solicitante";
                mensaje.TipoMensaje        = Mensaje.infoMensaje.Error;
                mensaje.Mostrar();
                //Limpiar();
                dvDatosNotas.Visible = false;
            }
            else
            {
                //rptNotas.DataSource = ToDatatable.toDataTable( _Notas);
                rptNotas.DataSource = _Notas;
                rptNotas.DataBind();
                dvDatosNotas.Visible = true;
            }
        }
        else
        {
            mensaje.DescripcionMensaje = mensajeer;
            mensaje.TipoMensaje        = Mensaje.infoMensaje.Error;
            mensaje.Mostrar();
            Limpiar();
            dvDatosNotas.Visible = false;
        }
    }
Example #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try{
                //Check de Seguridad tanto para ingresar como modificar instrumento
                //if (!AplicarSeguridad())
                //    Response.Redirect(ConfigurationManager.AppSettings["urlAccesoDenegadoNBtn"].ToString());

                string tramite = (string)Request.QueryString["nroSolicitud"];
                string mensaje = "";
                ActoresWS.SolicitudProvisoria Provisoria = null;
                Provisoria = InvocaWsDao.TraeSolicitudProvisoriaXNroSolicitudProvisoria(tramite, out mensaje);

                if (Provisoria != null)
                {
                    lbSolicitanteNomApe.Text = Provisoria.ApellildoynombreDeclarado;
                    lbSolicitanteDoc.Text    = Provisoria.DocumentoDeclarado.Equals(string.Empty) ? "" : Provisoria.DocumentoDeclarado;


                    lbTramiteNro.Text = Provisoria.Nro_SolicitudProvisoria.ToUpper();
                    //List<AuxiliaresWS.Prestacion> lp = InvocaWsDao.TraerPrestaciones();

                    //AuxiliaresWS.Prestacion p = lp.Find(delegate(AuxiliaresWS.Prestacion prestacion)
                    //{
                    //    return prestacion.Cod_Prestacion == Provisoria.Cod_Prestacion;
                    //}
                    //        );


                    lbTramite.Text         = Provisoria.PrestacionSolicitada == null ? "" : Provisoria.PrestacionSolicitada.Descripcion;
                    lbFechaIR.Text         = Provisoria.FAltaProvisoria.ToShortDateString();
                    lbDatosReferencia.Text = Provisoria.Referencia_Provisoria;
                    lbTipodeTramite.Text   = Provisoria.TIngresoProvisorio.Equals("I") ? "Ingreso de documentación" : "Devolución de documentación";
                    lbSectorDeriva.Text    = Provisoria.Sectorderiva == null ? "Sin sector asignado." : Provisoria.Sectorderiva.Descripcion;

                    if (Provisoria.LMovimientos != null)
                    {
                        lbCantidadDoc.Text            = "Se ingresaron " + Provisoria.LMovimientos.Count().ToString() + " documentos";
                        rptDocumentacionIR.DataSource = Provisoria.LMovimientos;
                        rptDocumentacionIR.DataBind();
                    }
                    Page.Title = "Trámite nro. " + Provisoria.Nro_SolicitudProvisoria.ToUpper();
                }
                if (!mensaje.Equals(string.Empty))
                {
                    lbError.Text = mensaje;
                }
                else
                {
                    lbError.Text = string.Empty;
                }
            }
            catch (Exception er) {
                log.Error(er.Message);
            }
        }
    }
Example #10
0
 private void FiltrarGrilla(string campoFiltro, string contenidoFiltro)
 {
     switch (campoFiltro)
     {
     case "Descripcion":
         LstTiposDocumentacion = InvocaWsDao.TraerTipoDocumentacion();
         break;
     }
 }
Example #11
0
    private bool VerificarDocumentoExistente(string documento, Int16 codDocumento)
    {
        bool   existe   = false;
        string msjerror = "";

        existe = InvocaWsDao.ExisteDocumento(documento, codDocumento, out msjerror);
        MError.MensajeError = msjerror;

        return(existe);
    }
Example #12
0
    private void BajaSolicitud(Int64 idBeneficiario, Int16 codPrestacion)
    {
        string merror = "";

        InvocaWsDao.BajaSolicitud(idBeneficiario, codPrestacion, out merror);
        MError.MensajeError = merror;
        if (merror == string.Empty)
        {
            CargarSolicitudes();
        }
    }
Example #13
0
 private void ObtenerDatos(string campoFiltro, string contenidoFiltro)
 {
     if (string.IsNullOrEmpty(contenidoFiltro))
     {
         LstDatosBancos = InvocaWsDao.TraerBancosTodos();
     }
     else
     {
         FiltrarGrilla(campoFiltro, contenidoFiltro);
     }
 }
Example #14
0
    protected void btnConsultar_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            //armo encabezado de la consulta
            string chequeado  = chksoloProvisorios.Checked ? "(No verificados)" : "(Todos)";
            string pais       = ddlPaisConvenio.SelectedValue != "0" ? " - " + ddlPaisConvenio.SelectedItem.Text : "";
            string prestacion = ddlPrestacionesS.SelectedValue != "0" ? " - " + ddlPrestacionesS.SelectedItem.Text : "";
            hfEncabezado.Value    = "Trámites provisorios: " + ddlMeses.SelectedItem.Text + "-" + txtAnio.Text + "   " + chequeado + "  " + pais + prestacion;
            lbTituloConsulta.Text = hfEncabezado.Value;
            sesToExporte          = null;
            string mensaje = "";
            Int16? codPrestacion, codPais;
            if (ddlPrestacionesS.SelectedItem.Value.Equals("0"))
            {
                codPrestacion = null;
            }
            else
            {
                codPrestacion = Int16.Parse(ddlPrestacionesS.SelectedItem.Value);
            }

            if (ddlPaisConvenio.SelectedItem.Value.Equals("0"))
            {
                codPais = null;
            }
            else
            {
                codPais = Int16.Parse(ddlPaisConvenio.SelectedItem.Value);
            }
            List <ActoresWS.SolicitudProvisoria> oList = InvocaWsDao.TraeSolicitudesProvisorias(txtAnio.Text, ddlMeses.SelectedValue, codPais, codPrestacion, chksoloProvisorios.Checked, out mensaje);

            MError.MensajeError = mensaje;
            if ((oList == null) || (oList.Count == 0))
            {
                dvNODatosConsulta.Visible = true;
                dvDatosConsulta.Visible   = false;
                hfEncabezado.Value        = "";
                btnImprimir.Enabled       = false;
                btnToExcell.Enabled       = false;
            }
            else
            {
                sesToExporte = oList;
                LlenaGrilla(string.Empty, string.Empty);
                dvDatosConsulta.Visible     = true;
                lbElementosEncontrados.Text = oList.Count.ToString();

                dvNODatosConsulta.Visible = false;
                btnImprimir.Enabled       = true;
                btnToExcell.Enabled       = true;
            }
        }
    }
Example #15
0
 private void ObtenerDatos(string campoFiltro, string contenidoFiltro)
 {
     if (string.IsNullOrEmpty(contenidoFiltro))
     {
         LstTiposDocumentacion = InvocaWsDao.TraerTipoDocumentacion();
     }
     else
     {
         FiltrarGrilla(campoFiltro, contenidoFiltro);
     }
 }
Example #16
0
    public static DataTable toDataTable(List <ActoresWS.SolicitudProvisoria> iParam)
    {
        DataTable _dt = new DataTable();

        //_dt.Columns.Add("IdBeneficiario", typeof(Int64));
        _dt.Columns.Add("ApellidoyNombre", typeof(String));
        _dt.Columns.Add("DocumentoyTipo", typeof(String));
        _dt.Columns.Add("Nro_SolicitudProvisoria", typeof(String));
        _dt.Columns.Add("FAltaProvisoria", typeof(String));
        _dt.Columns.Add("EsProvisoria", typeof(String));
        _dt.Columns.Add("Referencia_Provisoria", typeof(String));
        _dt.Columns.Add("Sectorderiva", typeof(String));
        _dt.Columns.Add("Desc_Prestacion", typeof(String));
        _dt.Columns.Add("Desc_Pais", typeof(String));
        _dt.Columns.Add("IngresaDevuelve", typeof(String));
        _dt.Columns.Add("DocumentosIngresados", typeof(String));


        List <AuxiliaresWS.Prestacion> lp = InvocaWsDao.TraerPrestaciones();

        AuxiliaresWS.Prestacion p = null;


        foreach (ActoresWS.SolicitudProvisoria oSolPrev in iParam)
        {
            DataRow _drTemp;
            _drTemp = _dt.NewRow();
            //_drTemp["IdBeneficiario"] = oSolPrev.IdBeneficiario;
            _drTemp["Nro_SolicitudProvisoria"] = oSolPrev.Nro_SolicitudProvisoria;
            _drTemp["ApellidoyNombre"]         = oSolPrev.ApellildoynombreDeclarado;
            _drTemp["DocumentoyTipo"]          = oSolPrev.DocumentoDeclarado.Equals(string.Empty) ? "" : oSolPrev.DocumentoDeclarado;
            _drTemp["FAltaProvisoria"]         = oSolPrev.FAltaProvisoria.ToShortDateString();
            _drTemp["EsProvisoria"]            = oSolPrev.FBajaProvisoria.HasValue ? "NO":"SI";
            _drTemp["Referencia_Provisoria"]   = oSolPrev.Referencia_Provisoria;
            _drTemp["Sectorderiva"]            = oSolPrev.Sectorderiva == null ? "No derivado" : oSolPrev.Sectorderiva.Descripcion;
            _drTemp["IngresaDevuelve"]         = oSolPrev.TIngresoProvisorio == TipoIngresoProvisorio.Ingreso ? "Ingreso" : "Devolución";

            //p = lp.Find(delegate(AuxiliaresWS.Prestacion prestacion)
            //        {
            //            return prestacion.Cod_Prestacion == oSolPrev.Cod_Prestacion;;
            //        }
            //        );

            //_drTemp["Desc_Prestacion"] = p.Descripcion;

            _drTemp["Desc_Prestacion"]      = oSolPrev.PrestacionSolicitada == null ? "No solicita" : oSolPrev.PrestacionSolicitada.Descripcion;
            _drTemp["Desc_Pais"]            = oSolPrev.PaisConvenio == null ? "No define" : oSolPrev.PaisConvenio.Descripcion;
            _drTemp["DocumentosIngresados"] = oSolPrev.LMovimientos == null ? "No registra" : oSolPrev.LMovimientos.Count().ToString();

            _dt.Rows.Add(_drTemp);
        }
        return(_dt);
    }
Example #17
0
    protected void btnConsultar_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            sesToExporte = null;
            string mensaje = "";
            Int16? codPrestacion, codPais;
            if (ddlPrestacionesS.SelectedItem.Value.Equals("0"))
            {
                codPrestacion = null;
            }
            else
            {
                codPrestacion = Int16.Parse(ddlPrestacionesS.SelectedItem.Value);
            }

            if (ddlPaisS.SelectedItem.Value.Equals("0"))
            {
                codPais = null;
            }
            else
            {
                codPais = Int16.Parse(ddlPaisS.SelectedItem.Value);
            }
            List <SolicitudesEFechasSolicitud> oList = InvocaWsDao.TraeSolicitudesEFechasSolicitud(txtFechaDesde.Text, txtFechaHasta.Text, codPrestacion, codPais, chkMercosurS.Checked, Byte.Parse(ddlOrderBy.SelectedValue), out mensaje);
            sesToExporte        = oList;
            MError.MensajeError = mensaje;
            if ((oList == null) || (oList.Count == 0))
            {
                dvNODatosConsulta.Visible = true;
                dvDatosConsulta.Visible   = false;
                hffd.Value          = "";
                hffh.Value          = "";
                btnImprimir.Enabled = false;
                btnToExcell.Enabled = false;
            }
            else
            {
                dvDatosConsulta.Visible           = true;
                lbElementosEncontrados.Text       = oList.Count.ToString();
                gridListadoSolicitudes.DataSource = toDataTable(oList);
                gridListadoSolicitudes.DataBind();
                dvNODatosConsulta.Visible = false;
                hffd.Value = txtFechaDesde.Text;
                hffh.Value = txtFechaHasta.Text;

                btnImprimir.Enabled = true;
                btnToExcell.Enabled = true;
            }
        }
    }
Example #18
0
    private void Consultar()
    {
        sesToExporte = null;
        string mensaje = string.Empty;
        string caption = "Totales por estados a la fecha " + txtFecha.Text;

        hffechaing.Value = txtFecha.Text;

        List <IndicadorTotalesEstado> oList = InvocaWsDao.TraeIndicadorTotalesEstado(txtFecha.Text, out mensaje);

        sesToExporte        = oList;
        MError.MensajeError = mensaje;
        if ((oList == null) || (oList.Count == 0))
        {
            dvNODatosConsulta.Visible = true;
            dvDatosConsulta.Visible   = false;
            btnImprimir.Enabled       = false;
            btnToExcell.Enabled       = false;
        }
        else
        {
            btnImprimir.Enabled               = true;
            btnToExcell.Enabled               = true;
            hfcaption.Value                   = caption;
            dvDatosConsulta.Visible           = true;
            gridListadoSolicitudes.DataSource = toDataTable(oList);
            gridListadoSolicitudes.DataBind();
            //litGraficoBarras.Text = Grafica.traerScriptGrafica(TiposEnumerados.TipoGrafico.BARRA,
            //    caption,
            //    "Estado", "Total",
            //    "Estado", toDataTable(oList), 0, 2, 600, 300, false);
            //litGraficoTorta.Text = Grafica.traerScriptGrafica(TiposEnumerados.TipoGrafico.TORTA,
            //caption,
            //"Estado", "Total",
            //"EstadoT", toDataTable(oList), 0, 2, 500, 250,false);
            dvNODatosConsulta.Visible = false;

            #region Datos Serie Lineal

            hfcaption2.Value    = "Evolución de estados en los ultimos " + ConfigurationManager.AppSettings["PeriodosConsultaSeries"].ToString() + " períodos a fecha " + txtFecha.Text;
            lbTituloLineal.Text = hfcaption2.Value;

            SettingDatosCons(txtFecha.Text);
            TraerGridEvolucion();
            TraerGraficaMultiSerie();

            #endregion Datos Serie Lineal
        }
    }
Example #19
0
    private void cargarDDLDocPrestacion(Int16 codPrestacion, DropDownList ddl)
    {
        List <ActoresWS.TipoDocumentacion> oTipo = InvocaWsDao.TraeTipoDocumentacionXPrestacion(codPrestacion);

        if (oTipo != null)
        {
            ddl.DataSource = ToDatatable.toDataTable(oTipo);
            ddl.DataBind();
            ddl.Items.Insert(0, new ListItem("[Seleccióne documentación]", "0"));
        }
        else
        {
            MError.MensajeError = "Error al traer listado de documentación";
        }
    }
Example #20
0
    //public static DataTable toDataTable(List<ActoresWS.SolicitudDenegada> iParam)
    //{
    //    DataTable _dt = new DataTable();
    //    _dt.Columns.Add("DescMotivo", typeof(String));
    //    _dt.Columns.Add("FechaDenegatoria", typeof(String));
    //    _dt.Columns.Add("Observaciones", typeof(String));


    //    foreach (ActoresWS.SolicitudDenegada oSol in iParam)
    //    {
    //        if (!oSol.FechaBajaDenegatoria.HasValue)
    //        {
    //            DataRow _drTemp;
    //            _drTemp = _dt.NewRow();
    //            _drTemp["DescMotivo"] = oSol.DescMotivo;
    //            _drTemp["FechaDenegatoria"] = oSol.FechaDenegatoria.ToShortDateString();
    //            _drTemp["Observaciones"] = oSol.Observaciones;
    //            _dt.Rows.Add(_drTemp);
    //        }
    //    }
    //    return _dt;
    //}

    public static DataTable toDataTable(List <PrestacionBeneficiario> iParam)
    {
        DataTable _dt = new DataTable();

        _dt.Columns.Add("IdBeneficiario", typeof(String));
        _dt.Columns.Add("Mercosur", typeof(Boolean));
        _dt.Columns.Add("Pais", typeof(String));
        _dt.Columns.Add("Prestacion", typeof(String));
        _dt.Columns.Add("codPrestacion", typeof(Int16));
        _dt.Columns.Add("codPais", typeof(Int16));
        _dt.Columns.Add("col_Pais_Prestacion", typeof(String));
        _dt.Columns.Add("col_FMov_Estado_Sector", typeof(String));

        ConsultasWS.Movimiento_Solicitud oMov = null;
        foreach (PrestacionBeneficiario oPresBen in iParam)
        {
            DataRow _drTemp;
            _drTemp = _dt.NewRow();
            _drTemp["IdBeneficiario"]      = oPresBen.IdBeneficiario.ToString();
            _drTemp["Mercosur"]            = oPresBen.Mercosur;
            _drTemp["Pais"]                = oPresBen.PaisDescCompleto;
            _drTemp["Prestacion"]          = oPresBen.DescripcionPrestacion;
            _drTemp["codPrestacion"]       = oPresBen.CodPrestacion;
            _drTemp["codPais"]             = oPresBen.CodigoPais;
            _drTemp["col_Pais_Prestacion"] = oPresBen.PaisDescCompleto + " - " + oPresBen.DescripcionPrestacion;
            string merror = "";
            try
            {
                oMov = InvocaWsDao.TraeUltimoMovimientoSolicitud(oPresBen.IdBeneficiario, oPresBen.CodPrestacion, out merror);
                if (oMov != null && merror == "")
                {
                    _drTemp["col_FMov_Estado_Sector"] = oMov.Fecha_Movimiento.ToShortDateString() + " - " + oMov.Estado.Descripcion + " - " + oMov.Sector.Descripcion;
                }
                else
                {
                    _drTemp["col_FMov_Estado_Sector"] = "";
                }
            }
            catch (Exception)
            {
                _drTemp["col_FMov_Estado_Sector"] = "";
            }


            _dt.Rows.Add(_drTemp);
        }
        return(_dt);
    }
Example #21
0
    private void Traer()
    {
        string mensajeer = "";

        try
        {
            List <Devolucion> odev = InvocaWsDao.TraeDevolucionXSolicitud(idBeneficiario.Value, codPrestacion, out mensajeer);

            if (odev != null || odev.Count != 0)
            {
                List <Devolucion> listemp = new List <Devolucion>();
                foreach (Devolucion dev in odev)
                {
                    if (dev.FechaNotificacion == null)
                    {
                        listemp.Add(dev); //temp guarda las devoluciones sin notificar
                    }
                }
                if (listemp.Count == 0) //caso de no encontrar notificaciones
                {
                    gridListadoDevoluciones.Visible = false;
                    dvNoDevolucion.Visible          = true;
                    dvNotificacion.Visible          = false;
                }
                else
                {
                    sesNotificar                       = listemp;
                    dvNoDevolucion.Visible             = false;
                    dvNotificacion.Visible             = true;
                    btnGuardar.Enabled                 = true;
                    gridListadoDevoluciones.DataSource = ToDatatable.toDataTable(sesNotificar);
                    gridListadoDevoluciones.DataBind();
                    gridListadoDevoluciones.Visible = true;
                }
            }
            else
            {
                gridListadoDevoluciones.Visible = false;
                dvNoDevolucion.Visible          = true;
                dvNotificacion.Visible          = false;
            }
        }
        catch (Exception er)
        {
            log.Error(er.Message);
            MError.MensajeError = er.Message;
        }
    }
Example #22
0
    private void CargarSolicitudes()
    {
        string mensajeErr = "";
        List <ActoresWS.PrestacionBeneficiario> oList = InvocaWsDao.TraePrestacionesXIdBeneficiario(Int64.Parse(idBeneficiario), out mensajeErr);

        if (oList == null || oList.Count == 0)
        {
            dvConSolicitudes.Visible = false;
            dvSinSolicitudes.Visible = true;
        }
        else
        {
            gvPrestacionesBeneficiario.DataSource = ToDatatable.toDataTable(oList);
            gvPrestacionesBeneficiario.DataBind();
            dvConSolicitudes.Visible = true;
            dvSinSolicitudes.Visible = false;
        }
    }
Example #23
0
    protected void btnGuardar_Click(object sender, EventArgs e)
    {
        Page.Validate();

        if (Page.IsValid)
        {
            try
            {
                string            mensajeEr = string.Empty;
                BeneficiarioNotas iParam    = new BeneficiarioNotas();
                iParam.Asunto = txtAsunto.Text;
                //iParam.Descripcion = txttextarea.Value;
                iParam.Descripcion     = "";
                iParam.FRecepcion      = DateTime.Parse(txtFechaRec.Text);
                iParam.Id_Beneficiario = Int64.Parse(HFIdBeneficiario.Value);
                iParam.NroNota         = txtNumNota.Text;


                InvocaWsDao.AMBeneficiario_Notas(iParam, out mensajeEr);

                if (mensajeEr.Equals(string.Empty))
                {
                    mensaje.TipoMensaje        = Mensaje.infoMensaje.Info;
                    mensaje.DescripcionMensaje = "La nota se guardó satisfactoriamente";
                    mensaje.Mostrar();
                    mensaje.QuienLLama = "OK";
                    TraeNotasXBeneficiario(Int64.Parse(HFIdBeneficiario.Value));
                    Limpiar(true);
                }
                else
                {
                    MError.MensajeError = "Ocurrió un error al guardar la nota.";
                }
            }
            catch (Exception er)
            {
                log.Error(er.Message);
                MError.MensajeError = "Ocurrió un error al guardar la nota. Revisar log para mayor detalle.";
            }
        }
    }
Example #24
0
    private void TraerGridEvolucion()
    {
        //DataTable dtFinal = new DataTable();
        dtFinalToGrid = creaDataTable();
        //carga la primera columna
        CargaEstados(VariableSession.oEstados);
        foreach (DataRow dRowAnio in dtPeriodos.Rows)
        {
            string mensaje = "";
            //traer datos del anio ingresado y carga las sucesivas columnas por anio
            List <IndicadorTotalesEstado> oList = InvocaWsDao.TraeIndicadorTotalesEstado(dRowAnio.ItemArray[0].ToString().Trim(), out mensaje);
            //dtFinal = toDataTable(oList);
            CargaColumnas(oList, dtPeriodos.Rows.IndexOf(dRowAnio) + 1);
        }

        //gridEvolutivo.DataSource = (DataTable)CalcularFilaTotales(dtFinalToGrid);
        gridEvolutivo.DataSource = dtFinalToGrid;
        gridEvolutivo.DataBind();
        //gridEvolutivo.Rows[gridEvolutivo.Rows.Count - 1].CssClass = "GrillaHeadPanel";
        gridEvolutivo.Visible = true;
    }
Example #25
0
    private void ConsultarIndicadores(byte tPeriodo, byte periodo, string anio, string txtcaption)
    {
        sesToExporte = null;
        string mensaje = string.Empty;
        string caption = "Totales prestacionales ingresados en el período " + anio;

        //Byte periodo = 1;
        lblTotalPrestaciones.Text = "0";
        caption += " - " + txtcaption;

        List <IndicadorPorSolicitudesPrestaciones> oList = InvocaWsDao.TraeIndicadorPorSolicitudesPrestaciones(tPeriodo, periodo, anio, out mensaje);

        MError.MensajeError = mensaje;
        if ((oList == null) || (oList.Count == 0))
        {
            dvNODatosConsulta.Visible = true;
            dvDatosConsulta.Visible   = false;
            btnImprimir.Enabled       = false;
            btnToExcell.Enabled       = false;
        }
        else
        {
            sesToExporte        = oList;
            btnImprimir.Enabled = true;
            btnToExcell.Enabled = true;
            //hfcaption.Value = caption;
            long totalPrestaciones = 0;
            dvDatosConsulta.Visible           = true;
            gridListadoSolicitudes.DataSource = toDataTable(oList, Int16.Parse(ConfigurationManager.AppSettings["MaxItemsShowAgrupados"]), out totalPrestaciones);
            gridListadoSolicitudes.DataBind();

            lblTotalPrestaciones.Text = totalPrestaciones.ToString();
            hfcaption.Value           = caption;

            SetGraficos(TiposEnumerados.TipoGrafico.COLUMNA);
            //LTabla.Text = Grafica.GeneraTablaDatos(toDataTable(oList));

            dvNODatosConsulta.Visible = false;
        }
    }
Example #26
0
    protected void gv_Grilla_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName.Equals("Insert"))
            {
                DropDownList ddlDescripcion            = gv_Grilla.FooterRow.FindControl("Descripcion") as DropDownList;
                DropDownList ddlPrestacion             = gv_Grilla.FooterRow.FindControl("Prestacion") as DropDownList;
                DropDownList ddlRequeridoInicioTramite = gv_Grilla.FooterRow.FindControl("RequeridoInicioTramite") as DropDownList;
                TextBox      txtComentario             = gv_Grilla.FooterRow.FindControl("Comentario") as TextBox;

                //Label lbComentario = gv_Grilla.FooterRow.FindControl("Comentario") as Label;

                string msjError = "";

                //Alta
                InvocaWsDao.AMTipodeDocumentacion_Prestacion(int.Parse(ddlDescripcion.SelectedValue), short.Parse(ddlPrestacion.SelectedValue), txtComentario.Text, ddlRequeridoInicioTramite.SelectedValue.Equals("S") ? true : false, out msjError);

                VariableSession.oTipoDocumentacion_Prestacion = null;

                mensaje.QuienLLama         = "btnAlerta";
                mensaje.TipoMensaje        = Mensaje.infoMensaje.Alerta;
                mensaje.DescripcionMensaje = "La nueva asignación de documentación se ha cargado correctamente.";
                mensaje.Mostrar();

                LlenaGrilla(string.Empty, string.Empty);
            }
        }
        catch (Exception err)
        {
            if (log.IsErrorEnabled)
            {
                log.ErrorFormat("Se generó una excepción : {0}", err.Message);
            }

            throw err;
        }
    }
Example #27
0
    private void EliminarFila()
    {
        try
        {
            GridViewRow row = gv_Grilla.Rows[IndexGrilla];


            //Label lblCArea = row.FindControl("cod_area_NPA") as Label;
            //Label lblNLinea = row.FindControl("nro_linea") as Label;

            //Label lblConc = row.FindControl("desc_concepto") as Label;
            //Label lblCReg = row.FindControl("cod_registro") as Label;

            //ServicioYT.YT_Linea_Anses_YT_Concepto lineaAnsesConcepto = new ServicioYT.YT_Linea_Anses_YT_Concepto();

            //lineaAnsesConcepto.cod_area_NPA = lblCArea.Text;
            //lineaAnsesConcepto.nro_linea = lblNLinea.Text;
            //lineaAnsesConcepto.cod_servicio = "Telefonia Basica";//lblServ.Text;
            //lineaAnsesConcepto.desc_concepto = lblConc.Text;
            //lineaAnsesConcepto.cod_registro = Convert.ToInt32(lblCReg.Text);

            //Baja
            string msjError = "";
            InvocaWsDao.BajaTipodeDocumentacion_Prestacion(LstDatosDocumentacionPrestacion[IndexGrilla].TDocumentacion.CodTipoDocumentacion, LstDatosDocumentacionPrestacion[IndexGrilla].Prestacion.Cod_Prestacion, out msjError);

            LlenaGrilla(string.Empty, string.Empty);
            //LlenaGrilla(busquedaGrilla.BusquedaSeleccionada(), busquedaGrilla.BusquedaIngresada());
        }
        catch (Exception ex)
        {
            if (log.IsErrorEnabled)
            {
                log.ErrorFormat("Se generó una excepción : {0}", ex.Message);
            }
            throw ex;
        }
    }
Example #28
0
    protected void btnGuardar_Click(object sender, EventArgs e)
    {
        string mensajeError = string.Empty;

        Page.Validate();
        if (Page.IsValid)
        {
            try
            {
                foreach (Devolucion iDev in sesNotificar)
                {
                    string mensaje = "";
                    InvocaWsDao.NotificaDevolucion(idBeneficiario.Value, codPrestacion, iDev.FechaMovimiento.ToShortDateString().Trim(), txtFechaNotificacion.Text.Trim(), out mensaje);
                    mensajeError += mensaje.Equals(string.Empty) ? "" : mensaje + "-";
                }
                if (mensajeError.Equals(string.Empty))
                {
                    mensaje.DescripcionMensaje = "La/s devolución/es fueron notificadas con éxito";
                    mensaje.TipoMensaje        = Mensaje.infoMensaje.Info;
                    mensaje.Mostrar();
                    gridListadoDevoluciones.Visible = false;
                    txtFechaNotificacion.Text       = "";
                    btnGuardar.Enabled = false;
                }
                else
                {
                    MError.MensajeError = mensajeError;
                }
            }
            catch (Exception er)
            {
                log.Error(er.Message);
                MError.MensajeError = er.Message;
            }
        }
    }
Example #29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(btnBuscar);

        if (!IsPostBack)
        {
            MError.MensajeError = string.Empty;
            try
            {
                #region seguridad

                if (!AplicarSeguridadPagina())
                {
                    Response.Redirect(ConfigurationManager.AppSettings["urlAccesoDenegado"]);
                }

                //if (AplicarSeguridadAccesoMenu())
                //    Menu1.CargarMenu(Boolean.Parse(ConfigurationManager.AppSettings["usarMenuDinamico"].ToString()) ? ObtenerMenu() : ObtenerMenu2());

                #endregion seguridad

                InicializarDatosPagina("Búsqueda de Solicitante", " ");

                divNoConsulta.Visible = false;
                btnNueva.Visible      = false;
                //throw new Exception();
                #region Devoluciones Notificadas vencidas
                ////Trae la primera pagina de notirficaciones Vencidas
                //if (AplicarSeguridadConsultaNotificacionesVencidas())
                //{
                //    dvDevNotifVencidas.Visible = true;
                //    cargarDevolucionesNotificadasVencidas();
                //}
                //else
                //    dvDevNotifVencidas.Visible = false;
                #endregion Devoluciones Notificadas vencidas

                #region Tramites provisorios
                //Trae la primera pagina de notirficaciones Vencidas
                if (AplicarSeguridadConsultaProvisorios())
                {
                    string mensaje = "";

                    List <SolicitudProvisoria>          iLSolicitudesProvisorias = InvocaWsDao.TraeSolicitudesProvisorias(DateTime.Today.Year.ToString(), DateTime.Today.Month.ToString(), null, null, true, out mensaje);
                    List <SolicitudProvisoriaExtendida> iLSolicitudesExtendidas  = InvocaWsDao.TraeSolicitudesProvisoriasAVencerEnPlazo(out mensaje);
                    Int32 totProvisorias        = iLSolicitudesProvisorias.Count;
                    Int32 totProvisoriasAVencer = iLSolicitudesExtendidas.Count;

                    if (totProvisorias == 0 && totProvisoriasAVencer == 0)
                    {
                        dvSolicitudesProvisorias.Visible = false;
                    }
                    else
                    {
                        Session["ProvisoriosAVencer"]       = totProvisoriasAVencer == 0 ? null : (List <SolicitudProvisoriaExtendida>)iLSolicitudesExtendidas;
                        btnVerProvisoriosaVencer.Visible    = totProvisoriasAVencer > 0;
                        Session["Provisorios"]              = totProvisorias == 0 ? null : (List <SolicitudProvisoria>)iLSolicitudesProvisorias;
                        btnverProvisorios.Visible           = totProvisorias > 0;
                        dvSolicitudesProvisorias.Visible    = true;
                        lbCantidadTrProvisoriosActual.Text  = totProvisorias.ToString();
                        lbCantidadTrProvisoriosAVencer.Text = totProvisoriasAVencer.ToString();
                    }
                }
                else
                {
                    dvSolicitudesProvisorias.Visible = false;
                }
                ////Trae la primera pagina de notirficaciones Vencidas
                //if (AplicarSeguridadConsultaNotificacionesVencidas())
                //{
                //    dvDevNotifVencidas.Visible = true;
                //    cargarDevolucionesNotificadasVencidas();
                //}
                //else
                //    dvDevNotifVencidas.Visible = false;
                #endregion
            }

            catch (ThreadAbortException err)
            { log.ErrorFormat("Error al cargar la pagina Main.aspx error: {0}", err.Message); }
            catch (Exception err)
            {
                log.ErrorFormat("Error al cargar la pagina Main.aspx error: {0}", err.Message);
                MError.MensajeError = "Ocurrio un error al intentar efectuar la consulta. Revisar log para mayor informacion.";
                //dvDevNotifVencidas.Visible = false;
            }
        }
    }
Example #30
0
    protected void btnBuscar_Click(object sender, EventArgs e)
    {
        //pequeña validacion de ingreso
        string mensaje = busben.validaParams;

        MError.MensajeError = mensaje;

        if (mensaje.Equals(string.Empty))
        {
            List <ActoresWS.LsBeneficiario> oLista = null;
            switch (busben.TipoCriterio)
            {
            case TipoConsultaBeneficioario.NombreoApellidos:
                oLista             = InvocaWsDao.TraerBeneficiarios(TipoConsultaBeneficioario.NombreoApellidos, busben.ApellidoNombre, string.Empty, out mensaje);
                encabezadoCriterio = "nombre o apellido " + busben.ApellidoNombre;
                break;

            case TipoConsultaBeneficioario.Documento:
                oLista             = InvocaWsDao.TraerBeneficiarios(TipoConsultaBeneficioario.Documento, busben.Documento, string.Empty, out mensaje);
                encabezadoCriterio = "documento " + busben.Documento;
                break;

            case TipoConsultaBeneficioario.DocumentoYTipo:
                oLista             = InvocaWsDao.TraerBeneficiarios(TipoConsultaBeneficioario.DocumentoYTipo, busben.Documento, busben.TipoDoc, out mensaje);
                encabezadoCriterio = "documento y tipo " + busben.Documento + "-" + busben.TipoDocDescripcion;
                break;

            case TipoConsultaBeneficioario.CodigoSIACI:
                oLista             = InvocaWsDao.TraerBeneficiarios(TipoConsultaBeneficioario.CodigoSIACI, busben.CodigoCiaci, string.Empty, out mensaje);
                encabezadoCriterio = "Código SIACI " + busben.CodigoCiaci;
                break;

            case TipoConsultaBeneficioario.Expediente:
                oLista             = InvocaWsDao.TraeBeneficiariosXExpteANSES(busben.ExpeOrg, busben.ExpePre, busben.ExpeDoc, busben.ExpeDig, busben.ExpeTram, busben.ExpeSecu, out mensaje);
                encabezadoCriterio = "Expediente " + busben.ExpeComp;
                break;

            case TipoConsultaBeneficioario.Beneficio:
                oLista             = InvocaWsDao.TraeBeneficiariosXNroBeneficioANSES(busben.BenExCaja, busben.BenTipo, busben.BenNumero, busben.BenCopart, busben.BenDigVerif, out mensaje);
                encabezadoCriterio = "Beneficio " + busben.BenComp;

                break;

            case TipoConsultaBeneficioario.CUIP:
                oLista             = InvocaWsDao.TraeBeneficiariosXCUIP(busben.PreCUIP, busben.DocCUIP, busben.DigCUIP, out mensaje);
                encabezadoCriterio = "CUIL " + busben.CUIPComp;

                break;

            case TipoConsultaBeneficioario.Tramite:
                oLista             = InvocaWsDao.TraeBeneficiariosXNroSolicitudProvisoria(busben.TramiteNro, out mensaje);
                encabezadoCriterio = "Trámite " + busben.TramiteNro;
                break;
            }
            //Muestra aviso de Error no controlado
            busben.Limpiar();
            MError.MensajeError = mensaje;

            if (oLista == null || oLista.Count == 0)
            {
                divNoConsulta.Visible = true;
                btnNueva.Visible      = true;
            }
            else
            {
                btnNueva.Visible = false;
                if (oLista.Count == 1)
                {
                    Master.sesEsUnicoRegistro = true;
                    Master.parametrosConsulta = "InformacionCompletaBeneficio.aspx?idBeneficiario=" + oLista[0].Id_Beneficiario.ToString().Trim();
                }
                else
                {
                    Session["__sesBeneficiarios"] = (List <ActoresWS.LsBeneficiario>)oLista;
                    Master.sesEsUnicoRegistro     = false;
                    Master.parametrosConsulta     = "ListaBeneficiarios.aspx?tituloCriterio=" + encabezadoCriterio;
                }
                Response.Redirect(Master.parametrosConsulta);
            }
        }
    }