Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                vClAccion        = (string)Request.QueryString["AccionCl"];
                vClTipoPlantilla = (string)Request.QueryString["PlantillaTipoCl"];

                int idPlantilla = 0;
                if (int.TryParse((string)Request.QueryString["PlantillaId"], out idPlantilla))
                {
                    vIdPlantilla = idPlantilla;
                }
                listacambios = new List <E_CAMPO>();
                PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();
                vPlantilla = nPlantilla.ObtienePlantilla(vIdPlantilla, vClTipoPlantilla);

                //vXmlCampos = XElement.Parse(vPlantilla.XML_PLANTILLA_FORMULARIO);

                switch (vClAccion)
                {
                case "edit":
                    txtNbPlantilla.Text             = vPlantilla.NB_PLANTILLA;
                    txtDsPlantilla.Text             = vPlantilla.DS_PLANTILLA;
                    cmbTipoExposición.SelectedValue = vPlantilla.CL_EXPOSICION;
                    vClTipoTransaccion = "A";
                    break;

                case "copy":
                    txtNbPlantilla.EmptyMessage     = vPlantilla.NB_PLANTILLA;
                    txtDsPlantilla.EmptyMessage     = vPlantilla.DS_PLANTILLA;
                    cmbTipoExposición.SelectedValue = vPlantilla.CL_EXPOSICION;
                    vClTipoTransaccion = "I";
                    break;

                default:
                    cmbTipoExposición.SelectedValue = "INTERIOR";
                    break;
                }

                if (vPlantilla.CL_FORMULARIO == "SOLICITUD")
                {
                    cmbTipoExposición.Enabled = true;
                }


                CargarLista("PERSONAL", lstInformacionGeneral);
                CargarLista("ACADEMICA", lstFormacionAcademica);
                CargarLista("FAMILIAR", lstDatosFamiliares);
                CargarLista("LABORAL", lstExperienciaLaboral);
                CargarLista("COMPETENCIAS", lstInteresesCompetencias);
                CargarLista("ADICIONAL", lstInformacionAdicional);
                CargarLista(null, lstCamposDisponibles);
            }

            DespacharEventos(Request.Params.Get("__EVENTTARGET"), Request.Params.Get("__EVENTARGUMENT"));

            vClUsuario  = ContextoUsuario.oUsuario.CL_USUARIO;
            vNbPrograma = ContextoUsuario.nbPrograma;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.Params["plantillaId"] != null)
                {
                    vIdPlantilla          = int.Parse(Request.Params["plantillaId"]);
                    vClTipoPlantilla      = (string)Request.QueryString["PlantillaTipoCl"];
                    txbPrivacidad.Content = ContextoApp.IDP.MensajeCorreoSolicitud.dsMensaje;
                    PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();
                    vPlantilla = nPlantilla.ObtienePlantilla(vIdPlantilla, vClTipoPlantilla);
                }

                vCorreosNombres = new List <E_CORREO_ELECTRONICO>();
            }
        }