a7e11992b5f5c5a92427dfd0898eb0b0603180fe.svn-base 877 B

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