ExtJs Store.save()? [英] ExtJs Store.save()?

查看:92
本文介绍了ExtJs Store.save()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何处理后端数据存储的 save()方法(我的C#代码)?

我需要任何额外的配置设置为商店启用 save()方法?
如果有人可以指出我的方向是正确的,那将是很棒的。

How do I handle the save() method of the data store on the back end.(my C# code)?
Do I need any extra config settings for the store to enable the save() method? If anyone could just point me in the right direction that would be great?

    var writer = new Ext.data.JsonWriter({
    encode: true
});

// create the Data Store
var store = new Ext.data.JsonStore({
    root: 'Data.items',
    idProperty: 'Empid',
    writer: writer,
    fields: ['Empid', 'Firstname', 'Surname', 'Username'],
    proxy: new Ext.data.HttpProxy({
        url: AppRootPath + 'EmployeeDetails/GetSAASUsers',
        method: 'POST'
    })//proxy
});//new Ext.data.JsonStore

我可以配置我的stiore来支持一种保存方法来更新数据库中的记录吗?

Hod do i configure my stiore to support a save method which will update the records in the database?

推荐答案

Ext.data.Store.commitChanges()是一种仅限客户端的方法。它不以任何形式与服务器通信。该方法用于重置存储记录的修改状态并保留其更改(仅限客户端)。

Ext.data.Store.commitChanges() is a client-side-only method. It does not communicate with the server in any form. The method is used to reset the modification status of the store's records and persist their changes (on the client-side only).

Ext.data .Store.save()是实际使用配置的连接与您的服务器端应用程序通话的方法。为了能够提供更多信息,您需要发布一些代码片段。

Ext.data.Store.save() is the method that actually uses the configured connection to talk to your server-side application. To be able to provide more information you'd need to post some code snippets.

这篇关于ExtJs Store.save()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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