コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                vIdEmpleado = 0;

                if (Request.Params["idEmpleado"] != null)
                {
                    SPE_OBTIENE_M_EMPLEADO_Result emp = new SPE_OBTIENE_M_EMPLEADO_Result();
                    vIdEmpleado = int.Parse(Request.Params["idEmpleado"]);
                }

                if (Request.Params["Puestos"] != null)
                {
                    XElement prueba = new XElement("PUESTOS");
                    string[] aux    = Request.Params["Puestos"].ToString().Split(',');

                    foreach (string item in aux)
                    {
                        prueba.Add(new XElement("PUESTO", new XAttribute("ID", item)));
                    }

                    PuestosComparacion = prueba.ToString();
                }
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            vClUsuario  = ContextoUsuario.oUsuario.CL_USUARIO;
            vNbPrograma = ContextoUsuario.nbPrograma;

            if (!Page.IsPostBack)
            {
                vIdEmpleado = 0;

                if (Request.Params["idPlaza"] != null)
                {
                    vIdPlaza = int.Parse(Request.Params["idPlaza"].ToString());
                }

                if (Request.Params["idEmpleado"] != null)
                {
                    vIdEmpleado = int.Parse(Request.Params["idEmpleado"].ToString());
                    SPE_OBTIENE_M_EMPLEADO_Result emp = new SPE_OBTIENE_M_EMPLEADO_Result();

                    EmpleadoNegocio neg = new EmpleadoNegocio();

                    emp = neg.ObtenerEmpleado(ID_EMPLEADO: vIdEmpleado).FirstOrDefault();

                    txtClaveEvaluado.InnerText  = emp.CL_EMPLEADO;
                    txtClavePuesto.InnerText    = emp.CL_PUESTO;
                    txtNombreEvaluado.InnerText = emp.NB_EMPLEADO_COMPLETO;
                    txtNombrePuesto.InnerText   = emp.NB_PUESTO;
                    vIdPuesto = emp.ID_PUESTO;

                    cargarListas();
                }
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                vLstComparacionCompetencias = new List <E_COMPARACION_COMPETENCIA>();
                vLstPromediosPuestos        = new List <E_PROMEDIO_PLAN_VIDA_CARRERA>();

                Negocio.Administracion.PeriodoNegocio neg = new Negocio.Administracion.PeriodoNegocio();
                PlanVidaCarreraNegocio negp = new PlanVidaCarreraNegocio();
                EmpleadoNegocio        nege = new EmpleadoNegocio();

                if (Request.Params["idPeriodo"] != null)
                {
                    SPE_OBTIENE_C_PERIODO_Result per = new SPE_OBTIENE_C_PERIODO_Result();
                    vIdPeriodo = int.Parse(Request.Params["idPeriodo"]);

                    per = neg.Obtener_C_PERIODO(ID_PERIODO: vIdPeriodo).FirstOrDefault();

                    txtPeriodo.InnerText        = per.NB_PERIODO + per.DS_PERIODO;
                    txtTipoEvaluacion.InnerHtml = per.TIPO_EVALUACION;
                }

                if (Request.Params["idEmpleado"] != null)
                {
                    SPE_OBTIENE_M_EMPLEADO_Result emp = new SPE_OBTIENE_M_EMPLEADO_Result();

                    vIdEmpleado = int.Parse(Request.Params["idEmpleado"]);

                    emp = nege.ObtenerEmpleado(ID_EMPLEADO: vIdEmpleado).FirstOrDefault();

                    vIdPuesto = emp.ID_PUESTO;
                    txtClaveEmpleado.InnerText  = emp.CL_EMPLEADO;
                    txtClavePuesto.InnerText    = emp.CL_PUESTO;
                    txtNombreEmpleado.InnerText = emp.NB_EMPLEADO_COMPLETO;
                    txtNombrePuesto.InnerText   = emp.NB_PUESTO;
                }

                if (Request.Params["Puestos"] != null)
                {
                    XElement prueba = new XElement("PUESTOS");

                    string[] aux = Request.Params["Puestos"].ToString().Split(',');

                    foreach (string item in aux)
                    {
                        prueba.Add(new XElement("PUESTO", new XAttribute("ID", item)));
                    }

                    PuestosComparacion = prueba.ToString();

                    List <SPE_OBTIENE_M_PUESTO_Result> listaPuestos = negp.ObtienePuestos(PuestosComparacion);

                    lstPuestos.DataSource     = listaPuestos;
                    lstPuestos.DataValueField = "ID_PUESTO";
                    lstPuestos.DataTextField  = "NB_PUESTO";
                    lstPuestos.DataBind();
                }
            }
        }
コード例 #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();
                }
            }
        }