12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- (function () {
- BemsWebApplication.BemsFloorStatusViewModel = function (data) {
- this.SiteId = ko.observable();
- this.FloorId = ko.observable();
- this.FloorName = ko.observable();
- this.ImageFileId = ko.observable();
- this.Xvalue = ko.observable();
- this.Yvalue = ko.observable();
- this.ZoneId = ko.observable();
- this.ServiceTypeId = ko.observable();
- this.FacilityTypeId = ko.observable();
- this.FacilityCode = ko.observable();
- this.PropertyId = ko.observable();
- this.FacilityName = ko.observable();
- if (data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.BemsFloorStatusViewModel.prototype, {
- toJS: function () {
- return {
- SiteId: this.SiteId(),
- FloorId: this.FloorId(),
- FloorName: this.FloorName(),
- ImageFileId: this.ImageFileId(),
- Xvalue: this.Xvalue(),
- Yvalue: this.Yvalue(),
- ZoneId: this.ZoneId(),
- ServiceTypeId: this.ServiceTypeId(),
- FacilityTypeId: this.FacilityTypeId(),
- FacilityCode: this.FacilityCode(),
- PropertyId: this.PropertyId(),
- FacilityName: this.FacilityName(),
- };
- },
- fromJS: function (data) {
- if (data) {
- this.SiteId(data.SiteId);
- this.FloorId(data.FloorId);
- this.FloorName(data.FloorName);
- this.ImageFileId(data.ImageFileId);
- this.Xvalue(data.Xvalue);
- this.Yvalue(data.Yvalue);
- this.ZoneId(data.ZoneId);
- this.ServiceTypeId(data.ServiceTypeId);
- this.FacilityTypeId(data.FacilityTypeId);
- this.FacilityCode(data.FacilityCode);
- this.PropertyId(data.PropertyId);
- this.FacilityName(data.FacilityName);
- }
- }
- });
- })();
|