Example #1
0
        private void CargaNotificacionesMensajes()
        {
            UsuarioCompleto        UsuarioCompleto = (UsuarioCompleto)Session["UsuarioCompleto"];
            ConversacionRepository cr = new ConversacionRepository();
            int msjs;

            try
            {
                if (UsuarioCompleto == null)
                {
                    msjs = 0;
                }
                else
                {
                    msjs = cr.MensajesNoLeidos(UsuarioCompleto);

                    if (msjs > 0)
                    {
                        lblNotificaciones.Text    = msjs.ToString();
                        lblNotificaciones.Visible = true;
                    }
                    else
                    {
                        lblNotificaciones.Visible = false;
                    }

                    upNotificaciones.Update();
                }
            }
            catch (Exception)
            {
                Response.Redirect("~/Error.aspx");
            }
        }