(function () { BemsWebApplication.BemsAlarmLogViewModel = function (data) { this.SiteId = ko.observable(); this.FacilityTypeId = ko.observable(); this.FacilityCode = ko.observable(); this.PropertyId = ko.observable(); this.FormulaId = ko.observable(); this.CreatedDateTime = ko.observable(); this.CurrentValue = ko.observable(); this.SMSResult = ko.observable(); this.EmailResult = ko.observable(); this.Conform = ko.observable(); if (data) this.fromJS(data); }; $.extend(BemsWebApplication.BemsAlarmLogViewModel.prototype, { toJS: function () { return { SiteId: this.SiteId(), FacilityTypeId: this.FacilityTypeId(), FacilityCode: this.FacilityCode(), PropertyId: this.PropertyId(), FormulaId: this.FormulaId(), CreatedDateTime: this.CreatedDateTime(), CurrentValue: this.CurrentValue(), SMSResult: this.SMSResult(), EmailResult: this.EmailResult(), Conform: this.Conform(), }; }, fromJS: function (data) { if (data) { this.SiteId(data.SiteId); this.FacilityTypeId(data.FacilityTypeId); this.FacilityCode(data.FacilityCode); this.PropertyId(data.PropertyId); this.FormulaId(data.FormulaId); this.CreatedDateTime(data.CreatedDateTime); this.CurrentValue(data.CurrentValue); this.SMSResult(data.SMSResult); this.EmailResult(data.EmailResult); this.Conform(data.Conform); } } }); })();