123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
-
- (function () {
- Partials.ConsumeMonthlyViewModel = function (data) {
- this.SiteId = ko.observable();
- this.BuildingId = ko.observable();
- this.Year = ko.observable();
- this.Month = ko.observable();
- this.Cooler = ko.observable();
- this.Boiler = ko.observable();
- this.Goal = ko.observable();
- this.Product = ko.observable();
- if (data)
- this.fromJS(data);
- };
- $.extend(Partials.ConsumeMonthlyViewModel.prototype, {
- toJS: function () {
- return {
- SiteId: this.SiteId(),
- BuildingId: this.BuildingId(),
- Year: this.Year(),
- Month: this.Month(),
- Day: this.Day(),
- Cooler: this.Cooler(),
- Boiler: this.Boiler(),
- Goal: this.Goal(),
- product: this.Product(),
- };
- },
- fromJS: function (data) {
- if (data) {
- this.SiteId(data.SiteId);
- this.BuildingId(data.BuildingId);
- this.Year(data.Year);
- this.Month(data.Month);
- this.Cooler(data.Cooler);
- this.Boiler(data.Boiler);
- this.Goal(data.Goal);
- this.Product(data.Product);
- }
- }
- });
- })();
|