f9404600b233f05f78b42fc2552a9fe6ccaf22ce.svn-base 774 B

1234567891011121314151617181920212223242526272829
  1. (function() {
  2. BemsWebApplication.BemsFormulaTableValueViewModel = function(data) {
  3. this.TableId = ko.observable();
  4. this.XValue = ko.observable();
  5. this.YValue = ko.observable();
  6. if(data)
  7. this.fromJS(data);
  8. };
  9. $.extend(BemsWebApplication.BemsFormulaTableValueViewModel.prototype, {
  10. toJS: function() {
  11. return {
  12. TableId: this.TableId(),
  13. XValue: this.XValue(),
  14. YValue: this.YValue(),
  15. };
  16. },
  17. fromJS: function(data) {
  18. if(data) {
  19. this.TableId(data.TableId);
  20. this.XValue(data.XValue);
  21. this.YValue(data.YValue);
  22. }
  23. }
  24. });
  25. })();