12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- (function() {
- BemsWebApplication.BemsMonitoringPointViewModel = function(data) {
- this.SiteId = ko.observable();
- this.FacilityTypeId = ko.observable();
- this.FacilityCode = ko.observable();
- this.PropertyId = ko.observable();
- this.ValueType = ko.observable();
- this.ServiceTypeId = ko.observable();
- this.FuelTypeId = ko.observable();
-
- this.Name = ko.observable();
- this.Description = ko.observable();
- this.BuildingId = ko.observable();
- this.FloorId = ko.observable();
- this.ZoneId = ko.observable();
-
-
-
- if(data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.BemsMonitoringPointViewModel.prototype, {
- toJS: function() {
- return {
- SiteId: this.SiteId(),
- FacilityTypeId: this.FacilityTypeId(),
- FacilityCode: this.FacilityCode(),
- PropertyId: this.PropertyId(),
- ValueType: this.ValueType(),
- ServiceTypeId: this.ServiceTypeId(),
- FuelTypeId: this.FuelTypeId(),
-
- Name: this.Name(),
- Description: this.Description(),
- BuildingId: this.BuildingId(),
- FloorId: this.FloorId(),
- ZoneId: this.ZoneId(),
-
-
-
- };
- },
- fromJS: function(data) {
- if(data) {
- this.SiteId(data.SiteId);
- this.FacilityTypeId(data.FacilityTypeId);
- this.FacilityCode(data.FacilityCode);
- this.PropertyId(data.PropertyId);
- this.ValueType(data.ValueType);
- this.ServiceTypeId(data.ServiceTypeId);
- this.FuelTypeId(data.FuelTypeId);
-
- this.Name(data.Name);
- this.Description(data.Description);
- this.BuildingId(data.BuildingId);
- this.FloorId(data.FloorId);
- this.ZoneId(data.ZoneId);
-
-
-
- }
- }
- });
- })();
|