Esempio n. 1
0
        private void ActualizarInforme()
        {
            InformePartidasDefuncionDal oPartidasDefuncion = new InformePartidasDefuncionDal();
            bool cargar = oPartidasDefuncion.Cargar(int.Parse(idInforme.Value));
            // Usuario Logueado
            UsuarioAutenticado Usuario = (UsuarioAutenticado)Session["UsuarioAutenticado"];

            oPartidasDefuncion.IdCliente = Usuario.IdCliente;
            oPartidasDefuncion.IdUsuario = Usuario.IdUsuario;

            oPartidasDefuncion.IdInforme = int.Parse(idInforme.Value);

            oPartidasDefuncion.Nombre        = txtNombre.Text;
            oPartidasDefuncion.Apellido      = txtApellido.Text;
            oPartidasDefuncion.TipoDocumento = int.Parse(cmbTipoDocumento.SelectedItem.Value);
            oPartidasDefuncion.Documento     = txtDocumento.Text;

            oPartidasDefuncion.Observaciones = txtObservaciones.Text.ToUpper();

            SubirArchivo();

            if (int.Parse(idReferencia.Value) == 0)
            {
                oPartidasDefuncion.Crear();
            }
            else
            {
                oPartidasDefuncion.Modificar(int.Parse(idInforme.Value));
            }
        }
Esempio n. 2
0
        private void CargarInformePartidasDefuncion(int Id)
        {
            InformePartidasDefuncionDal oPartidasDefuncion = new InformePartidasDefuncionDal();
            bool cargar = oPartidasDefuncion.Cargar(Id);

            if (cargar)
            {
                idReferencia.Value = (1).ToString();
                CargarForm(oPartidasDefuncion);
            }
            else
            {
                idReferencia.Value = (0).ToString();
                EncabezadoApp oEncabezado = new EncabezadoApp();
                oEncabezado.cargarEncabezado(Id);
                CargarEncabezado(oEncabezado);
                CargarDatosContacto(oEncabezado);
            }
        }
Esempio n. 3
0
        private void CargarForm(InformePartidasDefuncionDal oPartidasDefuncion)
        {
            CultureInfo myInfo = new CultureInfo("es-AR");

            idInforme.Value = oPartidasDefuncion.IdInforme.ToString();

            txtNombre.Text   = oPartidasDefuncion.Nombre;
            txtApellido.Text = oPartidasDefuncion.Apellido;
            CargarTipoDocumento(oPartidasDefuncion.TipoDocumento);
            txtDocumento.Text     = oPartidasDefuncion.Documento;
            txtObservaciones.Text = oPartidasDefuncion.Observaciones;

            ArchivoDal vArchivo = new ArchivoDal();

            vArchivo.Cargar(oPartidasDefuncion.IdInforme);
            hlArchivo.Text        = "<b>Descargar archivo</b>";
            hlArchivo.NavigateUrl = vArchivo.Path;
            if (vArchivo.Extension == ".pdf")
            {
                imgArchivo.ImageUrl = "/img/menu/pdf.png";
            }
        }