1234567891011121314151617181920212223242526272829303132333435363738394041 |
- (function() {
- BemsWebApplication.BemsFormulaParameterViewModel = function(data) {
- this.SiteId = ko.observable();
- this.FacilityTypeId = ko.observable();
- this.FacilityCode = ko.observable();
- this.FormulaId = ko.observable();
- this.ParameterId = ko.observable();
- this.ParameterFacilityCode = ko.observable();
- this.ParameterPropertyId = ko.observable();
- if(data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.BemsFormulaParameterViewModel.prototype, {
- toJS: function() {
- return {
- SiteId: this.SiteId(),
- FacilityTypeId: this.FacilityTypeId(),
- FacilityCode: this.FacilityCode(),
- FormulaId: this.FormulaId(),
- ParameterId: this.ParameterId(),
- ParameterFacilityCode: this.ParameterFacilityCode(),
- ParameterPropertyId: this.ParameterPropertyId(),
- };
- },
- fromJS: function(data) {
- if(data) {
- this.SiteId(data.SiteId);
- this.FacilityTypeId(data.FacilityTypeId);
- this.FacilityCode(data.FacilityCode);
- this.FormulaId(data.FormulaId);
- this.ParameterId(data.ParameterId);
- this.ParameterFacilityCode(data.ParameterFacilityCode);
- this.ParameterPropertyId(data.ParameterPropertyId);
- }
- }
- });
- })();
|