03e978b2a05a1689cdc4327b8dcf3bd32b272f75.svn-base 792 B

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