public XElement InsertarActualizarPlantillaFormulario(string pClAccion, E_PLANTILLA pPlantillaFormulario, XElement pXmlCamposFormulario, string pClUsuario, string pNbPrograma)
 {
     using (context = new SistemaSigeinEntities())
     {
         //Declaramos el objeto de valor de retorno
         ObjectParameter pOutClRetorno = new ObjectParameter("XML_RESULTADO", typeof(XElement));
         context.SPE_INSERTA_ACTUALIZA_C_PLANTILLA_FORMULARIO(pOutClRetorno, pPlantillaFormulario.ID_PLANTILLA, pPlantillaFormulario.NB_PLANTILLA, pPlantillaFormulario.DS_PLANTILLA, pPlantillaFormulario.CL_FORMULARIO, pXmlCamposFormulario.ToString(), pPlantillaFormulario.XML_PLANTILLA_FORMULARIO, pPlantillaFormulario.XML_CAMPOS, pPlantillaFormulario.CL_EXPOSICION, pClUsuario, pNbPrograma, pClAccion);
         //regresamos el valor de retorno de sql
         return(XElement.Parse(pOutClRetorno.Value.ToString()));
     }
 }
        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>();
            }
        }
        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;
                }

                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;
                    vClTipoTransaccion  = "A";
                    break;

                case "copy":
                    txtNbPlantilla.EmptyMessage = vPlantilla.NB_PLANTILLA;
                    txtDsPlantilla.EmptyMessage = vPlantilla.DS_PLANTILLA;
                    vClTipoTransaccion          = "I";
                    break;
                }

                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;
        }
Пример #4
0
        public E_RESULTADO InsertaActualizaPlantillaFormulario(string pClAccion, E_PLANTILLA pPlantillaFormulario, string pClUsuario, string pNbPrograma)
        {
            XElement vLstCampos = new XElement("CAMPOS");

            int vNoOrden = 1;

            foreach (E_CAMPO campo in pPlantillaFormulario.LST_CAMPOS)
            {
                XElement vXmlCampoFormulario = new XElement("CAMPO_FORMULARIO",
                                                            new XAttribute("ID_CAMPO_FORMULARIO", campo.ID_CAMPO),
                                                            new XAttribute("CL_CONTENEDOR", campo.CL_CONTENEDOR),
                                                            new XAttribute("FG_HABILITADO", campo.FG_HABILITADO),
                                                            new XAttribute("FG_REQUERIDO", campo.FG_REQUERIDO),
                                                            new XAttribute("NO_ORDEN", vNoOrden++),
                                                            XElement.Parse(campo.XML_CAMPO));
                vLstCampos.Add(vXmlCampoFormulario);
            }

            PlantillaFormularioOperaciones oPlantilla = new PlantillaFormularioOperaciones();

            return(UtilRespuesta.EnvioRespuesta(oPlantilla.InsertarActualizarPlantillaFormulario(pClAccion, pPlantillaFormulario, vLstCampos, pClUsuario, pNbPrograma)));
        }