//------------------------------------------- public void Cargar_Notificaciones(int cantPendientesDocente, int cantPendientesValidador) { if (cantPendientesDocente == -1 && cantPendientesValidador == -1) { int contadorSolPendProfesor = 0; int contadorSolPenValidador = 0; //------------------- N_Rol nRol = new N_Rol(); E_Rol rolUsuario = nRol.BuscaRolPorId(profesor.IdRol); //---------------------- N_SolicitudSalidas nSolicitudSalidas = new N_SolicitudSalidas(); List <E_SolicitudSalidasJoin> datosListaSolPendientesDocente = nSolicitudSalidas.BuscaSolicitudPendienteProfesor(profesor.IdProfesor); if (datosListaSolPendientesDocente != null) { contadorSolPendProfesor = datosListaSolPendientesDocente.Count; } //-------------------- List <E_SolicitudSalidasJoin> datosListaSolPendientesValidador = nSolicitudSalidas.BuscaSolicitudesPendientesValidador(rolUsuario.DescripcionRol); if (datosListaSolPendientesValidador != null) { contadorSolPenValidador = datosListaSolPendientesValidador.Count; } //------------------------------------------------------ contadorNotificaciones.Text = Convert.ToString(contadorSolPendProfesor + contadorSolPenValidador); } else { contadorNotificaciones.Text = Convert.ToString(cantPendientesDocente + cantPendientesValidador); } }
//-------------------------------------------- protected void btnTryLogin_click(object sender, EventArgs e) { N_Profesor nProfesor = new N_Profesor(); //---------------------- E_Profesor profesor = nProfesor.BuscaProfesorPorCorreo(EmailLogin.Text); if (profesor == null) { msj.Text = "El correo no pertenece a ningun profesor"; } else { N_Rol nRol = new N_Rol(); E_Rol rolUsuario = new E_Rol(); rolUsuario = nRol.BuscaRolPorId(profesor.IdRol); Session["Profesor"] = profesor; Session["Rol"] = rolUsuario.NombreRol; Session["Cargo"] = rolUsuario.DescripcionRol; Server.Transfer("~/VistasUsuario/Inicio.aspx", true); } }