a5a1188109c3b7b1573b28d47dfa1d5b2587509b.svn-base 881 B

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