Exemplo n.º 1
0
        private void LoadInforme(int Id)
        {
            VerifDomLaboralApp oVerifDom = new VerifDomLaboralApp();

            EncabezadoApp oEncabezado = new EncabezadoApp();

            oEncabezado.cargarEncabezado(Id);
            ClienteDal cliente = new ClienteDal();

            cliente.Cargar(oEncabezado.IdCliente);
            Usuario usuario = new Usuario();

            usuario.Cargar(oEncabezado.IdUsuario);
            bool cargar = oVerifDom.cargarVerifDomLaboral(Id);

            if (cargar)
            {
                lblNum.Text         = Id.ToString();
                lblFec.Text         = DateTime.Today.ToShortDateString();
                lblSolicitante.Text = cliente.RazonSocial;
                lblRef.Text         = usuario.Apellido + ", " + usuario.Nombre;
                CargarForm(oVerifDom);
            }
            else
            {
                CargarEncabezado(oEncabezado);
            }
        }
Exemplo n.º 2
0
        private void LoadVerifDomLaboral(int Id)
        {
            VerifDomLaboralApp oVerifDom   = new VerifDomLaboralApp();
            EncabezadoApp      oEncabezado = new EncabezadoApp();

            oEncabezado.cargarEncabezado(Id);
            CargarDatosContacto(oEncabezado);

            ViewState["ConFoto"] = true;
            if (oEncabezado.ConFoto == 1)
            {
                pnlImagenes.Visible = true;
                hypMasFotos.Attributes.Add("onClick", "javascript:mostrarImagenes('/Admin/Imagenes/AbmImagenes.aspx?Informe=" + oEncabezado.IdEncabezado.ToString() + "');");
                CargarImagen();
            }
            else
            {
                pnlImagenes.Visible = false;
            }

            bool cargar = oVerifDom.cargarVerifDomLaboral(Id);

            if (cargar)
            {
                idReferencia.Value = (1).ToString();
                CargarTipoDocumento(-1);
                CargarForm(oVerifDom);
                if (oVerifDom.Documento.Length > 6)
                {
                    ControlarSolicitudesDNI(Id, oVerifDom.Documento);
                }
            }
            else
            {
                idReferencia.Value = (0).ToString();
                CargarEncabezado(oEncabezado);
                if (oEncabezado.Documento.Length > 6)
                {
                    ControlarSolicitudesDNI(Id, oEncabezado.Documento);
                }
            }
        }
Exemplo n.º 3
0
        private void ActualizarInforme()
        {
            VerifDomLaboralApp oVerifDom = new VerifDomLaboralApp();
            bool cargar = oVerifDom.cargarVerifDomLaboral(int.Parse(idInforme.Value));
            // Usuario Logueado
            UsuarioAutenticado Usuario = (UsuarioAutenticado)Session["UsuarioAutenticado"];

            oVerifDom.IdCliente = Usuario.IdCliente;
            oVerifDom.IdUsuario = Usuario.IdUsuario;

            oVerifDom.IdInforme      = int.Parse(idInforme.Value);
            oVerifDom.Nombre         = txtNombre.Text.ToUpper();
            oVerifDom.Apellido       = txtApellido.Text.ToUpper();
            oVerifDom.TipoDocumento  = int.Parse(cmbTipoDocumento.SelectedItem.Value);
            oVerifDom.Documento      = txtDocumento.Text.ToUpper();
            oVerifDom.EstadoCivil    = int.Parse(cmbEstadoCivil.SelectedValue);
            oVerifDom.NombreFantasia = txtNombreFantasia.Text.ToUpper();
            oVerifDom.RazonSocial    = txtRazonSocial.Text.ToUpper();
            oVerifDom.Rubro          = txtRubro.Text.ToUpper();
            oVerifDom.Cuit           = txtCuit.Text.ToUpper();
            oVerifDom.Calle          = txtCalle.Text.ToUpper();
            oVerifDom.Barrio         = txtBarrio.Text.ToUpper();
            oVerifDom.Nro            = txtNro.Text.ToUpper();
            oVerifDom.Piso           = txtPiso.Text.ToUpper();
            oVerifDom.Depto          = txtDepto.Text.ToUpper();
            oVerifDom.CP             = txtCP.Text.ToUpper();
            oVerifDom.Telefono       = txtTelefono.Text.ToUpper();
            cmbLocalidad.FindControl("cmbLocalidad");
            if (cmbLocalidad.SelectedIndex != -1 && cmbLocalidad.SelectedItem.Value != "")
            {
                oVerifDom.IdLocalidad = int.Parse(cmbLocalidad.SelectedItem.Value);
            }
            oVerifDom.Fecha             = txtFecha.Text.ToUpper();
            oVerifDom.Ocupacion         = txtOcupacion.Text.ToUpper();
            oVerifDom.Cargo             = txtCargo.Text.ToUpper();
            oVerifDom.CargoInformo      = txtCargoInformo.Text.ToUpper();
            oVerifDom.Antiguedad        = txtAntiguedad.Text.ToUpper();
            oVerifDom.FechaFinalizacion = txtFechaFinalizacion.Text.ToUpper();
            oVerifDom.Sueldo            = txtSueldo.Text.ToUpper();
            oVerifDom.AFavor            = txtAFavor.Text.ToUpper();

            if (raTrabajaLugar.SelectedItem != null)
            {
                oVerifDom.TrabajaLugar = int.Parse(raTrabajaLugar.SelectedItem.Value);
            }
            else
            {
                oVerifDom.TrabajaLugar = -1;
            }

            if (raPermanente.SelectedItem != null)
            {
                oVerifDom.Permanente = int.Parse(raPermanente.SelectedItem.Value);
            }
            else
            {
                oVerifDom.Permanente = -1;
            }

            if (raContratado.SelectedItem != null)
            {
                oVerifDom.Contratado = int.Parse(raContratado.SelectedItem.Value);
            }
            else
            {
                oVerifDom.Contratado = -1;
            }

            if (raEmbargos.SelectedItem != null)
            {
                oVerifDom.Embargos = int.Parse(raEmbargos.SelectedItem.Value);
            }
            else
            {
                oVerifDom.Embargos = -1;
            }

            if (raUbicacion.SelectedItem != null)
            {
                oVerifDom.Ubicacion = int.Parse(raUbicacion.SelectedItem.Value);
            }
            else
            {
                oVerifDom.Ubicacion = -1;
            }

            if (raCaractZona.SelectedItem != null)
            {
                oVerifDom.Zona = int.Parse(raCaractZona.SelectedItem.Value);
            }
            else
            {
                oVerifDom.Zona = -1;
            }

            oVerifDom.Informo            = txtInformo.Text.ToUpper();
            oVerifDom.CargoInformo       = txtCargoInformo.Text.ToUpper();
            oVerifDom.NombreVecino       = txtNombreVecino.Text.ToUpper();
            oVerifDom.DomicilioVecino    = txtDomicilioVecino.Text.ToUpper();
            oVerifDom.ConoceVecino       = txtConoceVecino.Text.ToUpper();
            oVerifDom.InformesAnteriores = txtInformesAnteriores.Text.ToUpper();
            oVerifDom.Observaciones      = txtObservaciones.Text.ToUpper();

            if (int.Parse(idReferencia.Value) == 0)
            {
                oVerifDom.Crear();
            }
            else
            {
                oVerifDom.Modificar(int.Parse(idInforme.Value));
            }


            PersonasAPP persona = new PersonasAPP();

            persona.Nombre        = txtNombre.Text;
            persona.Apellido      = txtApellido.Text;
            persona.EstadoCivil   = int.Parse(cmbEstadoCivil.SelectedValue);
            persona.TipoDocumento = int.Parse(cmbTipoDocumento.SelectedItem.Value);
            persona.Documento     = txtDocumento.Text;
            bool resultado = persona.Crear();
        }
Exemplo n.º 4
0
        private void LoadInforme(int Id)
        {
            VerifDomLaboralApp oVerifDom = new VerifDomLaboralApp();

            EncabezadoApp oEncabezado = new EncabezadoApp();

            oEncabezado.cargarEncabezado(Id);
            ClienteDal cliente = new ClienteDal();

            cliente.Cargar(oEncabezado.IdCliente);
            Usuario usuario = new Usuario();

            usuario.Cargar(oEncabezado.IdUsuario);
            if (oEncabezado.ConFoto == 1)
            {
                pnFotos.Visible = true;
                CargarImagen(oEncabezado.IdEncabezado, 1);
                CargarImagen(oEncabezado.IdEncabezado, 2);
            }
            else
            {
                imgFoto.Visible       = false;
                pnFotos.Visible       = false;
                lblNroPagina1.Visible = false;
            }
            bool cargar = oVerifDom.cargarVerifDomLaboral(Id);

            if (cargar)
            {
                lblNum.Text = Id.ToString();
                lblTipoDocumentoPeriodo.Text = TipoDocumentoPeriodo(cliente.TipoDocumento, cliente.TipoPeriodo);
                //lblFec.Text = DateTime.Today.ToShortDateString();
                if (oEncabezado.FechaFin != "")
                {
                    lblFec.Text = Convert.ToDateTime(oEncabezado.FechaFin).ToShortDateString();
                }

                string solicitante = "";
                if (cliente.NombreFantasia != null && cliente.NombreFantasia != "")
                {
                    solicitante = cliente.NombreFantasia;
                }
                else
                {
                    solicitante = cliente.RazonSocial;
                }
                if (cliente.Sucursal != null && cliente.Sucursal != "")
                {
                    solicitante = solicitante + " (" + cliente.Sucursal + ")";
                }
                lblSolicitante.Text = solicitante;

                string direccion = "";
                direccion = cliente.Calle + " " + cliente.Numero;
                if (cliente.Piso != "")
                {
                    direccion = direccion + " Piso: " + cliente.Piso;
                    direccion = direccion + " Dpto/Of: " + cliente.Departamento;
                }
                direccion = direccion + ". " + cliente.Barrio;
                lblDireccionSolicitante.Text = direccion;

                if (oEncabezado.idReferencia != 0)
                {
                    lblRef.Text = oEncabezado.NombreReferencia.ToUpper();
                }
                else if (oEncabezado.UsuarioCliente != "")
                {
                    lblRef.Text = oEncabezado.UsuarioCliente.ToUpper();
                }
                else
                {
                    lblRef.Text = usuario.Apellido.ToUpper() + ", " + usuario.Nombre.ToUpper();
                }


                if (oEncabezado.ConFoto == 1)
                {
                    lblNumCopy.Text                  = lblNum.Text;
                    lblFecCopy.Text                  = lblFec.Text;
                    lblSolicitanteCopy.Text          = lblSolicitante.Text;
                    lblDireccionSolicitanteCopy.Text = lblDireccionSolicitante.Text;
                    lblRefCopy.Text                  = lblRef.Text;
                    lblNroPagina1.Text               = "Página 1 de 2";
                    lblNroPagina2.Text               = "Página 2 de 2";
                }
                CargarForm(oVerifDom);
            }
            else
            {
                CargarEncabezado(oEncabezado);
            }
        }