1234567891011121314151617181920212223242526272829303132333435 |
- (function() {
- BemsWebApplication.BemsSitePriceViewModel = function (data) {
- this.SiteId = ko.observable();
- this.FuelTypeId = ko.observable();
- this.PriceTypeId = ko.observable();
- this.PriceCode = ko.observable();
- this.UseYN = ko.observable();
- if(data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.BemsSitePriceViewModel.prototype, {
- toJS: function() {
- return {
- SiteId: this.SiteId(),
- FuelTypeId: this.FuelTypeId(),
- PriceTypeId: this.PriceTypeId(),
- PriceCode: this.PriceCode(),
- UseYN: this.UseYN(),
- };
- },
- fromJS: function(data) {
- if (data) {
- this.SiteId(data.SiteId);
- this.FuelTypeId(data.FuelTypeId);
- this.PriceTypeId(data.PriceTypeId);
- this.PriceCode(data.PriceCode);
- this.UseYN(data.UseYN);
- }
- }
- });
- })();
|