123456789101112131415161718192021222324252627282930313233343536373839 |
-
- (function () {
- BemsWebApplication.FmsDailyCheckReportViewModel = function (data) {
- this.SiteId = ko.observable();
- this.DailyCheckReportId = ko.observable();
- this.Name = ko.observable();
- this.Contents = ko.observable();
- this.RegisterUserId = ko.observable();
- this.AddDate = ko.observable();
- if (data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.FmsDailyCheckReportViewModel.prototype, {
- toJS: function () {
- return {
- SiteId: this.SiteId(),
- DailyCheckReportId: this.DailyCheckReportId(),
- Name: this.Name(),
- Contents: this.Contents(),
- RegisterUserId: this.RegisterUserId(),
- AddDate: this.AddDate(),
- };
- },
- fromJS: function (data) {
- if (data) {
- this.SiteId(data.SiteId);
- this.DailyCheckReportId(data.DailyCheckReportId);
- this.Name(data.Name);
- this.Contents(data.Contents);
- this.RegisterUserId(data.RegisterUserId);
- this.AddDate(data.AddDate);
- }
- }
- });
- })();
|