(function() { BemsWebApplication.BemsNoticePriceDetailViewModel = function (data) { this.SiteId = ko.observable(); this.FuelTypeId = ko.observable(); this.ApplyDate = ko.observable(); this.ContractType = ko.observable(); this.DataId = ko.observable(); this.P01 = ko.observable(); this.P02 = ko.observable(); this.P03 = ko.observable(); this.P04 = ko.observable(); this.P05 = ko.observable(); this.P06 = ko.observable(); this.P07 = ko.observable(); this.P08 = ko.observable(); this.P09 = ko.observable(); this.P10 = ko.observable(); this.P11 = ko.observable(); this.P12 = ko.observable(); if(data) this.fromJS(data); }; $.extend(BemsWebApplication.BemsNoticePriceDetailViewModel.prototype, { toJS: function() { return { SiteId: this.SiteId(), FuelTypeId: this.FuelTypeId(), ApplyDate: this.ApplyDate(), ContractType: this.ContractType(), DataId: this.DataId(), P01: this.P01(), P02: this.P02(), P03: this.P03(), P04: this.P04(), P05: this.P05(), P06: this.P06(), P07: this.P07(), P08: this.P08(), P09: this.P09(), P10: this.P10(), P11: this.P11(), P12: this.P12(), }; }, fromJS: function(data) { if(data) { this.SiteId(data.SiteId); this.FuelTypeId(data.FuelTypeId); this.ApplyDate(data.ApplyDate); this.ContractType(data.ContractType); this.DataId(data.DataId); this.P01(data.P01); this.P02(data.P02); this.P03(data.P03); this.P04(data.P04); this.P05(data.P05); this.P06(data.P06); this.P07(data.P07); this.P08(data.P08); this.P09(data.P09); this.P10(data.P10); this.P11(data.P11); this.P12(data.P12); } } }); })();