8b91cf54cbe9fccc9461b3083bf7c79162dad870.svn-base 827 B

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