📅  最后修改于: 2022-03-11 15:03:52.332000             🧑  作者: Mango
function CreateKnockBackViewModel(cust, orders) {
var cvm = {
Id: kb.observable(cust,'Id'),
CompanyName: kb.observable(cust, 'CompanyName'),
FirstName: kb.observable(cust, 'FirstName'),
LastName: kb.observable(cust, 'LastName'),
SalesOrderHeaders: kb.collectionObservable(orders)
}
return cvm;
}