| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | 
(function() {    BemsWebApplication.FmsMaterialPurchaseOrderMaterialViewModel = function(data) {            this.SiteId = ko.observable();            this.BusinessFieldId = ko.observable();            this.PurchaseOrderId = ko.observable();            this.MaterialId = ko.observable();            this.MaterialCount = ko.observable();            this.UnitCost = ko.observable();            this.StoredCount = ko.observable();            if(data)                this.fromJS(data);    };    $.extend(BemsWebApplication.FmsMaterialPurchaseOrderMaterialViewModel.prototype, {        toJS: function() {            return {                SiteId: this.SiteId(),                BusinessFieldId: this.BusinessFieldId(),                PurchaseOrderId: this.PurchaseOrderId(),                MaterialId: this.MaterialId(),                MaterialCount: this.MaterialCount(),                UnitCost: this.UnitCost(),                StoredCount: this.StoredCount(),                            };        },        fromJS: function(data) {            if(data) {                this.SiteId(data.SiteId);                this.BusinessFieldId(data.BusinessFieldId);                this.PurchaseOrderId(data.PurchaseOrderId);                this.MaterialId(data.MaterialId);                this.MaterialCount(data.MaterialCount);                this.UnitCost(data.UnitCost);                this.StoredCount(data.StoredCount);                            }        }    });})();
 |