Created
November 3, 2011 21:42
-
-
Save phpleo/1337873 to your computer and use it in GitHub Desktop.
Mensajes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Al inicio de la pagina, tiene los elementos html de los mensajes --> | |
<%@ Register TagPrefix="ams" TagName="ucMensajes" Src="~/Common/uc/ucMensajes.ascx" %> | |
<head> | |
<!-- Previo a esto debe estar jquery y jquery UI --> | |
<script src="<%=ResolveUrl("~/Scripts/codemaleon/ns.js") %>" type="text/javascript"></script> | |
<script src="<%=ResolveUrl("~/Scripts/ABT/UI/Mensajes.js") %>" type="text/javascript"></script> | |
</head> | |
<body> | |
<form id="form1" runat="server"> | |
</form> | |
<!-- Agregar la llamada al UC despues de la etiqueta </form> --> | |
<ams:ucMensajes ID="ucMensajes" runat="server" /> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- de momento nada --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' objeto de mensajes, se le tiene que pasar el ME | |
Private oMensajes As New Mensajes(Me) | |
' En el page load pasar los codigos que se necesitan | |
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load | |
oMensajes.Obtener(New Integer() {3, 100, <codigo_n>}) | |
End Sub | |
' para llamarlo, este boton está dentro de un update panel | |
Protected Sub btnModificar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnModificar.Click | |
oMensajes.Notificar(3) | |
End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' aqui solo se pasa uno de los códigos de los mensaje que se indicaron en: oMensajes.Obtener() | |
oMensajes.Notificar(3) | |
' ó | |
' si se suiere pasar una configuracion extra, de momento que los botones llamen a una funcion js que esta en cliente, | |
' se agrega los siguiente | |
oMensajes.Notificar(3, New With { | |
.botones = New With { | |
.ok = "botonOk", // nombre de funcion | |
.si = "botonSi", | |
.no = "botonNo" | |
} | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Para el caso usar una alerta que se haya configurado desde el Page_Load | |
ABT.UI.Mensajes.Notificar(<codigo_mensaje>); | |
// En las configuraciones cualquier parte se puede omitir, como en el caso de los botones | |
// que no siempre son necesarios | |
var configBotonOk = { | |
titulo: 'titulo del mensaje', | |
descripcion: 'contenido del mensaje', | |
botones: { | |
ok: 'funcion_en_cliente' | |
} | |
}; | |
ABT.UI.Mensajes.Informacion(configBotonOk); | |
ABT.UI.Mensajes.Alerta(configBotonOk); | |
ABT.UI.Mensajes.Error(configBotonOk); | |
// para el caso de botones si y no | |
var configBotonSiNo = { | |
titulo: 'titulo del mensaje', | |
descripcion: 'contenido del mensaje', | |
botones: { | |
si: 'funcion_cliente_1', | |
no: 'funcion_cliente_2' | |
} | |
}; | |
ABT.UI.Mensajes.Confirmacion(configBotonSiNo); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [ERP.AMS] | |
GO | |
EXEC [Configuracion].[InsertarDatosMensaje] | |
@CodigoInterno = NULL, | |
@CodigoModulo = NULL, | |
@Titulo = NULL, | |
@Descripcion = NULL, | |
@Tipo = NULL | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment