Example #1
0
        private void CargarDatosDocumentoEstandarCuatro(int idCobranza)
        {
            ALCSA.Negocio.Cobranzas.DocumentoEstandard4 objDocumento = new ALCSA.Negocio.Cobranzas.DocumentoEstandard4();
            if (!objDocumento.CargarPorCobranza(idCobranza))
            {
                return;
            }

            AsignarValor("lblDomicilio", objDocumento.DireccionDemandado);
            AsignarValor("lblNombreRepresentante", objDocumento.NomRepresLegal);
            AsignarValor("lblMontoTotal", objDocumento.Cuantia);
            AsignarValor("lblMontoTotalPalabras", ALCSA.FWK.Numero.ConvertirNumeroEnPalabras(objDocumento.Cuantia, 2));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack)
            {
                return;
            }

            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);

            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();

            ALCSA.Negocio.Cobranzas.DocumentoEstandard4 objDocumento = new ALCSA.Negocio.Cobranzas.DocumentoEstandard4();
            if (objDocumento.CargarPorCobranza(objCobranza.ID))
            {
                ALCSA.FWK.Web.Control.AsignarValor(hdfIdDocumento4, objDocumento.ID);

                txtRutDeudor2.Text = ALCSA.FWK.IdentificacionTributaria.FormatearRut(objDocumento.RutDemandado2);
                ALCSA.FWK.Web.Control.AsignarValor(hdfIdDomicilioDeudor, objDocumento.IdDomicilioDemandado);
                ALCSA.FWK.Web.Control.AsignarValor(hdfIdDomicilioDeudor2, objDocumento.IdDomicilioDemandado2);

                txtRutRepresentante.Text = ALCSA.FWK.IdentificacionTributaria.FormatearRut(objDocumento.RutRepresLegal);

                ALCSA.FWK.Web.Control.AsignarValor(txtNombreRepresentante, objDocumento.NomRepresLegal);
                ALCSA.FWK.Web.Control.AsignarValor(txtDireccionRepresentante, objDocumento.DireRepresLegal);
                ALCSA.FWK.Web.Control.AsignarValor(txtProfesionOficioRepresentante, objDocumento.ProfesionRepresLegal);
                ALCSA.FWK.Web.Control.AsignarValor(txtcuantia, objDocumento.Cuantia, 0);
                ALCSA.FWK.Web.Control.AsignarValor(txtRelaciondeloshechos, objDocumento.RelacionHechos);
                ALCSA.FWK.Web.Control.AsignarValor(txtPetitorio, objDocumento.Petitorio);
                ALCSA.FWK.Web.Control.AsignarValor(txtdocumentosfundantes, objDocumento.DocFundantes);
                ALCSA.FWK.Web.Control.AsignarValor(txtObservacion, objDocumento.Observacion);
                ALCSA.FWK.Web.Control.AsignarValor(txtDelito, objDocumento.Delito);
                ALCSA.FWK.Web.Control.AsignarValor(txtFechaComisionDelito, objDocumento.FechaComisionDelito);
                ALCSA.FWK.Web.Control.AsignarValor(txtsituacionautor, objDocumento.SituacionAutor);

                txtDomicilioDeudor.Text  = objDocumento.DireccionDemandado;
                txtDomicilioDeudor2.Text = objDocumento.DireccionDemandadoDos;
                txtNombreDeudor2.Text    = objDocumento.NombreDemandadoDos;

                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();
                }
            }
        }