예제 #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);
            lblNum.Text         = Id.ToString();
            lblFec.Text         = DateTime.Today.ToShortDateString();
            lblSolicitante.Text = cliente.RazonSocial;

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

            CargarEncabezado(oEncabezado);
            oEncabezado.Leido = 1;
            oEncabezado.CambiarLeido(Id);
        }
예제 #2
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);
            }
        }
예제 #3
0
 private void CargarForm(VerifDomLaboralApp oVerifDom)
 {
     lblNombre.Text         = oVerifDom.Nombre;
     lblApellido.Text       = oVerifDom.Apellido;
     lblTipoDocumento.Text  = LoadTipoDNI(oVerifDom.TipoDocumento);
     lblDocumento.Text      = oVerifDom.Documento;
     lblEstadoCivil.Text    = LoadEstadoCivil(oVerifDom.EstadoCivil);
     lblNombreFantasia.Text = oVerifDom.NombreFantasia;
     lblRazonSocial.Text    = oVerifDom.RazonSocial;
     lblRubro.Text          = oVerifDom.Rubro;
     lblCUIT.Text           = oVerifDom.Cuit;
     lblCalle.Text          = oVerifDom.Calle;
     lblBarrio.Text         = oVerifDom.Barrio;
     lblNro.Text            = oVerifDom.Nro;
     lblPiso.Text           = oVerifDom.Piso;
     lblDpto.Text           = oVerifDom.Depto;
     lblCP.Text             = oVerifDom.CP;
     lblTelefono.Text       = oVerifDom.Telefono;
     lblLocalidad.Text      = CargarLocalidades(23, oVerifDom.IdLocalidad);
     if (oVerifDom.Fecha != "")
     {
         lblFecha.Text = DateTime.Parse(oVerifDom.Fecha).ToString("dd/MM/yyyy", DateTimeFormatInfo.InvariantInfo);
     }
     lblOcupacion.Text  = oVerifDom.Ocupacion;
     lblCargo.Text      = oVerifDom.Cargo;
     lblAntiguedad.Text = oVerifDom.Antiguedad;
     if (oVerifDom.FechaFinalizacion != "")
     {
         lblFechaFinalizacion.Text = DateTime.Parse(oVerifDom.FechaFinalizacion).ToString("dd/MM/yyyy", DateTimeFormatInfo.InvariantInfo);
     }
     lblSueldo.Text = oVerifDom.Sueldo;
     lblAFavor.Text = oVerifDom.AFavor;
     if (oVerifDom.TrabajaLugar == 0 || oVerifDom.TrabajaLugar == 1)
     {
         lblLugarDeclarado.Text = (oVerifDom.TrabajaLugar == 1) ? "Si" : "No";
     }
     if (oVerifDom.Permanente == 0 || oVerifDom.Permanente == 1)
     {
         lblPermanente.Text = (oVerifDom.Permanente == 1) ? "Si" : "No";
     }
     if (oVerifDom.Contratado == 0 || oVerifDom.Contratado == 1)
     {
         lblContratado.Text = (oVerifDom.Contratado == 1) ? "Si" : "No";
     }
     if (oVerifDom.Embargos == 0 || oVerifDom.Embargos == 1)
     {
         lblEmbargos.Text = (oVerifDom.Embargos == 1) ? "Si" : "No";
     }
     lblUbicacion.Text          = CargarTipoCampo(oVerifDom.Ubicacion, 3);
     lblZona.Text               = CargarTipoCampo(oVerifDom.Zona, 9);
     lblInformo.Text            = oVerifDom.Informo;
     lblCargoInformo.Text       = oVerifDom.CargoInformo;
     lblNombreVecino.Text       = oVerifDom.NombreVecino;
     lblDomicilioVecino.Text    = oVerifDom.DomicilioVecino;
     lblConoceVecino.Text       = oVerifDom.ConoceVecino;
     lblInformesAnteriores.Text = oVerifDom.InformesAnteriores;
     lblObservaciones.Text      = oVerifDom.Observaciones;
 }
예제 #4
0
        private void CargarCampos(RadioButtonList campo, int idTipo, int valor)
        {
            campo.Items.Clear();
            VerifDomLaboralApp oVerifDom    = new VerifDomLaboralApp();
            DataTable          dtTraerCampo = oVerifDom.TraerCampo(idTipo);
            ListItem           myItem;

            foreach (DataRow myRow in dtTraerCampo.Rows)
            {
                myItem = new ListItem(" " + myRow[1].ToString(), myRow[0].ToString());
                if (valor == int.Parse(myRow[0].ToString()))
                {
                    campo.SelectedIndex = -1;
                    myItem.Selected     = true;
                }
                campo.Items.Add(myItem);
            }
        }
예제 #5
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);
                }
            }
        }
예제 #6
0
 private void CargarForm(VerifDomLaboralApp oVerifDom)
 {
     lblNombre.Text            = oVerifDom.Nombre;
     lblApellido.Text          = oVerifDom.Apellido;
     lblTipoDocumento.Text     = LoadTipoDNI(oVerifDom.TipoDocumento);
     lblDocumento.Text         = oVerifDom.Documento;
     lblEstadoCivil.Text       = LoadEstadoCivil(oVerifDom.EstadoCivil);
     lblNombreFantasia.Text    = oVerifDom.NombreFantasia;
     lblRazonSocial.Text       = oVerifDom.RazonSocial;
     lblRubro.Text             = oVerifDom.Rubro;
     lblCUIT.Text              = oVerifDom.Cuit;
     lblCalle.Text             = oVerifDom.Calle;
     lblBarrio.Text            = oVerifDom.Barrio;
     lblNro.Text               = oVerifDom.Nro;
     lblPiso.Text              = oVerifDom.Piso;
     lblDpto.Text              = oVerifDom.Depto;
     lblCP.Text                = oVerifDom.CP;
     lblTelefono.Text          = oVerifDom.Telefono;
     lblLocalidad.Text         = CargarLocalidades(35, oVerifDom.IdLocalidad);
     lblFecha.Text             = oVerifDom.Fecha;
     lblOcupacion.Text         = oVerifDom.Ocupacion;
     lblCargoInformo.Text      = oVerifDom.Cargo;
     lblAntiguedad.Text        = oVerifDom.Antiguedad;
     lblFechaFinalizacion.Text = oVerifDom.FechaFinalizacion;
     lblSueldo.Text            = oVerifDom.Sueldo;
     lblAFavor.Text            = oVerifDom.AFavor;
     lblLugarDeclarado.Text    = (oVerifDom.TrabajaLugar == 1)?  "Si" : "No";
     lblPermanente.Text        = (oVerifDom.Permanente == 1)?  "Si" : "No";
     lblContratado.Text        = (oVerifDom.Contratado == 1)?  "Si" : "No";
     lblEmbargos.Text          = (oVerifDom.Embargos == 1)?  "Si" : "No";
     lblInformo.Text           = oVerifDom.Informo;
     lblCargo.Text             = oVerifDom.Cargo;
     lblNombreVecino.Text      = oVerifDom.NombreVecino;
     lblDomicilioVecino.Text   = oVerifDom.DomicilioVecino;
     lblConoceVecino.Text      = oVerifDom.ConoceVecino;
     lblObservaciones.Text     = oVerifDom.Observaciones;
 }
예제 #7
0
        private void CargarForm(VerifDomLaboralApp oVerifDom)
        {
            idInforme.Value  = oVerifDom.IdInforme.ToString();
            txtNombre.Text   = oVerifDom.Nombre;
            txtApellido.Text = oVerifDom.Apellido;
            CargarTipoDocumento(oVerifDom.TipoDocumento);
            txtDocumento.Text = oVerifDom.Documento;
            CargarEstadoCivil(oVerifDom.EstadoCivil);

            /*ListItem item=cmbEmpresas.Items.FindByText(oVerifDom.RazonSocial);
             * if (item.Text!="")
             * {
             *  cmbEmpresas.SelectedValue=item.Value;
             *  ActualizarDatosEmpresa();
             * }*/

            txtRazonSocial.Text     = oVerifDom.RazonSocial;
            hEmpresasNombre.Value   = oVerifDom.RazonSocial;
            txtNombreFantasia.Text  = oVerifDom.NombreFantasia;
            hEmpresasFantasia.Value = oVerifDom.NombreFantasia;
            txtRubro.Text           = oVerifDom.Rubro;
            txtCuit.Text            = oVerifDom.Cuit;
            txtCalle.Text           = oVerifDom.Calle;
            txtBarrio.Text          = oVerifDom.Barrio;
            txtNro.Text             = oVerifDom.Nro;
            txtPiso.Text            = oVerifDom.Piso;
            txtDepto.Text           = oVerifDom.Depto;
            txtCP.Text       = oVerifDom.CP;
            txtTelefono.Text = oVerifDom.Telefono;
            CargarComboLocalidades(cmbLocalidad, oVerifDom.IdLocalidad);
            if (oVerifDom.Fecha != "")
            {
                txtFecha.Text = DateTime.Parse(oVerifDom.Fecha).ToString("dd/MM/yyyy", DateTimeFormatInfo.InvariantInfo);
            }
            txtOcupacion.Text    = oVerifDom.Ocupacion;
            txtCargoInformo.Text = oVerifDom.Cargo;
            txtAntiguedad.Text   = oVerifDom.Antiguedad;
            if (oVerifDom.FechaFinalizacion != "")
            {
                txtFechaFinalizacion.Text = DateTime.Parse(oVerifDom.FechaFinalizacion).ToString("dd/MM/yyyy", DateTimeFormatInfo.InvariantInfo);
            }
            txtSueldo.Text = oVerifDom.Sueldo;
            txtAFavor.Text = oVerifDom.AFavor;
            if (oVerifDom.TrabajaLugar == 0 || oVerifDom.TrabajaLugar == 1)
            {
                raTrabajaLugar.SelectedValue = (oVerifDom.TrabajaLugar == 1) ? (1).ToString() : (0).ToString();
            }
            if (oVerifDom.Permanente == 0 || oVerifDom.Permanente == 1)
            {
                raPermanente.SelectedValue = (oVerifDom.Permanente == 1) ? (1).ToString() : (0).ToString();
            }
            if (oVerifDom.Contratado == 0 || oVerifDom.Contratado == 1)
            {
                raContratado.SelectedValue = (oVerifDom.Contratado == 1) ? (1).ToString() : (0).ToString();
            }
            if (oVerifDom.Embargos == 0 || oVerifDom.Embargos == 1)
            {
                raEmbargos.SelectedValue = (oVerifDom.Embargos == 1) ? (1).ToString() : (0).ToString();
            }
            CargarCampos(raUbicacion, 3, oVerifDom.Ubicacion);
            CargarCampos(raCaractZona, 9, oVerifDom.Zona);
            txtInformo.Text            = oVerifDom.Informo;
            txtCargo.Text              = oVerifDom.Cargo;
            txtNombreVecino.Text       = oVerifDom.NombreVecino;
            txtDomicilioVecino.Text    = oVerifDom.DomicilioVecino;
            txtConoceVecino.Text       = oVerifDom.ConoceVecino;
            txtInformesAnteriores.Text = oVerifDom.InformesAnteriores;
            txtObservaciones.Text      = oVerifDom.Observaciones;
        }
예제 #8
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();
        }
예제 #9
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);
            }
        }