12345678910111213141516171819202122232425262728293031 |
- (function () {
- BemsWebApplication.BemsFloorPlanViewModel = function (data) {
- this.SiteId = ko.observable();
- this.FloorId = ko.observable();
- this.Name = ko.observable();
- this.ImageFileId = ko.observable();
- if (data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.BemsFloorPlanViewModel.prototype, {
- toJS: function () {
- return {
- SiteId: this.SiteId(),
- FloorId: this.FloorId(),
- Name: this.Name(),
- ImageFileId: this.ImageFileId(),
- };
- },
- fromJS: function (data) {
- if (data) {
- this.SiteId(data.SiteId);
- this.FloorId(data.FloorId);
- this.Name(data.Name);
- this.ImageFileId(data.ImageFileId);
- }
- }
- });
- })();
|