(function () { BemsWebApplication.BemsControlAHUTempConfigViewModel = function (data) { this.SiteId = ko.observable(); this.FacilityTypeId = ko.observable(); this.FacilityCode = ko.observable(); this.MaxTemperature = ko.observable(); this.MinTemperature = ko.observable(); if (data) this.fromJS(data); }; $.extend(BemsWebApplication.BemsControlAHUTempConfigViewModel.prototype, { toJS: function () { return { SiteId: this.SiteId(), FacilityTypeId: this.FacilityTypeId(), FacilityCode: this.FacilityCode(), MaxTemperature: this.MaxTemperature(), MinTemperature: this.MinTemperature(), }; }, fromJS: function (data) { if (data) { this.SiteId(data.SiteId); this.FacilityTypeId(data.FacilityTypeId); this.FacilityCode(data.FacilityCode); this.MaxTemperature(data.MaxTemperature), this.MinTemperature(data.MinTemperature) } } }); })();