fc2efd0a2d5093205441dc08a28896a246db612d.svn-base 804 B

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