protected void Page_Load(object sender, EventArgs e) { vUsuarioSeleccion = ""; vNbPrograma = ContextoUsuario.nbPrograma; vClUsuario = ContextoUsuario.oUsuario.CL_USUARIO; vEmpleadosSeleccionados = new List <E_OBTIENE_PUESTO_EMPLEADOS>(); if (!IsPostBack) { ConfiguracionNotificacionNegocio negocio = new ConfiguracionNotificacionNegocio(); ListaEmpleados = new List <E_EMPLEADO_PDE>(); xmlPuestoEmpleado = negocio.ObtienePuestoEmpleado(null, null); XElement root = XElement.Parse(xmlPuestoEmpleado); foreach (XElement name in root.Elements("EMPLEADO")) { E_EMPLEADO_PDE em = new E_EMPLEADO_PDE { ID_EMPLEADO = name.Attribute("ID_EMPLEADO").Value, ID_PUESTO = name.Attribute("ID_PUESTO").Value, NB_PUESTO = name.Attribute("NB_PUESTO").Value, NB_EMPLEADO = name.Attribute("NB_EMPLEADO").Value, M_CL_USUARIO = name.Attribute("CL_USUARIO").Value, }; ListaEmpleados.Add(em); } } grdEmpleadosSeleccionados.DataSource = ListaEmpleados; }
protected void Page_Load(object sender, EventArgs e) { AdscripcionesNegocio negocioa = new AdscripcionesNegocio(); string adscripcionVisible = negocioa.SeleccionaAdscripcion().ToString(); if (adscripcionVisible != "No") { vTipoTransaccion = "49"; } else { vTipoTransaccion = "50"; } // vServidor = HttpContext.Current.Request.Url.Authority; // UtilMensajes.MensajeResultadoDB(rnMensaje, "direccion: " + url, E_TIPO_RESPUESTA_DB.WARNING, pCallBackFunction: ""); url = Request.Url.GetLeftPart(UriPartial.Authority) + Page.ResolveUrl("VisorComunicados.aspx"); // urlrel = "~/VisorComunicados.aspx"; //vServidor = Request.Url.GetLeftPart(UriPartial.Authority) + Request.ApplicationPath; vNotificacionAdministrar = new E_OBTIENE_PUESTO_EMPLEADOS(); vIdEmpleado = ContextoUsuario.oUsuario.CL_USUARIO; vClUsuario = ContextoUsuario.oUsuario.CL_USUARIO; vNbPrograma = ContextoUsuario.nbPrograma; ConfiguracionNotificacionNegocio negocio = new ConfiguracionNotificacionNegocio(); Nombre.InnerText = " " + ContextoUsuario.oUsuario.NB_USUARIO; xmlPuestoEmpleado = negocio.ObtienePuestoEmpleado(null, vClUsuario); XElement root = null; XElement vXmlUsuario = null; if (xmlPuestoEmpleado != null) { root = XElement.Parse(xmlPuestoEmpleado); } if (root != null) { vXmlUsuario = root.Elements("EMPLEADO").Where(t => t.Attribute("CL_USUARIO").Value == (vClUsuario != null ? vClUsuario.ToString() : "")).FirstOrDefault(); } if (vXmlUsuario != null) { vEsDeRRHH = true; } else { vEsDeRRHH = false; } if (!IsPostBack) { if (vEsDeRRHH == true) { ModificacionesNotificaciones.Visible = true; pendientes.Visible = true; } else { ModificacionesNotificaciones.Visible = false; pendientes.Visible = false; } } }
protected void grdNotificacionEmpleado_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { ConfiguracionNotificacionNegocio negocio = new ConfiguracionNotificacionNegocio(); List <E_EMPLEADO_PDE> lista = new List <E_EMPLEADO_PDE>(); xmlPuestoEmpleado = negocio.ObtienePuestoEmpleado(null, null); XElement root = XElement.Parse(xmlPuestoEmpleado); foreach (XElement name in root.Elements("EMPLEADO")) { E_EMPLEADO_PDE em = new E_EMPLEADO_PDE { ID_EMPLEADO = name.Attribute("ID_EMPLEADO").Value, ID_PUESTO = name.Attribute("ID_PUESTO").Value, NB_PUESTO = name.Attribute("NB_PUESTO").Value, NB_EMPLEADO = name.Attribute("NB_EMPLEADO").Value }; lista.Add(em); var pue = lista.Where(t => t.ID_PUESTO == "0").FirstOrDefault(); lista.Remove(pue); } grdNotificacionEmpleado.DataSource = lista; }