12345678910111213141516171819202122232425262728293031323334353637 |
- (function() {
- BemsWebApplication.BemsNoticePriceBaseViewModel = function(data) {
- this.SiteId = ko.observable();
- this.FuelTypeId = ko.observable();
- this.ApplyDate = ko.observable();
- this.ContractType = ko.observable();
- this.PrimaryPrice = ko.observable();
- this.SecondaryPrice = ko.observable();
- if(data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.BemsNoticePriceBaseViewModel.prototype, {
- toJS: function() {
- return {
- SiteId: this.SiteId(),
- FuelTypeId: this.FuelTypeId(),
- ApplyDate: this.ApplyDate(),
- ContractType: this.ContractType(),
- PrimaryPrice: this.PrimaryPrice(),
- SecondaryPrice: this.SecondaryPrice(),
- };
- },
- fromJS: function(data) {
- if(data) {
- this.SiteId(data.SiteId);
- this.FuelTypeId(data.FuelTypeId);
- this.ApplyDate(data.ApplyDate);
- this.ContractType(data.ContractType);
- this.PrimaryPrice(data.PrimaryPrice);
- this.SecondaryPrice(data.SecondaryPrice);
- }
- }
- });
- })();
|