| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 | (function () {    BemsWebApplication.FmsEquipmentViewModel = function (data) {        this.SiteId = ko.observable();        this.EquipmentId = ko.observable();        this.Name = ko.observable();        this.EquipmentTypeId = ko.observable();        this.WarehouseId = ko.observable();        this.Unit = ko.observable();        this.Standard = ko.observable();         this.AddDate = ko.observable();        this.UpdateDate = ko.observable();        this.RegisterUserId = ko.observable();        this.SupplierName = ko.observable();        this.SupplierPhoneNo = ko.observable();        this.ImageFileId = ko.observable();        this.TotalStockCount = ko.observable();        this.CurrentStockCount = ko.observable();                if (data)            this.fromJS(data);    };    $.extend(BemsWebApplication.FmsEquipmentViewModel.prototype, {        toJS: function () {            return {                SiteId: this.SiteId(),                Name: this.Name(),                EquipmentId: this.EquipmentId(),                EquipmentTypeId: this.EquipmentTypeId(),                WarehouseId: this.WarehouseId(),                Unit: this.Unit(),                Standard: this.Standard(),                AddDate: this.AddDate(),                UpdateDate: this.UpdateDate(),                RegisterUserId: this.RegisterUserId(),                SupplierName: this.SupplierName(),                SupplierPhoneNo: this.SupplierPhoneNo(),                ImageFileId: this.ImageFileId(),                TotalStockCount: this.TotalStockCount(),                CurrentStockCount: this.CurrentStockCount(),            };        },        fromJS: function (data) {            if (data) {                this.SiteId(data.SiteId);                this.Name(data.Name);                this.EquipmentId(data.EquipmentId);                this.EquipmentTypeId(data.EquipmentTypeId);                this.WarehouseId(data.WarehouseId);                this.Unit(data.Unit);                this.Standard(data.Standard);                this.AddDate(data.AddDate);                this.UpdateDate(data.UpdateDate);                this.RegisterUserId(data.RegisterUserId);                this.SupplierName(data.SupplierName);                this.SupplierPhoneNo(data.SupplierPhoneNo);                this.ImageFileId(data.ImageFileId);                this.TotalStockCount(data.TotalStockCount);                this.CurrentStockCount(data.CurrentStockCount);            }        }    });})();
 |