1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
-
- (function () {
- BemsWebApplication.BemsIceThermalStorageSimulationViewModel = function (data) {
- this.SiteId = ko.observable();
- this.FacilityTypeId = ko.observable();
- this.FacilityCode = ko.observable();
- this.PropertyId = ko.observable();
- this.CreatedDateTime = ko.observable();
- this.TargetDateTime = ko.observable();
- this.SimulationValue = ko.observable();
- this.SimulationCase = ko.observable();
- if (data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.BemsIceThermalStorageSimulationViewModel.prototype, {
- toJS: function () {
- return {
- SiteId: this.SiteId(),
- FacilityTypeId: this.FacilityTypeId(),
- FacilityCode: this.FacilityCode(),
- PropertyId: this.PropertyId(),
- CreatedDateTime: this.CreatedDateTime(),
- TargetDateTime: this.TargetDateTime(),
- SimulationValue: this.SimulationValue(),
- SimulationCase: this.SimulationCase()
- };
- },
- fromJS: function (data) {
- if (data) {
- this.SiteId(data.SiteId);
- this.FacilityTypeId(data.FacilityTypeId);
- this.FacilityCode(data.FacilityCode);
- this.PropertyId(data.PropertyId);
- this.CreatedDateTime(data.CreatedDateTime);
- this.TargetDateTime(data.TargetDateTime);
- this.SimulationValue(data.SimulationValue);
- this.SimulationCase(data.SimulationCase);
- }
- }
- });
- })();
|