protected void Page_Init(object sender, EventArgs e) { if (!Page.IsPostBack) { vIdSolicitud = null; int vIdSolicitudQS = -1; if (int.TryParse(Request.QueryString["SolicitudId"], out vIdSolicitudQS)) { vIdSolicitud = vIdSolicitudQS; } } SolicitudNegocio nSolicitud = new SolicitudNegocio(); SPE_OBTIENE_SOLICITUD_PLANTILLA_Result vSolicitud = new SPE_OBTIENE_SOLICITUD_PLANTILLA_Result(); if (vIdPlantillaFormulario != null) { vSolicitud = nSolicitud.ObtenerSolicitudPlantilla(vIdPlantillaFormulario, null, null); } else { vSolicitud = nSolicitud.ObtenerSolicitudPlantilla(null, vIdSolicitud, null); } vXmlSolicitud = vSolicitud.XML_SOLICITUD_PLANTILLA; vXmlValoresSolicitud = vSolicitud.XML_VALORES; vXmlDocumentos = vSolicitud.XML_VALORES; vIdItemFoto = vSolicitud.ID_ITEM_FOTOGRAFIA; if (vSolicitud.FI_FOTOGRAFIA != null) { rbiFotoEmpleado.DataValue = vSolicitud.FI_FOTOGRAFIA; } }
public SPE_OBTIENE_SOLICITUD_PLANTILLA_Result ObtenerSolicitudPlantilla(int?pIdPlantilla, int?pIdSolicitud, Guid?pFlPlantillaSolicitud) { SolicitudOperaciones oSolicitud = new SolicitudOperaciones(); SPE_OBTIENE_SOLICITUD_PLANTILLA_Result vSolicitudPlantilla = oSolicitud.ObtenerSolicitudPlantilla(pIdPlantilla, pIdSolicitud, pFlPlantillaSolicitud); XElement vSolicitud = XElement.Parse(vSolicitudPlantilla.XML_SOLICITUD_PLANTILLA); XElement vValores = XElement.Parse(vSolicitudPlantilla.XML_VALORES); foreach (XElement vXmlContenedor in vSolicitud.Element("CONTENEDORES").Elements("CONTENEDOR")) { foreach (XElement vXmlCampo in vXmlContenedor.Elements("CAMPO")) { UtilXML.AsignarValorCampo(vXmlCampo, vValores); } } vSolicitudPlantilla.XML_SOLICITUD_PLANTILLA = vSolicitud.ToString(); return(vSolicitudPlantilla); }
protected void Page_Init(object sender, EventArgs e) { if (!Page.IsPostBack) { vIdSolicitud = null; int vIdSolicitudQS = -1; if (int.TryParse(Request.QueryString["SolicitudId"], out vIdSolicitudQS)) { vIdSolicitud = vIdSolicitudQS; } if (Request.QueryString["FG_HABILITADO"] != null) { if (Request.QueryString["FG_HABILITADO"] == "False") { btnGuardar.Enabled = false; btnGuardarSalir.Enabled = false; } } if (ContextoUsuario.oUsuario != null) { SeguridadProcesos(); } if (Request.QueryString["PlantillaId"] != null) { vIdPlantillaFormulario = (int.Parse(Request.QueryString["PlantillaId"])); } } if (vDatosModificar == null) { vDatosModificar = new List <KeyValuePair <string, string> >(); } if (vControlDependienteSeleccion == null) { vControlDependienteSeleccion = new List <E_GENERICA>(); } SolicitudNegocio nSolicitud = new SolicitudNegocio(); SPE_OBTIENE_SOLICITUD_PLANTILLA_Result vSolicitud = new SPE_OBTIENE_SOLICITUD_PLANTILLA_Result(); if (vIdPlantillaFormulario != null) { vSolicitud = nSolicitud.ObtenerSolicitudPlantilla(vIdPlantillaFormulario, null, null); } else { vSolicitud = nSolicitud.ObtenerSolicitudPlantilla(null, vIdSolicitud, null); } vXmlSolicitud = vSolicitud.XML_SOLICITUD_PLANTILLA; vPlantilla = new Plantilla() { ctrlPlantilla = new Contenedor() { NbContenedor = "PlantillaSolicitud", CtrlContenedor = mpgSolicitud }, lstContenedores = ObtenerContenedores(), xmlPlantilla = vXmlSolicitud }; vXmlDocumentos = vSolicitud.XML_VALORES; vIdItemFoto = vSolicitud.ID_ITEM_FOTOGRAFIA; if (vSolicitud.FI_FOTOGRAFIA != null) { rbiFotoEmpleado.DataValue = vSolicitud.FI_FOTOGRAFIA; btnEliminarFotoEmpleado.Visible = true; } else { btnEliminarFotoEmpleado.Visible = false; } vPlantilla.CrearFormulario(!Page.IsPostBack); }