Beispiel #1
0
        private IList <string> BuscarDestinatariosEnBaseDatos()
        {
            IList <string> arrDestinatarios = new List <string>();

            ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio();
            objServicio.Comando  = "dbo.SPALCA_USUARIO_MAIL_LISTAR";
            objServicio.Conexion = "CONN";
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_IdJuicio", Valor = ALCSA.FWK.Web.Control.ExtraerValorComoEntero(hdfIdJuicio), Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            DataTable objTabla = objServicio.EjecutarDataTable();

            if (objTabla != null && objTabla.Rows.Count > 0)
            {
                foreach (DataRow objFila in objTabla.Rows)
                {
                    string strDestinatario = objFila[0] != null ? objFila[0].ToString() : string.Empty;
                    if (ALCSA.FWK.Web.Mail.EmailValido(strDestinatario))
                    {
                        arrDestinatarios.Add(strDestinatario);
                    }
                }
            }

            return(arrDestinatarios);
        }
Beispiel #2
0
        private void MostrarProximaGestion()
        {
            string[] arrTramite = ddlTramites.SelectedValue.ToString().Split(new char[] { '-' });
            int      intIndice  = arrTramite.Length > 2 ? Convert.ToInt32(arrTramite[1]) : 0;

            ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio();
            objServicio.Comando  = "dbo.SPALC_ACTIVIDADESJUDICIALES_BUSCAR_SIGUIENTE";
            objServicio.Conexion = "CONN";
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_IdCobranza", Valor = ALCSA.FWK.Web.Control.ExtraerValorComoEntero(hdfIdCobranza), Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_IndiceTramite", Valor = intIndice, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            DataTable objTabla = objServicio.EjecutarDataTable();

            if (objTabla != null && objTabla.Rows.Count > 0)
            {
                txtProximoTramite.Text = objTabla.Rows[0]["NombreTramite"].ToString();
                ALCSA.FWK.Web.Control.AsignarValor(hdfNumeroDias, Convert.ToInt32(objTabla.Rows[0]["Plazo"]));
            }
            else
            {
                txtProximoTramite.Text = string.Empty;
                hdfNumeroDias.Value    = "1";
            }
        }
Beispiel #3
0
        private void CargarListadoSubTramites(int idSubTramiteActual)
        {
            string[] arrTramite   = ddlTramites.SelectedValue.ToString().Split(new char[] { '-' });
            int      intIdTramite = arrTramite.Length > 2 ? Convert.ToInt32(arrTramite[0]) : 0;

            string strTipo = hdfTipoActividad.Value.StartsWith("ESTANDARD")
                             ? ALCSA.Negocio.Cobranzas.Cobranza.TIPO_COBRANZA_DOCUMENTO_ESTANDAR_UNO
                             : hdfTipoActividad.Value;

            ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio();
            objServicio.Comando  = "dbo.SPALC_SUBTRAMITE_GENERAL_LISTAR";
            objServicio.Conexion = "CONN";
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_IdSubTramiteActual", Valor = idSubTramiteActual, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@VC_Tipo", Valor = strTipo, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_IdTramite", Valor = intIdTramite, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            ddlSubTramites.DataSource = objServicio.EjecutarDataTable();
            ddlSubTramites.DataBind();
            ddlSubTramites.Items.Insert(0, "...");

            if (idSubTramiteActual > 0)
            {
                ALCSA.FWK.Web.Control.SeleccionarValor(ddlSubTramites, idSubTramiteActual);
            }
        }
Beispiel #4
0
 public DataTable ListarFormatoVicidial(int idCampana)
 {
     ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio();
     objServicio.Conexion = Conexion.ALCSA;
     objServicio.Comando  = "dbo.SPALC_CAMPANASCOBRANZAS_LISTAR_FORMATO_VICIDIAL";
     objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
     {
         Nombre = "@INT_IdCampana", Valor = idCampana, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
     });
     return(objServicio.EjecutarDataTable());
 }
        private void CargaGrilla(int idCobranza)
        {
            ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio();
            objServicio.Conexion = "CONN";
            objServicio.Comando  = "dbo.SPALC_LIQUIDACION_LISTAR";
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_IdCobranza", Valor = idCobranza, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            this.Grilla.DataSource = objServicio.EjecutarDataTable();
            this.Grilla.DataBind();
        }
Beispiel #6
0
 public DataTable ListarDesglose(int idAbono, int idCobranza)
 {
     ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio();
     objServicio.Conexion = Conexion.ALCSA;
     objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
     {
         Nombre = "@INT_IdAbono", Valor = idAbono, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
     });
     objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
     {
         Nombre = "@INT_IdCobranza", Valor = idCobranza, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
     });
     objServicio.Comando = "dbo.SPALC_DesgloseListar";
     return(objServicio.EjecutarDataTable());
 }
Beispiel #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio()
            {
                Conexion = "CONN", Comando = "dbo.SPALCSA_MetricasDetalleCobranzaListar"
            };
            objServicio.Parametros = new List <ALCSA.FWK.BD.Parametro>();
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre    = "@VC_IdsCobranza",
                Valor     = ALCSA.FWK.Web.Sitio.ExtraerValorQueryString(Request, "ids").Trim(),
                Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            gvDetalle.DataSource = objServicio.EjecutarDataTable();
            gvDetalle.DataBind();
        }
Beispiel #8
0
        private void CargaGrilla(string rut_deudor)
        {
            ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio()
            {
                Conexion = "CONN", Comando = "dbo.SPALC_PREJUDICIAL_LISTAR"
            };

            objServicio.Parametros = new List <ALCSA.FWK.BD.Parametro>();
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@VC_RutDeudor", Valor = rut_deudor.Replace(".", string.Empty), Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            // DataTable table = ConsultasEspecificas.EscritoPrejudicialGrilla(rut_deudor);
            this.Grilla.DataSource = objServicio.EjecutarDataTable();
            this.Grilla.DataBind();
        }
Beispiel #9
0
 public DataTable ListarDetalle(string rutProcurador, DateTime fecha, bool resumen)
 {
     ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio();
     objServicio.Conexion = Conexion.ALCSA;
     objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
     {
         Nombre = "@VC_RutProcurador", Valor = rutProcurador, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
     });
     objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
     {
         Nombre = "@DAT_Fecha", Valor = fecha.Date, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
     });
     objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
     {
         Nombre = "@BIT_Resumen", Valor = resumen, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
     });
     objServicio.Comando = "SPALC_PROCURADORESMETAS_DETALLE_LISTAR";
     return(objServicio.EjecutarDataTable());
 }
        private void CargaGrilla(int idCobranza)
        {
            ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio()
            {
                Conexion = "CONN", Comando = "dbo.SPALC_PREJUDICIAL_LISTAR_DOCUMENTOS"
            };

            objServicio.Parametros = new List <ALCSA.FWK.BD.Parametro>();
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_IdCobranza", Valor = idCobranza, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            // DataTable table = ConsultasEspecificas.EscritoPrejudicialPrint(id_cobranza);
            DataTable objTabla = objServicio.EjecutarDataTable();

            this.Grilla.DataSource = objTabla;
            this.Grilla.DataBind();
            this.lblCantidad.Text = string.Format("{0} documento{1}", objTabla.Rows.Count, objTabla.Rows.Count.Equals(1) ? string.Empty : "s");
        }
Beispiel #11
0
        private void CargarListadoTramites(int idTramiteActual, string tipo, int proximoIndice)
        {
            ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio();
            objServicio.Comando  = "dbo.SPALC_TRAMITE_GENERAL_LISTAR";
            objServicio.Conexion = "CONN";
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_IdTramiteActual", Valor = idTramiteActual, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@VC_Tipo", Valor = tipo, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_Indice", Valor = proximoIndice, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_IdCobranza", Valor = ALCSA.FWK.Web.Control.ExtraerValorComoEntero(hdfIdCobranza), Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            ddlTramites.DataSource = objServicio.EjecutarDataTable();
            ddlTramites.DataBind();

            if (idTramiteActual > 0)
            {
                string strIdTramite = string.Format("{0}-{1}-", idTramiteActual, proximoIndice - 1);
                for (int intIndice = 0; intIndice < ddlTramites.Items.Count; intIndice++)
                {
                    if (ddlTramites.Items[intIndice].Value.StartsWith(strIdTramite))
                    {
                        ddlTramites.SelectedIndex             = -1;
                        ddlTramites.Items[intIndice].Selected = true;
                        break;
                    }
                }
            }
        }
Beispiel #12
0
        private void CargarGrilla(int indice, bool exportarExcel)
        {
            ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio();
            objServicio.Conexion = "CONN";
            objServicio.Comando  = "dbo.SPALC_GASTOS_DETALLE_LISTAR";

            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@VC_NumeroOperacion", Valor = txtNumeroOperacion.Text.Trim(), Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@VC_Rol", Valor = txtRol.Text.Trim(), Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@VC_RutCliente", Valor = ddlCliente.SelectedValue, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@VC_RutProcurador", Valor = ddlProcurador.SelectedValue, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@VC_GrupoGasto", Valor = ddlGastos.SelectedValue, Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@INT_TipoGasto", Valor = ALCSA.FWK.Web.Control.ExtraerValorComoEntero(ddlTiposGastos), Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@VC_RutDeudor", Valor = txtRutDeudor.Text.Trim(), Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });
            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@VC_NumeroSucursal", Valor = txtNumeroSucursal.Text.Trim(), Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            objServicio.Parametros.Add(new ALCSA.FWK.BD.Parametro()
            {
                Nombre = "@DAT_FechaIngreso", Valor = ALCSA.FWK.Web.Control.ExtraerValorComoDateTime(txtFechaIngreso), Direccion = ALCSA.FWK.BD.Enumeradores.Direcciones.Entrada
            });

            DataTable objTable = objServicio.EjecutarDataTable();

            gvGastos.PageIndex  = indice;
            gvGastos.DataSource = objTable;
            gvGastos.DataBind();

            if (!exportarExcel)
            {
                return;
            }

            string strNombreArchivo = string.Format("Gastos_{0:ddMMyyyy_hhmmss_ffff}.xls", DateTime.Now);

            using (System.IO.MemoryStream objArchivoMemoria = new ALCSA.Negocio.Documentos.GeneradorExcel().ExportarDataTableAExcel(
                       objTable,
                       "Tablero",
                       new string[] {
                "NumeroOperacion", "RutCliente", "NombreCliente", "RutDeudor", "NombreDeudor", "NumeroSucursal", "Rol", "NombreProcurador", "NumeroDocumento", "EstadoGasto", "FechaGasto",
                "TipoGasto", "MontoGasto"
            },
                       new string[] {
                "Numero Operacion", "Rut Cliente", "Nombre Cliente", "Rut Deudor", "Nombre Deudor", "N° Sucursal", "Rol", "Nombre Procurador", "Numero Documento", "Estado Gasto", "Fecha Gasto",
                "Tipo Gasto", "Monto Gasto"
            }))
            {
                new ALCSA.FWK.Web.Sitio().DescargarArchivo(Response, objArchivoMemoria, strNombreArchivo);
            }
        }
        private void ConsultaJU(string id_cobranza)
        {
            DataTable table = ConsultasEspecificas.Consulta_Juicios_DOS(id_cobranza);

            if (table != null && table.Rows.Count > 0)
            {
                this.txtNombreCliente.Text = table.Rows[0]["cliente"].ToString();
                this.txtNroOperacion.Text  = table.Rows[0]["nrooperacion"].ToString();
                this.txtDeudor.Text        = table.Rows[0]["nomdeudor"].ToString();
                this.txtRutdeudor.Text     = table.Rows[0]["rut_deudor"].ToString();
                this.txttramite.Text       = table.Rows[0]["tramite"].ToString();
                this.txtFechaTramite.Text  = table.Rows[0]["ftramite"].ToString();
                this.txtJuzgado.Text       = table.Rows[0]["tribunal"].ToString();
                this.txtRol.Text           = table.Rows[0]["rol"].ToString();
                this.txtAbogado.Text       = table.Rows[0]["abogado"].ToString();
                this.txtProcurador.Text    = table.Rows[0]["procurador"].ToString();
                this.txtEstado.Text        = table.Rows[0]["estadojuicio"].ToString();
                this.hdfIdJuicio.Value     = table.Rows[0]["id_juicios"].ToString();
                // this.hddDocumento.Value = table.Rows[0]["urldocumento"].ToString();
                this.txtProcedimiento.Text = table.Rows[0]["Procedimiento"].ToString();
                this.txtMateria.Text       = table.Rows[0]["Materia"].ToString();
                this.txtProducto.Text      = table.Rows[0]["Producto"].ToString();
                this.txtEtapa.Text         = table.Rows[0]["etapa"].ToString();
                this.hdfTipoCobranza.Value = table.Rows[0]["TipoCobranza"].ToString();

                string strIdProducto = table.Rows[0]["id_producto"].ToString();

                if (strIdProducto == "1")
                {
                    this.hdfTipoDocumentoCobranza.Value = "MUTUO";
                }

                else if (strIdProducto == "2")
                {
                    this.hdfTipoDocumentoCobranza.Value = "DOCUPAGARE";
                }

                else if (strIdProducto == "3")
                {
                    this.hdfTipoDocumentoCobranza.Value = "DOCUJUICIO";
                }

                else if (strIdProducto == "4")
                {
                    this.hdfTipoDocumentoCobranza.Value = "DocuEstandardUNO";
                }

                else if (strIdProducto == "5")
                {
                    this.hdfTipoDocumentoCobranza.Value = "DocuEstandardDOS";
                }

                else if (strIdProducto == "14")
                {
                    this.hdfTipoDocumentoCobranza.Value = "DocuEstandardTRES";
                }

                else if (strIdProducto == "12")
                {
                    this.hdfTipoDocumentoCobranza.Value = "DocuEstandardCUATRO";
                }

                ALCSA.FWK.BD.Servicio objServicio = new ALCSA.FWK.BD.Servicio();
                objServicio.Comando     = string.Format("SELECT * FROM BitacoraEstadoJuicio WHERE id_cobranza = {0}", id_cobranza);
                objServicio.TipoComando = ALCSA.FWK.BD.Enumeradores.TiposComandos.Query;
                objServicio.Conexion    = "CONN";

                gvObservaciones.DataSource = objServicio.EjecutarDataTable();
                gvObservaciones.DataBind();

                // if (gvObservaciones.Rows.Count.Equals(0)) pnlObservaciones.Height = new Unit(50, UnitType.Pixel);
            }
        }