b370795e5147b96d224c036ec2794e30468d8cf6.svn-base 759 B

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