public IList <ALCSA.Entidades.Base> ListarTiposDocumentos() { IList <ALCSA.Entidades.Base> arrTipos = new ALCSA.Negocio.ServiciosJson.ListadorConceptos().Listar("TIPOS_DOCUMENTOS"); arrTipos.Insert(0, new ALCSA.Entidades.Base() { ID = 0, Nombre = "..." }); return(arrTipos); }
protected void Page_Load(object sender, EventArgs e) { // ---------------------------------------------------------------------------------- if (this.Page.IsPostBack) { return; } // ---------------------------------------------------------------------------------- ALCSA.Negocio.ServiciosJson.ListadorConceptos objConcepto = new ALCSA.Negocio.ServiciosJson.ListadorConceptos(); ddlNotarios.DataSource = objConcepto.Listar("NOTARIOS"); ddlNotarios.DataBind(); ddlNotarios.Items.Insert(0, new ListItem("...", "0")); ddlLocalidadesNotarios.DataSource = objConcepto.Listar("COMUNAS_NOTARIO"); ddlLocalidadesNotarios.DataBind(); ddlLocalidadesNotarios.Items.Insert(0, new ListItem("...", "0")); ddlBancos.DataSource = objConcepto.Listar("BANCOS"); ddlBancos.DataBind(); ddlBancos.Items.Insert(0, new ListItem("...", "0")); // ---------------------------------------------------------------------------------- int intIdCobranza = ALCSA.FWK.Web.Sitio.ExtraerValorQueryStringComoEntero(Request, "id_cob"); if (intIdCobranza < 1) { return; } hdfIdEsCobranzaNueva.Value = ALCSA.FWK.Web.Sitio.ExtraerValorQueryStringComoEntero(Request, "es_nueva").ToString(); btnGuardar.Text = hdfIdEsCobranzaNueva.Value.Equals("1") ? "GUARDAR" : "GUARDAR Y GENERAR"; // ---------------------------------------------------------------------------------- ALCSA.Negocio.Cobranzas.Cobranza objCobranza = new ALCSA.Negocio.Cobranzas.Cobranza(intIdCobranza); ALCSA.FWK.Web.Control.AsignarValor(hdfIdCobranza, objCobranza.ID); // ---------------------------------------------------------------------------------- AsignarTitulo(objCobranza.IdMateria); // ---------------------------------------------------------------------------------- txtNumeroOperacion.Text = objCobranza.Nrooperacion; txtRutCliente.Text = ALCSA.FWK.IdentificacionTributaria.FormatearRut(objCobranza.RutCli); txtRutDeudor.Text = ALCSA.FWK.IdentificacionTributaria.FormatearRut(objCobranza.RutDeudor); txtNombreCliente.Text = objCobranza.NombreCliente; txtNombreDeudor.Text = objCobranza.NombreDeudor; // ---------------------------------------------------------------------------------- CambiarColorControlesSoloLectura(); // ---------------------------------------------------------------------------------- IList <ALCSA.Entidades.Cobranzas.DocumentoJuicio> arrDocumentos = new ALCSA.Negocio.Cobranzas.DocumentoJuicio().Listar(intIdCobranza); // ---------------------------------------------------------------------------------- if (arrDocumentos.Count > 0) { ALCSA.Entidades.Cobranzas.DocumentoJuicio objDocumento = arrDocumentos[0]; ALCSA.FWK.Web.Control.AsignarValor(hdfIdDomicilioDeudor, objDocumento.IdDomicilio); txtRutRepresentanteUno.Text = ALCSA.FWK.IdentificacionTributaria.FormatearRut(objDocumento.Representante1); txtRutRepresentanteDos.Text = ALCSA.FWK.IdentificacionTributaria.FormatearRut(objDocumento.Representante2); txtRutEndosante.Text = ALCSA.FWK.IdentificacionTributaria.FormatearRut(objDocumento.RutDeudorEndosante); ALCSA.FWK.Web.Control.AsignarValor(hdfIdDomicilioEndosante, objDocumento.IdDomicilioEndosante); ALCSA.FWK.Web.Control.AsignarValor(txtFechaAceptacion, objDocumento.Faceptacion); ALCSA.FWK.Web.Control.SeleccionarValor(ddlNotarios, objDocumento.IdNotario); ALCSA.FWK.Web.Control.SeleccionarValor(ddlLocalidadesNotarios, objDocumento.IdComunaNotario); ALCSA.FWK.Web.Control.AsignarValor(txtFechaAutorizacionNotarial, objDocumento.Fautorizacionnotarial); txtTituloConstaDeuda.Text = objDocumento.Tituloconstadeuda; ALCSA.FWK.Web.Control.AsignarValor(txtFechaDeuda, objDocumento.Fdeuda); ALCSA.FWK.Web.Control.SeleccionarValor(ddlBancos, objDocumento.IdBanco); txtCtacte.Text = objDocumento.Ctacte; txtserie.Text = objDocumento.Numserie; ALCSA.FWK.Web.Control.AsignarValor(txtFechaGiroEmision, objDocumento.Fgiroemision); ALCSA.FWK.Web.Control.AsignarValor(txtfechaprescripcion, objDocumento.Fprescripcion); txtActaProtesto.Text = objDocumento.Actaprotesto; txtDireccionActa.Text = objDocumento.Direccionacta; txtObservacion.Text = objDocumento.Observacion; txtNombreRepresentanteUno.Text = objDocumento.NombreRepresentanteUno; txtNombreRepresentanteDos.Text = objDocumento.NombreRepresentanteDos; txtNombreEndosante.Text = objDocumento.NombreEndosante; txtDomicilioEndosante.Text = objDocumento.DireccionEndosante; txtDomicilioDeudor.Text = objDocumento.DireccionDeudor; IList <ALCSA.Entidades.Documentos.Fisicos.Documento> arrDocumentosFisicos = new ALCSA.Negocio.Documentos.Fisicos.Documento().Listar( objDocumento.IdCobranza.ToString(), ALCSA.Negocio.Documentos.Fisicos.TipoIdentificador.TIPO_IDENTIFICADOR_COBRANZA); if (arrDocumentosFisicos != null && arrDocumentosFisicos.Count > 0) { gvDocumentosFisicos.DataSource = arrDocumentosFisicos; gvDocumentosFisicos.DataBind(); } } // ---------------------------------------------------------------------------------- while (arrDocumentos.Count < 10) { arrDocumentos.Add(new ALCSA.Entidades.Cobranzas.DocumentoJuicio() { ID = 0, Monto = 0, Nrodocumento = string.Empty, IdTipoDocumento = 0 }); } gvDocumentos.DataSource = arrDocumentos; gvDocumentos.DataBind(); foreach (GridViewRow objFila in gvDocumentos.Rows) { TextBox txtFecha = objFila.FindControl("txtFechaVencimiento") as TextBox; txtFecha.Text = txtFecha.Text.Replace("-", "/"); if (ALCSA.FWK.Web.Control.ExtraerValorComoDateTime(txtFecha).Year < 1950) { txtFecha.Text = string.Empty; } } // ---------------------------------------------------------------------------------- txtNumeroOperacion.Focus(); // ---------------------------------------------------------------------------------- }