--FIX.Validaciones en notificaciones
This commit is contained in:
@@ -152,7 +152,10 @@ Public Class ClsSisNotificaciones
|
||||
#Region "N O T I F I C A C I O N E S"
|
||||
Public Shared Sub EnviarAlerta(Titulo As String, Mensaje As String, CveUsuario As String, Optional Tipo As TipoNotificacion = TipoNotificacion.AlertaVentanaNoOcultar, Optional TimeOut As Integer = 0)
|
||||
Dim hub = GlobalHost.ConnectionManager.GetHubContext(Of Notificaciones)()
|
||||
hub.Clients.Client(Notificaciones.UsuariosConexiones(CveUsuario)).alertaVentana(Titulo, Mensaje, DirectCast(Tipo, Integer), TimeOut)
|
||||
'VERIFICA SI EXISTE LA CONEXION DEL USUARIO
|
||||
If Notificaciones.UsuariosConexiones.Keys.Any(Function(key) key = CveUsuario) Then
|
||||
hub.Clients.Client(Notificaciones.UsuariosConexiones(CveUsuario)).alertaVentana(Titulo, Mensaje, DirectCast(Tipo, Integer), TimeOut)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="SessionesActivas.aspx.vb" Inherits="SessionesActivas" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="SessionesActivas.aspx.vb" Inherits="SessionesActivas" EnableEventValidation="false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -190,7 +190,9 @@ Partial Class SessionesActivas
|
||||
RegistraScript("$(""#DivMensaje"").modal();")
|
||||
End Sub
|
||||
Protected Sub LnkEnviar_Click(sender As Object, e As EventArgs)
|
||||
ClsSisNotificaciones.EnviarAlerta("Aviso", TxtMensaje.Text.Trim(), RCveUsuario, Tipo:=TipoNotificacion.ToastInformacionB)
|
||||
|
||||
Dim mensaje = TxtMensaje.Text.Trim() + "<br/> <a target='_blank' href='https://www.w3schools.com'>Liga</a>"
|
||||
ClsSisNotificaciones.EnviarAlerta("Aviso", mensaje, RCveUsuario, Tipo:=TipoNotificacion.ToastInformacionB)
|
||||
|
||||
RegistraScript($"$(""#DivMensaje"").modal('hide');console.log('{Decripta(Context.User.Identity.Name)}')")
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user