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

        try
        {
            usua = logica.logEditarAcudienteAdmin(Session["userId"].ToString(), Session["documento"].ToString());
            tb_DocenteId.Text              = (string)Session["documento"];
            tb_DocenteNombre.ReadOnly      = usua.BotonTrue;
            tb_DocenteApellido.ReadOnly    = usua.BotonTrue;
            tb_DocenteCorreo.ReadOnly      = usua.BotonTrue;
            tb_DocenteDireccion.ReadOnly   = usua.BotonTrue;
            tb_DocenteTelefono.ReadOnly    = usua.BotonTrue;
            tb_DocenteUsuario.ReadOnly     = usua.BotonTrue;
            tb_DocenteContrasenia.ReadOnly = usua.BotonTrue;
        }
        catch
        {
            try
            {
                usua.Session = Session["userId"].ToString();
            }
            catch
            {
                Response.Redirect("~/View/Admin/AccesoDenegado.aspx");
            }
        }


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

        //<asp:Label ID="" runat="server"></asp:Label>
        encId = idioma.obtIdioma(FORMULARIO, int.Parse(Session["idioma"].ToString()));

        Page.Title = encId.CompIdioma["Title"].ToString();
        L_AdminEditProTitulo.Text    = encId.CompIdioma["L_AdminEditProTitulo"].ToString();
        L_AdminEditProDocumento.Text = encId.CompIdioma["L_AdminEditProDocumento"].ToString();
        tb_DocenteId.Attributes.Add("placeholder", encId.CompIdioma["tb_DocenteId"].ToString());
        REV_DocenteId.ErrorMessage = encId.CompIdioma["REV_DocenteId"].ToString();
        L_AdminEditProNombre.Text  = encId.CompIdioma["L_AdminEditProNombre"].ToString();
        tb_DocenteNombre.Attributes.Add("placeholder", encId.CompIdioma["tb_DocenteNombre"].ToString());
        REV_DocenteNombre.ErrorMessage = encId.CompIdioma["REV_DocenteNombre"].ToString();
        L_AdminEditProApellido.Text    = encId.CompIdioma["L_AdminEditProApellido"].ToString();
        tb_DocenteApellido.Attributes.Add("placeholder", encId.CompIdioma["tb_DocenteApellido"].ToString());
        REV_DocenteApellido.ErrorMessage = encId.CompIdioma["REV_DocenteApellido"].ToString();
        L_AdminEditProDep.Text           = encId.CompIdioma["L_AdminEditProDep"].ToString();
        L_AdminEditProFoto.Text          = encId.CompIdioma["L_AdminEditProFoto"].ToString();
        L_AdminEditProFechanac.Text      = encId.CompIdioma["L_AdminEditProFechanac"].ToString();
        fechanac.Attributes.Add("placeholder", encId.CompIdioma["fechanac"].ToString());
        L_AdminEditProCorreo.Text = encId.CompIdioma["L_AdminEditProCorreo"].ToString();
        tb_DocenteCorreo.Attributes.Add("placeholder", encId.CompIdioma["tb_DocenteCorreo"].ToString());
        REV_DocenteCorreo.ErrorMessage = encId.CompIdioma["REV_DocenteCorreo"].ToString();
        L_ADminEditProDir.Text         = encId.CompIdioma["L_ADminEditProDir"].ToString();
        tb_DocenteDireccion.Attributes.Add("placeholder", encId.CompIdioma["tb_DocenteDireccion"].ToString());
        REV_DocenteDireccion.ErrorMessage = encId.CompIdioma["REV_DocenteDireccion"].ToString();
        L_AdminEditProTel.Text            = encId.CompIdioma["L_AdminEditProTel"].ToString();
        tb_DocenteTelefono.Attributes.Add("placeholder", encId.CompIdioma["tb_DocenteTelefono"].ToString());
        REV_DocenteTelefono.ErrorMessage = encId.CompIdioma["REV_DocenteTelefono"].ToString();
        L_AdminEditProUser.Text          = encId.CompIdioma["L_AdminEditProUser"].ToString();
        tb_DocenteUsuario.Attributes.Add("placeholder", encId.CompIdioma["tb_DocenteUsuario"].ToString());
        REV_DocenteUsuario.ErrorMessage = encId.CompIdioma["REV_DocenteUsuario"].ToString();
        L_AdminEditProContra.Text       = encId.CompIdioma["L_AdminEditProContra"].ToString();
        tb_DocenteContrasenia.Attributes.Add(" placeholder", encId.CompIdioma["tb_DocenteContrasenia"].ToString());
        REV_DocenteContrasenia.ErrorMessage = encId.CompIdioma["REV_DocenteContrasenia"].ToString();
        btn_DocenteAceptar.Text             = encId.CompIdioma["btn_DocenteAceptar"].ToString();
        btn_DocenteEditar.Text = encId.CompIdioma["btn_DocenteEditar"].ToString();
        btn_DocenteNuevo.Text  = encId.CompIdioma["btn_DocenteNuevo"].ToString();


        //editarBuscarUser
        //L_ErrorAdmin.Text_sin_registro = "Sin Registros";


        //editarAdmin
        //L_ErrorAdmin.Text_sin_selecionar = "Debe seleccionar una opcion";
        //script_foto = "Usuario Editado con Exito";
        //script_foto_null Usuario = "Editado con Exito";


        //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";



        //DDL_Estado
        //item1="Activo";
        //item2="Inactivo";
        if (IsPostBack == false)
        {
            DDL_Estado.Items.Clear();
            DDL_Estado.Items.Add(encId.CompIdioma["DDL_Estado"].ToString());
            DDL_Estado.Items.Add(encId.CompIdioma["DDL_Estado2"].ToString());
        }
    }