VS 2013 RC-解决方案升级后,saveChanges()无法正常工作 [英] VS 2013 RC - saveChanges() not working after solution upgraded

查看:59
本文介绍了VS 2013 RC-解决方案升级后,saveChanges()无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Visual Studio 2012.3 LightSwitch解决方案升级到Visual Studio 2013 RC,并且在调试时,saveChanges()失败并显示以下消息:

I upgraded my Visual Studio 2012.3 LightSwitch solution to Visual Studio 2013 RC and when I debug, saveChanges() fails with the following message:

"您正在编辑的数据已由另一笔交易更新.请刷新页面,然后重试."

"The data you are editing has been updated by another transaction. Please refresh the page and try again."

更多详细信息:我有一个弹出窗口,当我选择一个值时,此dataBind触发.我只需要将选定的项目插入屏幕的选定项目的属性中即可.代码如下:

Some more details: I have a popup and when I select a value, this dataBind triggers. I just need the selected item to be inserted on a property of the screen's selected item. Code is as follows:

screen.findContentItem("FuncoesUtilizadorActual")
        .dataBind("value.selectedItem", function (newValue) {
            if (newValue !== undefined && newValue !== null) {
                screen.T_SYS_ConfiguracoesColaboradoresSet.selectedItem.T_SYS_Funcao = newValue;
                myapp.activeDataWorkspace.CyberProjData.saveChanges().then(function (ok) {
                    screen.Q_SYS_MeusProcessos.load();
                }, function (error) {
                    var errorMessage = error[0].message;
                });
                screen.closePopup();
            }
        });

它正在VS 2012.3.这是VS 2013 RC的已知问题吗?有解决方法吗?

It was working on VS 2012.3. Is this a known issue of VS 2013 RC? Is there a workaround?

推荐答案

我最终创建了一个HTTP处理程序(.ashx),用于在服务器上进行更改,然后刷新屏幕客户端上的数据.它可以工作,但是我认为这是不必要的解决方法,因为它可以在Visual Studio 2012上工作.
I ended up creating an HTTP Handler (.ashx) for making the changes on the server and then just refreshing the screen data on the client side. It works, but I think it's an unnecessary workaround, as this was working on Visual Studio 2012.


这篇关于VS 2013 RC-解决方案升级后,saveChanges()无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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