1234567891011121314151617181920212223242526 |
- (function() {
- BemsWebApplication.BemsFuelTypeViewModel = function(data) {
- this.FuelTypeId = ko.observable();
- this.Name = ko.observable();
- if(data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.BemsFuelTypeViewModel.prototype, {
- toJS: function() {
- return {
- FuelTypeId: this.FuelTypeId(),
- Name: this.Name(),
- };
- },
- fromJS: function(data) {
- if(data) {
- this.FuelTypeId(data.FuelTypeId);
- this.Name(data.Name);
- }
- }
- });
- })();
|