12345678910111213141516171819202122232425262728293031323334353637 |
- (function () {
- BemsWebApplication.BemsEnergyConfigPercentWeek = function (data) {
- this.SiteId = ko.observable();
- this.Year = ko.observable();
- this.Week = ko.observable();
- this.Electricity = ko.observable();
- this.Gas = ko.observable();
- this.Water = ko.observable();
- if (data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.BemsEnergyConfigPercentWeek.prototype, {
- toJS: function () {
- return {
- SiteId: this.SiteId(),
- Year: this.Year(),
- Week: this.Week(),
- Electricity: this.Electricity(),
- Gas: this.Gas(),
- Water: this.Water()
- };
- },
- fromJS: function (data) {
- if (data) {
- this.SiteId(data.SiteId);
- this.Year(data.Year);
- this.Week(data.Week);
- this.Electricity(data.Electricity);
- this.Gas(data.Gas);
- this.Water(data.Water);
- }
- }
- });
- })();
|