Smobiler上海石磨_.NET移动开发平台

标题: 现在发现LoadClientData个不能保存 [打印本页]

作者: vcboy    时间: 2016-7-6 11:00
标题: 现在发现LoadClientData个不能保存
           LoadClientData("Sysuser", UserID);
           LoadClientData("Syspwd", Password);


作者: Lincy.Lin    时间: 2016-7-6 14:16
您可以在LoadClientData加一个回调方法,看看是否可以输出保存数据,如下:
  1. LoadClientData("Sysuser", UserID, (object s, ClientDataCallBackHandlerArgs args) =>
  2. {
  3.         if (string.IsNullOrEmpty(args.ErrorInfo)) {
  4.                 MessageBox.Show(args.Value);
  5.         }
  6. })
复制代码


注:LoadClientData加入回调方法后,后面不能有Redirect方法。


作者: Csharp    时间: 2016-7-8 23:48
Lincy.Lin 发表于 2016-7-6 14:16
您可以在LoadClientData加一个回调方法,看看是否可以输出保存数据,如下:

注:LoadClientData加入回调方 ...

你是指这部份不能有Redirect吧:

{
        if (string.IsNullOrEmpty(args.ErrorInfo)) {
                MessageBox.Show(args.Value);
        }
})
作者: Lincy.Lin    时间: 2016-7-11 09:29
Csharp 发表于 2016-7-8 23:48
你是指这部份不能有Redirect吧:

{

不是的
LoadClientData("Sysuser", UserID, (object s, ClientDataCallBackHandlerArgs args) =>
{
        if (string.IsNullOrEmpty(args.ErrorInfo)) {
                MessageBox.Show(args.Value);
        }
})
是在这段方法结束后,不能有Redirect方法,如果有Redirect方法将不会进入委托事件中:
(object s, ClientDataCallBackHandlerArgs args) =>
{
        if (string.IsNullOrEmpty(args.ErrorInfo)) {
                MessageBox.Show(args.Value);
        }
}




欢迎光临 Smobiler上海石磨_.NET移动开发平台 (https://www.smobiler.cn/) Powered by Discuz! X3.2