Esempio n. 1
0
        private void MostrarDatosJuicio(string id_cobranza)
        {
            DataTable table = ConsultasEspecificas.MostrarDatosJuicio(id_cobranza);

            if (table.Rows.Count > 0)
            {
                this.txtNroOperacion.Text    = table.Rows[0]["nrooperacion"].ToString();
                this.txtNomDeudor.Text       = table.Rows[0]["deudor"].ToString();
                this.txtRutDeudor.Text       = table.Rows[0]["rut_deudor"].ToString();
                this.txtProcedimiento.Text   = table.Rows[0]["procedimiento"].ToString().ToUpper();
                this.txtMateria.Text         = table.Rows[0]["materia"].ToString().ToUpper();
                this.txtProducto.Text        = table.Rows[0]["producto"].ToString().ToUpper();
                this.cbxEstado.SelectedValue = table.Rows[0]["tipo"].ToString().ToUpper().Trim();
                this.hdfEstadoActual.Value   = table.Rows[0]["tipo"].ToString().ToUpper().Trim();

                ALCSA.FWK.Web.Control.SeleccionarValor(cbxClientes, table.Rows[0]["rut_cli"].ToString());
            }

            DataTable table2 = ConsultasEspecificas.MostrarDatJuicios(id_cobranza);

            if ((table2.Rows.Count > 0) && (table2 != null))
            {
                this.txtRol.Text = table2.Rows[0]["rol"].ToString();

                ListItem objItem = null;
                if ((objItem = cbxListaJurisdiccion.Items.FindByValue(table2.Rows[0]["id_jurisdiccion"].ToString())) != null)
                {
                    cbxListaJurisdiccion.SelectedIndex = -1;
                    objItem.Selected = true;
                    ComboTribunal();
                    if ((objItem = cbxJuzgados.Items.FindByValue(table2.Rows[0]["id_tribunal"].ToString())) != null)
                    {
                        cbxJuzgados.SelectedIndex = -1;
                        objItem.Selected          = true;
                    }
                }

                if (table2.Rows[0]["id_riesgo"] != null && (objItem = ddlRiesgo.Items.FindByValue(table2.Rows[0]["id_riesgo"].ToString())) != null)
                {
                    ddlRiesgo.SelectedIndex = -1;
                    objItem.Selected        = true;
                }

                if (table2.Rows[0]["fecha_motivo_riesgo"] != null)
                {
                    DateTime datFecha = Convert.ToDateTime(table2.Rows[0]["fecha_motivo_riesgo"]);
                    ALCSA.FWK.Web.Control.AsignarValor(txtFechaRiesgo, datFecha);
                }

                this.hdfIdJuicio.Value = table2.Rows[0]["ID"].ToString();

                gvObservaciones.DataSource = new ALCSA.Negocio.Cobranzas.Bitacora().Listar(Convert.ToInt32(id_cobranza));
                gvObservaciones.DataBind();
            }
            else
            {
                this.txtRol.Enabled      = false;
                this.cbxJuzgados.Enabled = false;
                this.Page.RegisterClientScriptBlock("Mensaje", "<script>alert('Aviso! No se ha ingresado juicio a este caso');</script>");
            }
        }