(function () { BemsWebApplication.FmsConstructionViewModel = function (data) { this.SiteId = ko.observable(); this.ConstructionId = ko.observable(); this.Name = ko.observable(); this.StartDate = ko.observable(); this.EndDate = ko.observable(); this.PartnerId = ko.observable(); this.ConstructLocation = ko.observable(); this.OwnerShipName = ko.observable(); this.CommitmentMan = ko.observable(); this.OwnerShipPhoneNo = ko.observable(); this.WeldWorkStartTime = ko.observable(); this.WeldWorkEndTime = ko.observable(); this.GasWorkStartTime = ko.observable(); this.GasWorkEndTime = ko.observable(); this.PaintWorkStartTime = ko.observable(); this.PaintWorkEndTime = ko.observable(); this.Comment = ko.observable(); this.ProgressId = ko.observable(); this.AddDate = ko.observable(); this.UpdateDate = ko.observable(); this.ConstructionDetail = ko.observable(); this.InOutStockName = ko.observable(); this.ConstructionTypeId = ko.observable(); this.FileId1 = ko.observable(); this.FileId2= ko.observable(); this.FileId3 = ko.observable(); if (data) this.fromJS(data); }; $.extend(BemsWebApplication.FmsConstructionViewModel.prototype, { toJS: function () { return { SiteId: this.SiteId(), ConstructionId: this.ConstructionId(), Name: this.Name(), StartDate: this.StartDate(), EndDate: this.EndDate(), PartnerId: this.PartnerId(), ConstructLocation: this.ConstructLocation(), OwnerShipName: this.OwnerShipName(), CommitmentMan: this.CommitmentMan(), OwnerShipPhoneNo: this.OwnerShipPhoneNo(), WeldWorkStartTime: this.WeldWorkStartTime(), WeldWorkEndTime: this.WeldWorkEndTime(), GasWorkStartTime: this.GasWorkStartTime(), GasWorkEndTime: this.GasWorkEndTime(), PaintWorkStartTime: this.PaintWorkStartTime(), PaintWorkEndTime: this.PaintWorkEndTime(), Comment: this.Comment(), ProgressId: this.ProgressId(), AddDate: this.AddDate(), UpdateDate: this.UpdateDate(), ConstructionDetail: this.ConstructionDetail(), InOutStockName: this.InOutStockName(), ConstructionTypeId: this.ConstructionTypeId(), FileId1: this.FileId1(), FileId2: this.FileId2(), FileId3: this.FileId3(), }; }, fromJS: function (data) { if (data) { this.SiteId(data.SiteId); this.ConstructionId(data.ConstructionId); this.Name(data.Name); this.StartDate(data.StartDate); this.EndDate(data.EndDate); this.PartnerId(data.PartnerId); this.ConstructLocation(data.ConstructLocation); this.OwnerShipName(data.OwnerShipName); this.CommitmentMan(data.CommitmentMan); this.OwnerShipPhoneNo(data.OwnerShipPhoneNo); this.WeldWorkStartTime(data.WeldWorkStartTime); this.WeldWorkEndTime(data.WeldWorkEndTime); this.GasWorkStartTime(data.GasWorkStartTime); this.GasWorkEndTime(data.GasWorkEndTime); this.PaintWorkStartTime(data.PaintWorkStartTime); this.PaintWorkEndTime(data.PaintWorkEndTime); this.Comment(data.Comment); this.ProgressId(data.ProgressId); this.AddDate(data.AddDate); this.UpdateDate(data.UpdateDate); this.ConstructionDetail(data.ConstructionDetail); this.InOutStockName(data.InOutStockName); this.ConstructionTypeId(data.ConstructionTypeId); this.FileId1(data.FileId1); this.FileId2(data.FileId2); this.FileId3(data.FileId3); } } }); })();