Esempio n. 1
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"));
        }
Esempio n. 2
0
        protected void Page_Init(object sender, EventArgs e)
        {
            InstructorNegocio neg = new InstructorNegocio();

            CrearFormulario(XElement.Parse(neg.ObtieneCampoAdicionalXml("C_INSTRUCTOR")));
        }