e00ec077d3b5946664cc610995c20bc34118bd7e.svn-base 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. (function() {
  2. BemsWebApplication.BemsMonitoringPointToAnlaysisTypeViewModel = function(data) {
  3. this.SiteId = ko.observable();
  4. this.FacilityTypeId = ko.observable();
  5. this.FacilityCode = ko.observable();
  6. this.PropertyId = ko.observable();
  7. this.AnalysisType = ko.observable();
  8. if(data)
  9. this.fromJS(data);
  10. };
  11. $.extend(BemsWebApplication.BemsMonitoringPointToAnlaysisTypeViewModel.prototype, {
  12. toJS: function() {
  13. return {
  14. SiteId: this.SiteId(),
  15. FacilityTypeId: this.FacilityTypeId(),
  16. FacilityCode: this.FacilityCode(),
  17. PropertyId: this.PropertyId(),
  18. AnalysisType: this.AnalysisType(),
  19. };
  20. },
  21. fromJS: function(data) {
  22. if(data) {
  23. this.SiteId(data.SiteId);
  24. this.FacilityTypeId(data.FacilityTypeId);
  25. this.FacilityCode(data.FacilityCode);
  26. this.PropertyId(data.PropertyId);
  27. this.AnalysisType(data.AnalysisType);
  28. }
  29. }
  30. });
  31. })();