5dae1d66baeb0b7e5a45d0f943090523d8c1a7f2.svn-base 830 B

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