Example #1
0
        public static MessageResultData Message(string title, string message, MessageTypeEnum messageType)
        {
            MessageResultData result = new MessageResultData();

            result.Message = message;
            result.Title   = title;
            result.TypeInt = messageType;
            return(result);
        }
Example #2
0
        public static MessageResultData Mensagem(Exception ex)
        {
            MessageResultData result = new MessageResultData();

            result.Message = ex.Message;
            if (ex.GetType() == typeof(ArgumentException))
            {
                result.Title   = Constantes.Constantes.ALERTA;
                result.TypeInt = MessageTypeEnum.warning;
            }
            else
            {
                result.Title   = Constantes.Constantes.ERRO;
                result.TypeInt = MessageTypeEnum.danger;
            }
            return(result);
        }