var source =
{
contentType : 'application/json',
datatype: "json",
datafields: [{ name: 'id' },
{ name: 'roleId' },
{ name: 'roleDesc' },
{ name: 'rate' },
{ name: 'createdBy' },
{ name: 'createdDate' },
{ name: 'modifiedDate' }
],
id: 'id',
type: "POST",
url: ACTION.GET_ROLE_DETAILS,
root: 'result',
updaterow: function (rowid, rowdata, commit) {
//synchronize with the server - send update command
var data = {};
data.id = rowdata.id;
data.roleId=rowdata.roleId;
data.roleDesc=rowdata.roleDesc;
data.rate=rowdata.rate;
data.createdBy=rowdata.createdBy;
data.createdDate=rowdata.createdDate;
var d = new Date();
d = d.getDate() + "/" + (d.getMonth() +1) + "/" + d.getFullYear();
data.modifiedDate= rowdata.d;
console.log(data);
$.ajax({
contentType : 'application/json',
type: "POST",
dataType: 'json',
url: ACTION.SAVE_ROLE_DETAILS,
data: JSON.stringify(data),
success: function (data, status, xhr) {
// update command is executed.
if (loginGPID == rowdata.uniqueUserId) {
$("#cSpanFirstName").text(rowdata.firstName);
$("#cSpanLastName").text(rowdata.lastName);
}
$.ApplicationGeneralComponent.Notification({
type: APPLICATION.NOTY_TYPE_SUCCESS,
text: $.i18nManager('notify.user.update')
});
commit(true);
},
error: function () {
commit(false);
}
});
}
};
这是我用来获取和存储数据的代码,但我也希望在修改时存储。这在sqlDeveloper中被正确识别为当前日期。但是当我去取回它时,我得到的只是数字" 144792181000"。
我真的不明白为什么会这样做,我们将非常感谢任何帮助!