Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetNoStore();
        LLogin logica = new LLogin();
        UUser  usua   = new UUser();

        try
        {
            usua = logica.logAgregaEstudiante(Session["userId"].ToString());

            ImagenEst.ImageUrl      = Session["foto"].ToString();
            tb_correo.ReadOnly      = usua.BotonTrue;
            tb_contrasenia.ReadOnly = usua.BotonTrue;
            tb_usuario.ReadOnly     = usua.BotonTrue;
            tb_Foto.Visible         = usua.BotonFalse;
            lb_foto.Visible         = usua.BotonFalse;
            Response.Redirect(usua.Url);
        }
        catch
        {
            try
            {
                usua.Session = Session["userId"].ToString();
            }
            catch
            {
                Response.Redirect("~/View/Estudiante/AccesoDenegado.aspx");
            }
        }


        UIdioma  encId      = new UIdioma();
        LMIdioma idioma     = new LMIdioma();
        Int32    FORMULARIO = 25;

        encId = idioma.obtIdioma(FORMULARIO, int.Parse(Session["idioma"].ToString()));

        Page.Title = encId.CompIdioma["Title"].ToString();
        L_EstuTituloConfig.Text  = encId.CompIdioma["L_EstuTituloConfig"].ToString();
        L_EstuConfigUsuario.Text = encId.CompIdioma["L_EstuConfigUsuario"].ToString();
        tb_usuario.Attributes.Add("placeholder", encId.CompIdioma["tb_usuario"].ToString());
        REV_usuario.ErrorMessage = encId.CompIdioma["REV_usuario"].ToString();
        L_EstuConfigContra.Text  = encId.CompIdioma["L_EstuConfigContra"].ToString();
        tb_contrasenia.Attributes.Add(" placeholder", encId.CompIdioma["tb_contrasenia"].ToString());
        REV_contrasenia.ErrorMessage = encId.CompIdioma["REV_contrasenia"].ToString();
        L_EstuConfigCorreo.Text      = encId.CompIdioma["L_EstuConfigCorreo"].ToString();
        tb_correo.Attributes.Add("placeholder", encId.CompIdioma["tb_correo"].ToString());
        REV_correo.ErrorMessage = encId.CompIdioma["REV_correo"].ToString();
        lb_foto.Text            = encId.CompIdioma["lb_foto"].ToString();
        btn_Editar.Text         = encId.CompIdioma["btn_Editar"].ToString();
        btn_Aceptar.Text        = encId.CompIdioma["btn_Aceptar"].ToString();
        btn_cancelar.Text       = encId.CompIdioma["btn_cancelar"].ToString();

        //script_modificado="Datos Modificados con Exito";
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetNoStore();
        LLogin logica = new LLogin();
        UUser  usua   = new UUser();

        try
        {
            usua = logica.logAgregaEstudiante(Session["userId"].ToString());
            int year;
            year = int.Parse(DateTime.Now.ToString("yyyy"));
            year = year - 4;
            CalendarExtender1.EndDate = Convert.ToDateTime("31/12/" + year);
            //fechanac.ReadOnly = usua.BotonTrue;
            Response.Redirect(usua.Url);
        }
        catch
        {
            try
            {
                usua.Session = Session["userId"].ToString();
            }
            catch
            {
                Response.Redirect("~/View/Admin/AccesoDenegado.aspx");
            }
        }

        try
        {
            usua.SUserName = Session["empezar"].ToString();
            MPE_Idioma.Show();
        }
        catch
        {
        }


        UIdioma  encId      = new UIdioma();
        LMIdioma idioma     = new LMIdioma();
        Int32    FORMULARIO = 8;

        encId = idioma.obtIdioma(FORMULARIO, int.Parse(Session["idioma"].ToString()));

        Page.Title = encId.CompIdioma["Title"].ToString();
        L_AdminAgreEstuTitulo.Text = encId.CompIdioma["L_AdminAgreEstuTitulo"].ToString();
        L_AdminAgreEstuNumAcu.Text = encId.CompIdioma["L_AdminAgreEstuNumAcu"].ToString();
        tb_AcudienteId.Attributes.Add("placeholder", encId.CompIdioma["tb_AcudienteId"].ToString());
        btn_buscarAcudiente.Text        = encId.CompIdioma["btn_buscarAcudiente"].ToString();
        L_AdminAgreEstuAcuNombre.Text   = encId.CompIdioma["L_AdminAgreEstuAcuNombre"].ToString();
        L_AdminAgreEstuAcuApellido.Text = encId.CompIdioma["L_AdminAgreEstuAcuApellido"].ToString();
        L_AdminAgreEstuDocumento.Text   = encId.CompIdioma["L_AdminAgreEstuDocumento"].ToString();
        tb_EstudianteId.Attributes.Add("placeholder", encId.CompIdioma["tb_EstudianteId"].ToString());
        REV_EstudianteId.ErrorMessage = encId.CompIdioma["REV_EstudianteId"].ToString();
        L_AdminAgreEstuNombre.Text    = encId.CompIdioma["L_AdminAgreEstuNombre"].ToString();
        tb_EstudianteNombre.Attributes.Add("placeholder", encId.CompIdioma["tb_EstudianteNombre"].ToString());
        REV_EstudianteNombre.ErrorMessage = encId.CompIdioma["REV_EstudianteNombre"].ToString();
        L_AdminAgreEstuApellido.Text      = encId.CompIdioma["L_AdminAgreEstuApellido"].ToString();
        tb_EstudianteApellido.Attributes.Add("placeholder", encId.CompIdioma["tb_EstudianteApellido"].ToString());
        REV_EstudianteApellido.ErrorMessage = encId.CompIdioma["REV_EstudianteApellido"].ToString();
        L_AdminAgreEstuDep.Text             = encId.CompIdioma["L_AdminAgreEstuDep"].ToString();
        L_AdminAgreEstuFoto.Text            = encId.CompIdioma["L_AdminAgreEstuFoto"].ToString();
        L_AdminAgreEstuFechanac.Text        = encId.CompIdioma["L_AdminAgreEstuFechanac"].ToString();
        fechanac.Attributes.Add("placeholder", encId.CompIdioma["fechanac"].ToString());
        L_AdminAgreEstuCorreo.Text = encId.CompIdioma["L_AdminAgreEstuCorreo"].ToString();
        tb_EstudianteCorreo.Attributes.Add("placeholder", encId.CompIdioma["tb_EstudianteCorreo"].ToString());
        REV_EstudianteCorreo.ErrorMessage = encId.CompIdioma["REV_EstudianteCorreo"].ToString();
        L_ADminAgreEstuDir.Text           = encId.CompIdioma["L_ADminAgreEstuDir"].ToString();
        tb_EstudianteDireccion.Attributes.Add("placeholder", encId.CompIdioma["tb_EstudianteDireccion"].ToString());
        REV_EstudianteDireccion.ErrorMessage = encId.CompIdioma["REV_EstudianteDireccion"].ToString();
        L_AdminAgreEstuTel.Text = encId.CompIdioma["L_AdminAgreEstuTel"].ToString();
        tb_EstudianteTelefono.Attributes.Add("placeholder", encId.CompIdioma["tb_EstudianteTelefono"].ToString());
        REV_EstudianteTelefono.ErrorMessage = encId.CompIdioma["REV_EstudianteTelefono"].ToString();
        L_AdminAgreEstuUser.Text            = encId.CompIdioma["L_AdminAgreEstuUser"].ToString();
        tb_EstudianteUsuario.Attributes.Add("placeholder", encId.CompIdioma["tb_EstudianteUsuario"].ToString());
        REV_EstudianteUsuario.ErrorMessage = encId.CompIdioma["REV_EstudianteUsuario"].ToString();
        L_AdminAgreEstuContra.Text         = encId.CompIdioma["L_AdminAgreEstuContra"].ToString();
        tb_EstudianteContrasenia.Attributes.Add(" placeholder", encId.CompIdioma["tb_EstudianteContrasenia"].ToString());
        REV_EstudianteContrasenia.ErrorMessage = encId.CompIdioma["REV_EstudianteContrasenia"].ToString();
        btn_validar.Text           = encId.CompIdioma["btn_validar"].ToString();
        btn_EstudianteAceptar.Text = encId.CompIdioma["btn_EstudianteAceptar"].ToString();
        btn_EstudianteNuevo.Text   = encId.CompIdioma["btn_EstudianteNuevo"].ToString();

        RV_id_estudiante.ErrorMessage       = encId.CompIdioma["RV_id_Acudiente"].ToString();
        RV_ID_Acudiente_Buscar.ErrorMessage = encId.CompIdioma["RV_id_Acudiente"].ToString();

        //agregarEstudiante
        //L_ErrorUsuario_Seleccione.Text="Debe seleccionar una opcion";
        //script_insertado = "Usuario Insertado con Exito";


        //validarUser
        //L_ErrorUser_existe="El Usuario ya existe";
        //L_ErrorUser_disponible="Usuario Disponible";


        //buscarAcudiete
        //L_ErrorAcudiente.Text = "El Acudiente No se encuentra en la base de Datos";
        //script_acudiente_ok="Acudiente Seleccionado";



        //cargarFoto
        //script_error_formato="Solo se admiten imagenes en formato Jpeg o Gif";
        //script_error_foto_repite="Ya existe una imagen en el servidor con ese nombre";
        //script_foto_cargada="El archivo de imagen ha sido cargado";
    }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetNoStore();
        LLogin logica = new LLogin();
        UUser  usua   = new UUser();

        try
        {
            usua = logica.logAgregaEstudiante(Session["userId"].ToString());
            ImagenEst.ImageUrl      = Session["foto"].ToString();
            tb_correo.ReadOnly      = usua.BotonTrue;
            tb_contrasenia.ReadOnly = usua.BotonTrue;
            tb_usuario.ReadOnly     = usua.BotonTrue;
            tb_Foto.Visible         = usua.BotonFalse;
            lb_foto.Visible         = usua.BotonFalse;
            Response.Redirect(usua.Url);
        }
        catch
        {
            try
            {
                usua.Session = Session["userId"].ToString();
            }
            catch
            {
                Response.Redirect("~/View/Admin/AccesoDenegado.aspx");
            }
        }


        try
        {
            usua.SUserName = Session["empezar"].ToString();
            MPE_Idioma.Show();
        }
        catch
        {
        }


        UIdioma  encId      = new UIdioma();
        LMIdioma idioma     = new LMIdioma();
        Int32    FORMULARIO = 12;

        encId = idioma.obtIdioma(FORMULARIO, int.Parse(Session["idioma"].ToString()));

        Page.Title = encId.CompIdioma["Title"].ToString();
        L_AdminConfigTitulo.Text  = encId.CompIdioma["L_AdminConfigTitulo"].ToString();
        L_AdminConfigUsuario.Text = encId.CompIdioma["L_AdminConfigUsuario"].ToString();
        tb_usuario.Attributes.Add("placeholder", encId.CompIdioma["tb_usuario"].ToString());
        REV_usuario.ErrorMessage = encId.CompIdioma["REV_usuario"].ToString();
        L_AdminConfigContra.Text = encId.CompIdioma["L_AdminConfigContra"].ToString();
        tb_contrasenia.Attributes.Add("placeholder", encId.CompIdioma["tb_contrasenia"].ToString());
        REV_contrasenia.ErrorMessage = encId.CompIdioma["REV_contrasenia"].ToString();
        L_AdminConfigCorreo.Text     = encId.CompIdioma["L_AdminConfigCorreo"].ToString();
        tb_correo.Attributes.Add("placeholder", encId.CompIdioma["tb_correo"].ToString());
        REV_correo.ErrorMessage = encId.CompIdioma["REV_correo"].ToString();
        btn_Editar.Text         = encId.CompIdioma["btn_Editar"].ToString();
        btn_Aceptar.Text        = encId.CompIdioma["btn_Aceptar"].ToString();
        btn_cancelar.Text       = encId.CompIdioma["btn_cancelar"].ToString();
        lb_foto.Text            = encId.CompIdioma["lb_foto"].ToString();

        //despues de fucion modificarUsuario -> this.Page.Repose.Write
        //srcipt = "Datos Modificados con Exito";


        //cargarImagen
        //script_error_formato="Solo se admiten imagenes en formato Jpeg o Gif";
        //script_error_foto_repite="Ya existe una imagen en el servidor con ese nombre";
        //script_foto_cargada="El archivo de imagen ha sido cargado";
    }