1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- (function() {
- BemsWebApplication.FmsWorkDailyRecordTemplateViewModel = function(data) {
- this.SiteId = ko.observable();
- this.BusinessFieldId = ko.observable();
- this.TemplateId = ko.observable();
- this.TemplateName = ko.observable();
- this.StartDate = ko.observable();
- this.IsUse = ko.observable();
- this.SortOrderNo = ko.observable();
- this.InsertedDate = ko.observable();
- this.InsertedUserId = ko.observable();
- this.UpdatedDate = ko.observable();
- this.UpdatedUserId = ko.observable();
- if(data)
- this.fromJS(data);
- };
- $.extend(BemsWebApplication.FmsWorkDailyRecordTemplateViewModel.prototype, {
- toJS: function() {
- return {
- SiteId: this.SiteId(),
- BusinessFieldId: this.BusinessFieldId(),
- TemplateId: this.TemplateId(),
- TemplateName: this.TemplateName(),
- StartDate: this.StartDate(),
- IsUse: this.IsUse(),
- SortOrderNo: this.SortOrderNo(),
- InsertedDate: this.InsertedDate(),
- InsertedUserId: this.InsertedUserId(),
- UpdatedDate: this.UpdatedDate(),
- UpdatedUserId: this.UpdatedUserId(),
- };
- },
- fromJS: function(data) {
- if(data) {
- this.SiteId(data.SiteId);
- this.BusinessFieldId(data.BusinessFieldId);
- this.TemplateId(data.TemplateId);
- this.TemplateName(data.TemplateName);
- this.StartDate(data.StartDate);
- this.IsUse(data.IsUse);
- this.SortOrderNo(data.SortOrderNo);
- this.InsertedDate(data.InsertedDate);
- this.InsertedUserId(data.InsertedUserId);
- this.UpdatedDate(data.UpdatedDate);
- this.UpdatedUserId(data.UpdatedUserId);
- }
- }
- });
- })();
|