在DevExpress XAF中比UserFriendlyException更好的东西 [英] Something better than UserFriendlyException in DevExpress XAF

查看:86
本文介绍了在DevExpress XAF中比UserFriendlyException更好的东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我现在一直苦苦挣扎。场景是我在视图控制器(有时是其他视图)。我想为Web用户显示一条简单的消息,比如Forms中使用的消息框。 DevExpress的所有答案/解决方案都声明使用视图控制器并为您要使用的不同按钮指定消息。然后使用它你每次传递值都会创建typeof。这对我来说是太过分了。 :wtf:



我只想显示一个简单的消息通知,告知在不同的视图和不同的消息中发生的事情(如winforms中的消息框)。 :doh:



我目前正在使用UserFriendlyException。这个问题是(逻辑)否定消息等,这是一个例外。所以它停在那里并打破了代码。 :confused:



任何帮助将不胜感激。 :rolleyes:

解决方案

我自己解决了:doh:



解决方案是使用脚本对于那些想知道...



 WebWindow.CurrentRequestWindow.RegisterClientScript(  ShowAlert @  alert('message here' );); 


Hi there,

I have been struggling with this a while now. The scenario is that I am in a view controllers (and sometimes other views). I want to display a simple message for the web user, like a messagebox used in Forms. All the answers/solutions from DevExpress states to use a view controller and specify the message for the different buttons you want to use. And then using this you create typeof each time passing the value in. This is waaaaaaay overkill for me. :wtf:

I literally just want to display a simple message notification that something happened in different views and with different messages (Like a messagebox in winforms). :doh:

I am currently using UserFriendlyException. The problem with this is (logic) a negative message etc. and it is a EXCEPTION. So it stops right there and breaks out of the code. :confused:

Any help will be appreciated. :rolleyes:

解决方案

I solved it myself :doh:

The solution is to use a script for those wondering...

WebWindow.CurrentRequestWindow.RegisterClientScript("ShowAlert", @"alert('message here');");  


这篇关于在DevExpress XAF中比UserFriendlyException更好的东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆