Exemplo n.º 1
0
        protected void btnBuscar_Click(object sender, EventArgs e)
        {
            var idCompetencia = Convert.ToInt32(cmbCompetencia.SelectedValue);
            var idCurso       = Convert.ToInt32(cmbCurso.SelectedValue);

            InstructorNegocio nInstructor = new InstructorNegocio();

            if (idCompetencia == 0)
            {
                if (idCurso == 0)
                {
                    grdInstructores.DataSource = nInstructor.ObtieneInstructores(null, null, null);
                }
                else
                {
                    grdInstructores.DataSource = nInstructor.ObtieneInstructores(null, null, idCurso);
                }
            }
            else
            {
                if (idCurso == 0)
                {
                    grdInstructores.DataSource = nInstructor.ObtieneInstructores(null, idCompetencia, null);
                }
                else
                {
                    grdInstructores.DataSource = nInstructor.ObtieneInstructores(null, idCompetencia, idCurso);
                }
            }

            grdInstructores.Rebind();
        }
Exemplo n.º 2
0
        protected void btnEliminar_Click(object sender, EventArgs e)
        {
            InstructorNegocio nInstructor = new InstructorNegocio();

            foreach (GridDataItem item in grdInstructores.SelectedItems)
            {
                E_RESULTADO vResultado = nInstructor.EliminaInstructor(int.Parse(item.GetDataKeyValue("ID_INSTRUCTOR").ToString()), item.GetDataKeyValue("CL_INTRUCTOR").ToString(), vClUsuario, vNbPrograma);
                string      vMensaje   = vResultado.MENSAJE.Where(w => w.CL_IDIOMA.Equals(vClIdioma.ToString())).FirstOrDefault().DS_MENSAJE;

                UtilMensajes.MensajeResultadoDB(RadWindowManager1, vMensaje, vResultado.CL_TIPO_ERROR, pCallBackFunction: "onCloseWindow");
            }
        }
Exemplo n.º 3
0
        protected void grdInstructores_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            InstructorNegocio nInstructor = new InstructorNegocio();

            if (vIdCurso != 0)
            {
                grdInstructores.DataSource = nInstructor.ObtieneInstructores(pXmlCompetencias: vCompetencias, pIdCurso: vIdCurso, pIdEmpresa: vIdEmpresa);
            }
            else
            {
                grdInstructores.DataSource = nInstructor.ObtieneInstructores(pXmlCompetencias: vCompetencias, pIdEmpresa: vIdEmpresa);
            }
        }
Exemplo n.º 4
0
        protected void CargarDatosEmpleado(int pEmpleadoId)
        {
            InstructorNegocio             nEmpleado = new InstructorNegocio();
            SPE_OBTIENE_M_EMPLEADO_Result empleado  = nEmpleado.ObtieneEmpleado(pEmpleadoId).FirstOrDefault();

            if (empleado != null)
            {
                txtClave.Text           = empleado.CL_EMPLEADO;
                txtNombre.Text          = empleado.NB_EMPLEADO;
                txtApellidoPaterno.Text = empleado.NB_APELLIDO_PATERNO;
                txtApellidoMaterno.Text = empleado.NB_APELLIDO_MATERNO;
                txtRFC.Text             = empleado.CL_RFC;
                txtCURP.Text            = empleado.CL_CURP;
                txtCP.Text = empleado.CL_CODIGO_POSTAL;
                // txtPais.Text = empleado.NB_PAIS;
                txtCalle.Text                = empleado.NB_CALLE;
                txtNoexterior.Text           = empleado.NO_EXTERIOR;
                txtNointerior.Text           = empleado.NO_INTERIOR;
                txtFeNacimiento.SelectedDate = empleado.FE_NACIMIENTO;
                txtEmail.Text                = empleado.CL_CORREO_ELECTRONICO;

                if (empleado.CL_ESTADO != null)
                {
                    rlbEstado.Items.Clear();
                    rlbEstado.Items.Add(new RadListBoxItem(empleado.NB_ESTADO, empleado.CL_ESTADO));
                }

                if (empleado.CL_MUNICIPIO != null)
                {
                    rlbMunicipio.Items.Clear();
                    rlbMunicipio.Items.Add(new RadListBoxItem(empleado.NB_MUNICIPIO, empleado.CL_MUNICIPIO));
                }

                if (empleado.CL_COLONIA != null)
                {
                    rlbcolonia.Items.Clear();
                    rlbcolonia.Items.Add(new RadListBoxItem(empleado.NB_COLONIA, empleado.CL_COLONIA));
                }

                if (empleado.XML_TELEFONOS != null)
                {
                    vLstTelefono = XElement.Parse(empleado.XML_TELEFONOS).Elements("TELEFONO").Select(el => new E_TELEFONO
                    {
                        NB_TELEFONO = UtilXML.ValorAtributo <string>(el.Attribute("NO_TELEFONO")),
                        CL_TIPO     = UtilXML.ValorAtributo <string>(el.Attribute("CL_TIPO_TELEFONO")),
                        NB_TIPO     = (vLstTipoTelefono.FirstOrDefault(f => f.NB_VALOR.Equals(UtilXML.ValorAtributo <string>(el.Attribute("CL_TIPO_TELEFONO")))) ?? new E_TIPO_TELEFONO()).NB_TEXTO
                    }).ToList();
                    grdTelefono.Rebind();
                }
            }
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            vClUsuario  = ContextoUsuario.oUsuario.CL_USUARIO;
            vNbPrograma = ContextoUsuario.nbPrograma;
            vIdEmpresa  = ContextoUsuario.oUsuario.ID_EMPRESA;

            if (!Page.IsPostBack)
            {
                InstructorNegocio nCurso = new InstructorNegocio();
                List <SPE_OBTIENE_C_CURSO_Result> cursos = new List <SPE_OBTIENE_C_CURSO_Result>();
                cursos.Add(new SPE_OBTIENE_C_CURSO_Result()
                {
                    ID_CURSO = 0,
                    NB_CURSO = "Todos"
                });

                cursos.AddRange(nCurso.ObtieneCursos(null));
                cmbCurso.DataSource     = cursos;
                cmbCurso.DataTextField  = "NB_CURSO";
                cmbCurso.DataValueField = "ID_CURSO";
                cmbCurso.DataBind();

                InstructorNegocio nCompetencia = new InstructorNegocio();
                List <SPE_OBTIENE_C_COMPETENCIA_Result> competencias = new List <SPE_OBTIENE_C_COMPETENCIA_Result>();
                competencias.Add(new SPE_OBTIENE_C_COMPETENCIA_Result()
                {
                    ID_COMPETENCIA = 0,
                    NB_COMPETENCIA = "Todos"
                });

                competencias.AddRange(nCompetencia.ObtieneCompetencias(null));
                cmbCompetencia.DataSource     = competencias;
                cmbCompetencia.DataTextField  = "NB_COMPETENCIA";
                cmbCompetencia.DataValueField = "ID_COMPETENCIA";
                cmbCompetencia.DataBind();

                SeguridadProcesos();
            }
        }
Exemplo n.º 6
0
        protected void radBtnGuardar_Click(object sender, EventArgs e)
        {
            XElement vXmlCA = GeneralXmlAdicionales();

            E_INSTRUCTOR      VInstructorAgregar = new E_INSTRUCTOR();
            InstructorNegocio nInstructor        = new InstructorNegocio();

            var ptipo = vClOperacion.ToString();

            if (rbInstInterno.Checked)
            {
                VInstructorAgregar.CL_TIPO_INSTRUCTOR = "INTERNO";
            }
            else
            {
                VInstructorAgregar.CL_TIPO_INSTRUCTOR = "EXTERNO";
            }

            VInstructorAgregar.CL_INTRUCTOR        = txtClave.Text;
            VInstructorAgregar.NB_INSTRUCTOR       = txtNombre.Text;
            VInstructorAgregar.NB_APELLIDO_PATERNO = txtApellidoPaterno.Text;
            VInstructorAgregar.NB_APELLIDO_MATERNO = txtApellidoMaterno.Text;
            VInstructorAgregar.NB_VALIDADOR        = txtNombreValIns.Text;
            VInstructorAgregar.CL_RFC  = txtRFC.Text;
            VInstructorAgregar.CL_CURP = txtCURP.Text;
            VInstructorAgregar.CL_STPS = txtRegistro.Text;
            VInstructorAgregar.CL_PAIS = null;
            VInstructorAgregar.NB_PAIS = null;
            foreach (RadListBoxItem item in rlbEstado.Items)
            {
                VInstructorAgregar.CL_ESTADO = item.Value;
                VInstructorAgregar.NB_ESTADO = item.Text;
            }
            foreach (RadListBoxItem item in rlbMunicipio.Items)
            {
                VInstructorAgregar.CL_MUNICIPIO = item.Value;
                VInstructorAgregar.NB_MUNICIPIO = item.Text;
            }
            foreach (RadListBoxItem item in rlbcolonia.Items)
            {
                VInstructorAgregar.CL_COLONIA = item.Value;
                VInstructorAgregar.NB_COLONIA = item.Text;
            }
            VInstructorAgregar.NB_CALLE                 = txtCalle.Text;
            VInstructorAgregar.NO_INTERIOR              = txtNointerior.Text;
            VInstructorAgregar.NO_EXTERIOR              = txtNoexterior.Text;
            VInstructorAgregar.CL_CODIGO_POSTAL         = txtCP.Text;
            VInstructorAgregar.DS_ESCOLARIDAD           = txtEscolaridad.Text;
            VInstructorAgregar.FE_NACIMIENTO            = txtFeNacimiento.SelectedDate;
            VInstructorAgregar.CL_CORREO_ELECTRONICO    = txtEmail.Text;
            VInstructorAgregar.MN_COSTO_HORA            = (decimal?)(txtCostoHora.Value);
            VInstructorAgregar.MN_COSTO_PARTICIPANTE    = (decimal?)txtCostoPart.Value;
            VInstructorAgregar.DS_EVIDENCIA_COMPETENCIA = txtEvidencia.Text;

            XElement vTelefonos = new XElement("TELEFONOS");

            if (vLstTelefono.Count > 0)
            {
                vTelefonos.Add(vLstTelefono.Select(i => new XElement("TELEFONO", new XAttribute("NO_TELEFONO", i.NB_TELEFONO), new XAttribute("CL_TIPO", (i.CL_TIPO == null?string.Empty:i.CL_TIPO)))));
            }


            XElement vCompetencias = new XElement("COMPETENCIAS");

            vCompetencias.Add(vInstructor.LstCompetencias.Select(i => new XElement("COMPETENCIA", new XAttribute("ID_COMPETENCIA", i.ID_COMPETENCIA))));

            XElement vCursos = new XElement("CURSOS");

            vCursos.Add(vLstCurso.Select(i => new XElement("CURSO", new XAttribute("ID_CURSO", i.ID_CURSO))));


            VInstructorAgregar.XML_TELEFONOS = vTelefonos.ToString();
            //VInstructorAgregar.XML_CURSOS = null; vLstCursos
            //VInstructorAgregar.XML_COMPETENCIAS = null; vLstCompetencia

            List <UDTT_ARCHIVO> vLstArchivos = new List <UDTT_ARCHIVO>();

            foreach (E_DOCUMENTO d in vLstDocumentos)
            {
                string vFilePath = Server.MapPath(Path.Combine(ContextoApp.ClRutaArchivosTemporales, d.GetDocumentFileName()));
                if (File.Exists(vFilePath))
                {
                    vLstArchivos.Add(new UDTT_ARCHIVO()
                    {
                        ID_ITEM    = d.ID_ITEM,
                        ID_ARCHIVO = d.ID_ARCHIVO,
                        NB_ARCHIVO = d.NB_DOCUMENTO,
                        FI_ARCHIVO = File.ReadAllBytes(vFilePath)
                    });
                }
            }


            if (!ptipo.Equals("I"))
            {
                VInstructorAgregar.ID_INSTRUCTOR = vInstructorId;
            }
            //Guarda instructor
            E_RESULTADO vResultado = nInstructor.InsertaActualizaInstructor(ptipo, VInstructorAgregar, vCompetencias, vCursos, vLstArchivos, vLstDocumentos, vXmlCA, vClUsuario, vNbPrograma); // usuario: vClUsuario, programa: vNbPrograma, V_C_INSTRUCTOR: VInstructorAgregar, competencias: vCompetencias, cursos: vCursos);
            string      vMensaje   = vResultado.MENSAJE.Where(w => w.CL_IDIOMA.Equals(vClIdioma.ToString())).FirstOrDefault().DS_MENSAJE;

            UtilMensajes.MensajeResultadoDB(rnMensaje, vMensaje, vResultado.CL_TIPO_ERROR);
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            vClUsuario  = ContextoUsuario.oUsuario.CL_USUARIO;
            vNbPrograma = ContextoUsuario.nbPrograma;
            vIdEmpresa  = ContextoUsuario.oUsuario.ID_EMPRESA;

            if (!Page.IsPostBack)
            {
                InstructorNegocio nInstructor = new InstructorNegocio();
                int vInstructorIdQS           = -1;
                vClOperacion              = E_TIPO_OPERACION_DB.I;
                vIdInstructor             = Guid.NewGuid();
                vClRutaArchivosTemporales = Server.MapPath(ContextoApp.ClRutaArchivosTemporales);

                //vLstCompetencia = new List<E_INSTRUCTOR_COMPETENCIA>();
                vLstCurso       = new List <E_INSTRUCTOR_CURSO>();
                vLstTelefono    = new List <E_TELEFONO>();
                vLstDocumentos  = new List <E_DOCUMENTO>();
                vXmlAdicionales = nInstructor.ObtieneCampoAdicionalXml("C_INSTRUCTOR");

                if (ContextoInstructor.oInstructores == null)
                {
                    ContextoInstructor.oInstructores = new List <E_INSTRUCTOR>();
                }

                ContextoInstructor.oInstructores.Add(new E_INSTRUCTOR {
                    ID_ITEM = vIdInstructor
                });

                if (int.TryParse(Request.QueryString["InstructorId"], out vInstructorIdQS))
                {
                    vInstructorId = vInstructorIdQS;
                    vClOperacion  = E_TIPO_OPERACION_DB.A;

                    CargarDatos(vInstructorId);
                    CargarDocumentos();
                }
                else
                {
                    HabilitaCampos(false, true);

                    RadListBoxItem vItmEstado = new RadListBoxItem("No seleccionado", String.Empty);
                    rlbEstado.Items.Add(vItmEstado);

                    RadListBoxItem vItmMunicipio = new RadListBoxItem("No seleccionado", String.Empty);
                    rlbMunicipio.Items.Add(vItmMunicipio);

                    RadListBoxItem vItmColonia = new RadListBoxItem("No seleccionado", String.Empty);
                    rlbcolonia.Items.Add(vItmColonia);

                    grdInstructorCurso.DataSource = vLstCurso;
                    grdInstructorCurso.DataBind();

                    grdInstructorCompetencia.DataSource = vInstructor.LstCompetencias;
                    grdInstructorCompetencia.DataBind();

                    InstructorNegocio nTipoTelefono = new InstructorNegocio();
                    List <SPE_OBTIENE_C_CATALOGO_VALOR_Result> lista = nTipoTelefono.ObtieneTiposTelefono("TELEFONO_TIPOS");

                    vLstTipoTelefono = lista.Select(el => new E_TIPO_TELEFONO
                    {
                        NB_TEXTO = el.NB_CATALOGO_VALOR,
                        NB_VALOR = el.CL_CATALOGO_VALOR
                    }).ToList();

                    cmbIdTipoTelefono.DataSource     = vLstTipoTelefono;
                    cmbIdTipoTelefono.DataTextField  = "NB_TEXTO";
                    cmbIdTipoTelefono.DataValueField = "NB_VALOR";
                    cmbIdTipoTelefono.DataBind();
                }

                SeguridadProcesos();
            }

            DespacharEventos(Request.Params.Get("__EVENTTARGET"), Request.Params.Get("__EVENTARGUMENT"));
        }
Exemplo n.º 8
0
        protected void Page_Init(object sender, EventArgs e)
        {
            InstructorNegocio neg = new InstructorNegocio();

            CrearFormulario(XElement.Parse(neg.ObtieneCampoAdicionalXml("C_INSTRUCTOR")));
        }
Exemplo n.º 9
0
        protected void CargarDatos(int?pInstructorId)
        {
            InstructorNegocio nInstructorCurso = new InstructorNegocio();
            E_INSTRUCTORES    lista            = nInstructorCurso.ObtieneInstructor(pInstructorId).FirstOrDefault();

            rbInstInterno.Checked = lista.CL_TIPO_INSTRUCTOR == "INTERNO";
            rbInstExterno.Checked = lista.CL_TIPO_INSTRUCTOR == "EXTERNO";

            HabilitaCampos(rbInstExterno.Checked, rbInstInterno.Checked);

            txtClave.Text           = lista.CL_INTRUCTOR;
            txtNombre.Text          = lista.NB_INSTRUCTOR;
            txtApellidoPaterno.Text = lista.NB_APELLIDO_PATERNO;
            txtApellidoMaterno.Text = lista.NB_APELLIDO_MATERNO;
            txtNombreValIns.Text    = lista.NB_VALIDADOR;
            txtRFC.Text             = lista.CL_RFC;
            txtCURP.Text            = lista.CL_CURP;
            txtRegistro.Text        = lista.CL_STPS;
            //txtPais.Text = lista.NB_PAIS;
            txtCP.Text                   = lista.CL_CODIGO_POSTAL;
            txtCalle.Text                = lista.NB_CALLE;
            txtNoexterior.Text           = lista.NO_EXTERIOR;
            txtNointerior.Text           = lista.NO_INTERIOR;
            txtEscolaridad.Text          = lista.DS_ESCOLARIDAD;
            txtFeNacimiento.SelectedDate = lista.FE_NACIMIENTO;
            txtEmail.Text                = lista.CL_CORREO_ELECTRONICO;
            txtCostoHora.Value           = (double?)lista.MN_COSTO_HORA;
            txtCostoPart.Value           = (double?)lista.MN_COSTO_PARTICIPANTE;
            txtEvidencia.Text            = lista.DS_EVIDENCIA_COMPETENCIA;

            Telerik.Web.UI.RadListBoxItem vItmEstado = new RadListBoxItem("No seleccionado", String.Empty);
            if (lista.CL_ESTADO != null)
            {
                vItmEstado = new RadListBoxItem(lista.NB_ESTADO, lista.CL_ESTADO);
            }

            rlbEstado.Items.Add(vItmEstado);

            Telerik.Web.UI.RadListBoxItem vItmMunicipio = new RadListBoxItem("No seleccionado", String.Empty);
            if (lista.CL_MUNICIPIO != null)
            {
                vItmMunicipio = new RadListBoxItem(lista.NB_MUNICIPIO, lista.CL_MUNICIPIO);
            }
            rlbMunicipio.Items.Add(vItmMunicipio);

            Telerik.Web.UI.RadListBoxItem vItmColonia = new RadListBoxItem("No seleccionado", String.Empty);
            if (lista.CL_COLONIA != null)
            {
                vItmColonia = new RadListBoxItem(lista.NB_COLONIA, lista.CL_COLONIA);
            }
            rlbcolonia.Items.Add(vItmColonia);

            if (lista.XML_CURSOS != null)
            {
                vLstCurso = XElement.Parse(lista.XML_CURSOS).Elements("CURSO").Select(el => new E_INSTRUCTOR_CURSO
                {
                    ID_INSTRUCTOR_CURSO = UtilXML.ValorAtributo <int>(el.Attribute("ID_INSTRUCTOR_CURSO")),
                    ID_CURSO            = UtilXML.ValorAtributo <int>(el.Attribute("ID_CURSO")),
                    CL_CURSO            = UtilXML.ValorAtributo <string>(el.Attribute("CL_CURSO")),
                    NB_CURSO            = UtilXML.ValorAtributo <string>(el.Attribute("NB_CURSO")),
                }).ToList();
            }

            if (lista.XML_COMPETENCIAS != null)
            {
                vInstructor.LstCompetencias = XElement.Parse(lista.XML_COMPETENCIAS).Elements("COMPETENCIA").Select(el => new E_INSTRUCTOR_COMPETENCIA
                {
                    ID_INSTRUCTOR_COMPETENCIA = UtilXML.ValorAtributo <int>(el.Attribute("ID_INSTRUCTOR_COMPETENCIA")),
                    ID_COMPETENCIA            = UtilXML.ValorAtributo <int>(el.Attribute("ID_COMPETENCIA")),
                    CL_COMPETENCIA            = UtilXML.ValorAtributo <string>(el.Attribute("CL_COMPETENCIA")),
                    NB_COMPETENCIA            = UtilXML.ValorAtributo <string>(el.Attribute("NB_COMPETENCIA")),
                }).ToList();
            }

            CargaTipoTelefono(lista.XML_NO_TELEFONO_TIPOS);

            if (lista.XML_TELEFONOS != null & lista.XML_TELEFONOS != "")
            {
                vLstTelefono = XElement.Parse(lista.XML_TELEFONOS).Elements("TELEFONO").Select(el => new E_TELEFONO
                {
                    NB_TELEFONO = UtilXML.ValorAtributo <string>(el.Attribute("NO_TELEFONO")),
                    CL_TIPO     = UtilXML.ValorAtributo <string>(el.Attribute("CL_TIPO")),
                    NB_TIPO     = (vLstTipoTelefono.FirstOrDefault(f => f.NB_VALOR.Equals(UtilXML.ValorAtributo <string>(el.Attribute("CL_TIPO")))) ?? new E_TIPO_TELEFONO()).NB_TEXTO
                }).ToList();
            }

            vXmlDocumentos = lista.XML_DOCUMENTOS;
            //vXmlAdicionales = lista.XML_PLANTILLA_CAMPOS_ADICIONALES;

            AsignarValoresAdicionales(lista.XML_CAMPOS_ADICIONALES);
        }
Exemplo n.º 10
0
        protected void grdInstructores_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            InstructorNegocio nInstructor = new InstructorNegocio();

            grdInstructores.DataSource = nInstructor.ObtieneInstructores(null, null, null, null, vIdEmpresa);
        }
Exemplo n.º 11
0
        protected void grdInstructores_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "ExpandCollapse")
            {
                GridDataItem i             = (GridDataItem)e.Item;
                int          pInstructorId = int.Parse(i.GetDataKeyValue("ID_INSTRUCTOR").ToString());

                if (!i.Expanded)
                {
                    GridNestedViewItem nestedItem                = (GridNestedViewItem)i.ChildItem;
                    RadGrid            grdCursosInstructor       = (RadGrid)nestedItem.FindControl("grdCursos");
                    RadGrid            grdCompetenciasInstructor = (RadGrid)nestedItem.FindControl("grdCompetencia");
                    RadGrid            grdTelefono               = (RadGrid)nestedItem.FindControl("grdTelefono");
                    //RadTextBox txtEmail = (RadTextBox)nestedItem.FindControl("txtEmail");
                    System.Web.UI.HtmlControls.HtmlGenericControl txtTblEmail = (System.Web.UI.HtmlControls.HtmlGenericControl)nestedItem.FindControl("txtTblEmail");

                    InstructorNegocio nInstructorCurso = new InstructorNegocio();
                    E_INSTRUCTORES    lista            = nInstructorCurso.ObtieneInstructor(pInstructorId).FirstOrDefault();

                    List <E_INSTRUCTOR_CURSO> vLstCurso = new List <E_INSTRUCTOR_CURSO>();
                    if (lista.XML_CURSOS != null & lista.XML_CURSOS != "")
                    {
                        vLstCurso = XElement.Parse(lista.XML_CURSOS).Elements("CURSO").Select(el => new E_INSTRUCTOR_CURSO
                        {
                            ID_INSTRUCTOR_CURSO = UtilXML.ValorAtributo <int>(el.Attribute("ID_INSTRUCTOR_CURSO")),
                            ID_CURSO            = UtilXML.ValorAtributo <int>(el.Attribute("ID_CURSO")),
                            CL_CURSO            = UtilXML.ValorAtributo <string>(el.Attribute("CL_CURSO")),
                            NB_CURSO            = UtilXML.ValorAtributo <string>(el.Attribute("NB_CURSO")),
                        }).ToList();
                    }

                    grdCursosInstructor.DataSource = vLstCurso;
                    grdCursosInstructor.Rebind();

                    List <E_INSTRUCTOR_COMPETENCIA> vLstCompetencia = new List <E_INSTRUCTOR_COMPETENCIA>();
                    if (lista.XML_COMPETENCIAS != null & lista.XML_COMPETENCIAS != "")
                    {
                        vLstCompetencia = XElement.Parse(lista.XML_COMPETENCIAS).Elements("COMPETENCIA").Select(el => new E_INSTRUCTOR_COMPETENCIA
                        {
                            ID_INSTRUCTOR_COMPETENCIA = UtilXML.ValorAtributo <int>(el.Attribute("ID_INSTRUCTOR_COMPETENCIA")),
                            ID_COMPETENCIA            = UtilXML.ValorAtributo <int>(el.Attribute("ID_COMPETENCIA")),
                            CL_COMPETENCIA            = UtilXML.ValorAtributo <string>(el.Attribute("CL_COMPETENCIA")),
                            NB_COMPETENCIA            = UtilXML.ValorAtributo <string>(el.Attribute("NB_COMPETENCIA")),
                        }).ToList();
                    }

                    grdCompetenciasInstructor.DataSource = vLstCompetencia;
                    grdCompetenciasInstructor.Rebind();

                    txtTblEmail.InnerText = lista.CL_CORREO_ELECTRONICO;

                    List <E_TIPO_TELEFONO> vLstTipoTelefono = new List <E_TIPO_TELEFONO>();
                    vLstTipoTelefono = XElement.Parse(lista.XML_NO_TELEFONO_TIPOS).Elements("ITEM").Select(el => new E_TIPO_TELEFONO
                    {
                        NB_TEXTO = UtilXML.ValorAtributo <String>(el.Attribute("NB_TEXTO")),
                        NB_VALOR = UtilXML.ValorAtributo <String>(el.Attribute("NB_VALOR"))
                    }).ToList();

                    List <E_TELEFONO> vLstTelefono = new List <E_TELEFONO>();
                    if (lista.XML_TELEFONOS != null & lista.XML_TELEFONOS != "")
                    {
                        vLstTelefono = XElement.Parse(lista.XML_TELEFONOS).Elements("TELEFONO").Select(el => new E_TELEFONO
                        {
                            NB_TELEFONO = UtilXML.ValorAtributo <string>(el.Attribute("NO_TELEFONO")),
                            CL_TIPO     = UtilXML.ValorAtributo <string>(el.Attribute("CL_TIPO")),
                            NB_TIPO     = (vLstTipoTelefono.FirstOrDefault(f => f.NB_VALOR.Equals(UtilXML.ValorAtributo <string>(el.Attribute("CL_TIPO")))) ?? new E_TIPO_TELEFONO()).NB_TEXTO
                        }).ToList();
                    }

                    grdTelefono.DataSource = vLstTelefono;
                    grdTelefono.Rebind();
                }

                foreach (GridItem item in grdInstructores.MasterTableView.Items)
                {
                    item.Expanded = false;
                }
                e.Item.Expanded = i.Expanded;
            }
        }