3d8d99667445103fa460bcda443746c0bd1820e1.svn-base 603 B

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