using System;
using AyABL;
//Prueba versionamiento 28/02/2012
public partial class _controlesusuario_cuwMensajeAviso : System.Web.UI.UserControl
{
protected void btnAceptar_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
this.imgAviso.ImageUrl = null;
this.divMensaje.Attributes["class"] = null;
this.lblMensajeAviso.Text = "";
mpeModalconfirmacion.Hide();
}
///
/// muestra un mensaje visual en la ventana
///
///
///
public void showMessage(string p_strMensaje, TiposDeMensajes tipoMensaje)
{
switch (tipoMensaje)
{
case TiposDeMensajes.ERROR:
this.imgAviso.ImageUrl = "~/App_Themes/Basico/Imagenes/Avisos/Critical.png";
this.lblTituloAviso.Text = "Error";
this.divMensaje.Attributes["class"] = "custom error";
break;
case TiposDeMensajes.ALERTA:
this.imgAviso.ImageUrl = "~/App_Themes/Basico/Imagenes/Avisos/Warning.png";
this.lblTituloAviso.Text = "Alerta";
this.divMensaje.Attributes["class"] = "custom alerta";
break;
case TiposDeMensajes.INFORMATIVO:
this.imgAviso.ImageUrl = "~/App_Themes/Basico/Imagenes/Avisos/Info.png";
this.lblTituloAviso.Text = "Información";
this.divMensaje.Attributes["class"] = "custom informacion";
break;
}
this.lblMensajeAviso.Text = p_strMensaje;
mpeModalconfirmacion.Show();
UPMensajeAviso.Update();
}
///
/// muestra un mensaje de error en la ventana
///
///
///
///
public void showError(string p_strMensaje, Exception ex)
{
// si se presento algun error
if (ex != null)
{
AyAEM.ExceptionManagement.Exceptions.AyAException.Publish(ex, p_strMensaje);
this.imgAviso.ImageUrl = "~/App_Themes/Basico/Imagenes/Avisos/Critical.png";
this.lblTituloAviso.Text = "Error";
this.divMensaje.Attributes["class"] = "custom error";
this.lblMensajeAviso.Text = p_strMensaje;
mpeModalconfirmacion.Show();
UPMensajeAviso.Update();
}
}
}