f6c39f2408f87b618ba6452547aee9d0e000ba62.svn-base 962 B

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