(function() { BemsWebApplication.FmsMaterialExViewModel = function(data) { this.SiteId = ko.observable(); this.BusinessFieldId = ko.observable(); this.MaterialId = ko.observable(); this.MaterialCode = ko.observable(); this.Name = ko.observable(); this.FirstClassId = ko.observable(); this.SecondClassId = ko.observable(); this.ThirdClassId = ko.observable(); this.LocationId = ko.observable(); this.MaterialTypeId = ko.observable(); this.TradeCompanyId = ko.observable(); this.WarehouseId = ko.observable(); this.Rfid = ko.observable(); this.Unit = ko.observable(); this.DurableYears = ko.observable(); this.ReasonableStockCount = ko.observable(); this.Manufacturer = ko.observable(); this.Standard = ko.observable(); this.FinalPrice = ko.observable(); this.ImageFileId = ko.observable(); this.Note = ko.observable(); this.IsDiscontinued = ko.observable(); this.IsUse = ko.observable(); this.FinalStockCount = ko.observable(); this.FinalTotalStockAmount = ko.observable(); this.StockCount = ko.observable(); // hcLee 2016 01 13 Ãß°¡ this.StockAmount = ko.observable(); // hcLee 2016 01 13 Ãß°¡ this.WHouseName = ko.observable(); // hcLee 2016 01 13 Ãß°¡ if(data) this.fromJS(data); }; $.extend(BemsWebApplication.FmsMaterialExViewModel.prototype, { toJS: function() { return { SiteId: this.SiteId(), BusinessFieldId: this.BusinessFieldId(), MaterialId: this.MaterialId(), MaterialCode: this.MaterialCode(), Name: this.Name(), FirstClassId: this.FirstClassId(), SecondClassId: this.SecondClassId(), ThirdClassId: this.ThirdClassId(), LocationId: this.LocationId(), MaterialTypeId: this.MaterialTypeId(), TradeCompanyId: this.TradeCompanyId(), WarehouseId: this.WarehouseId(), Rfid: this.Rfid(), Unit: this.Unit(), DurableYears: this.DurableYears(), ReasonableStockCount: this.ReasonableStockCount(), Manufacturer: this.Manufacturer(), Standard: this.Standard(), FinalPrice: this.FinalPrice(), ImageFileId: this.ImageFileId(), Note: this.Note(), IsDiscontinued: this.IsDiscontinued(), IsUse: this.IsUse(), FinalStockCount: this.FinalStockCount(), FinalTotalStockAmount: this.FinalTotalStockAmount(), StockCount: this.StockCount(), StockAmount: this.StockAmount(), WHouseName: this.WHouseName(), }; }, fromJS: function(data) { if(data) { this.SiteId(data.SiteId); this.BusinessFieldId(data.BusinessFieldId); this.MaterialId(data.MaterialId); this.MaterialCode(data.MaterialCode); this.Name(data.Name); this.FirstClassId(data.FirstClassId); this.SecondClassId(data.SecondClassId); this.ThirdClassId(data.ThirdClassId); this.LocationId(data.LocationId); this.MaterialTypeId(data.MaterialTypeId); this.TradeCompanyId(data.TradeCompanyId); this.WarehouseId(data.WarehouseId); this.Rfid(data.Rfid); this.Unit(data.Unit); this.DurableYears(data.DurableYears); this.ReasonableStockCount(data.ReasonableStockCount); this.Manufacturer(data.Manufacturer); this.Standard(data.Standard); this.FinalPrice(data.FinalPrice); this.ImageFileId(data.ImageFileId); this.Note(data.Note); this.IsDiscontinued(data.IsDiscontinued); this.IsUse(data.IsUse); this.FinalStockCount(data.FinalStockCount); this.FinalTotalStockAmount(data.FinalTotalStockAmount); this.StockCount(data.StockCount); this.StockAmount(data.StockAmount); this.WHouseName(data.WHouseName); } } }); })();