| 123456789101112131415161718192021222324252627282930313233343536373839 | (function () {    BemsWebApplication.CmPatrolHistoryPosViewModel = function (data) {        this.SiteId = ko.observable();        this.PatrolHistoryId = ko.observable();        this.PosId = ko.observable();        this.PatrolTime = ko.observable();        this.term = ko.observable();        this.resultType = ko.observable();        this.mId = ko.observable();        if (data)            this.fromJS(data);    };    $.extend(BemsWebApplication.CmPatrolHistoryPosViewModel.prototype, {        toJS: function () {            return {                SiteId: this.SiteId(),                PatrolHistoryId: this.PatrolHistoryId(),                PosId: this.PosId(),                PatrolTime: this.PatrolTime(),                resultType: this.resultType(),                mId: this.mId(),                term: this.term(),            };        },        fromJS: function (data) {            if (data) {                this.SiteId(data.SiteId);                this.PatrolHistoryId(data.PatrolHistoryId);                this.PosId(data.PosId);                this.PatrolTime(data.PatrolTime);                this.resultType(data.resultType);                this.mId(data.mId);                this.term(data.term);            }        }    });})();
 |