Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Product ReadProductLine(int row)
- {
- var product = new Product();
- var productAdd = new ProductAdditionalData();
- product.ProductAdditionalData = productAdd;
- productAdd.Product = product;
- product.ShouldBeRemoved = TakeCheckBoxValue(row, 0, "keep");
- product.Pid = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(1).ToString();
- product.ProductName = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(2).ToString();
- product.SapProductNumber = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(3).ToString();
- product.ProductDescription = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(4).ToString();
- product.ProductDescriptionLong = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(5).ToString();
- product.Language = GetValue(_languageService, row, 6);
- product.Category = GetValue(_categoryService, row, 7);
- product.CategoryId = product.Category.Id;
- product.Category2 = GetValue(_categoryService, row, 8);
- product.Category2Id = product.Category2?.Id;
- product.Category3 = GetValue(_categoryService, row, 9);
- product.Category3Id = product.Category3?.Id;
- product.ProductAdditionalData.WarrantyDescription = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(10).ToString();
- product.ProductAdditionalData.Modified = TakeDateFromCell(row, 11);
- product.ProductAdditionalData.ModifiedBy = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(12).ToString();
- product.ProductAdditionalData.Created = TakeDateFromCell(row, 13);
- product.ProductAdditionalData.CreatedBy = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(14).ToString();
- product.ProductAdditionalData.ComPortBluetooth = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(15).ToString();
- product.ProductAdditionalData.CpuComplete = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(16).ToString();
- product.ProductAdditionalData.DatasheetLink = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(17).ToString();
- product.ProductAdditionalData.Facette01 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(18).ToString();
- product.ProductAdditionalData.Facette02 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(19).ToString();
- product.ProductAdditionalData.Facette03 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(20).ToString();
- product.ProductAdditionalData.Facette04 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(21).ToString();
- product.ProductAdditionalData.Facette05 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(22).ToString();
- product.ProductAdditionalData.Facette06 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(23).ToString();
- product.ProductAdditionalData.Facette07 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(24).ToString();
- product.ProductAdditionalData.Facette08 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(25).ToString();
- product.ProductAdditionalData.Facette09 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(26).ToString();
- product.ProductAdditionalData.Facette10 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(27).ToString();
- product.ProductAdditionalData.Facette11 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(28).ToString();
- product.ProductAdditionalData.Facette12 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(29).ToString();
- product.ProductAdditionalData.Facette13 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(30).ToString();
- product.ProductAdditionalData.Facette14 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(31).ToString();
- product.ProductAdditionalData.Facette15 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(32).ToString();
- product.ProductAdditionalData.ImageURL1 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(33).ToString();
- product.ProductAdditionalData.ImageURL2 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(34).ToString();
- product.ProductAdditionalData.ImageURL3 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(35).ToString();
- product.ProductAdditionalData.ImageURL4 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(36).ToString();
- product.ProductAdditionalData.ImageURL5 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(37).ToString();
- product.ProductAdditionalData.ImageURL6 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(38).ToString();
- product.ProductAdditionalData.ImageURL7 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(39).ToString();
- product.ProductAdditionalData.ImageURL8 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(40).ToString();
- product.ProductAdditionalData.ImageURL9 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(41).ToString();
- product.ProductAdditionalData.OsDescription = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(42).ToString();
- product.ProductAdditionalData.PowerSupply1 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(43).ToString();
- product.ProductAdditionalData.PowerSupply2 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(44).ToString();
- product.ProductAdditionalData.ProductOverview1 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(45).ToString();
- product.ProductAdditionalData.ProductOverview2 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(46).ToString();
- product.ProductAdditionalData.ProductOverview3 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(47).ToString();
- product.ProductAdditionalData.ProductOverview4 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(48).ToString();
- product.ProductAdditionalData.ReferencedProduct01 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(49).ToString();
- product.ProductAdditionalData.ReferencedProduct02 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(50).ToString();
- product.ProductAdditionalData.ReferencedProduct03 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(51).ToString();
- product.ProductAdditionalData.ReferencedProduct04 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(52).ToString();
- product.ProductAdditionalData.ReferencedProduct05 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(53).ToString();
- product.ProductAdditionalData.ReferencedProduct06 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(54).ToString();
- product.ProductAdditionalData.ReferencedProduct07 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(55).ToString();
- product.ProductAdditionalData.ReferencedProduct08 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(56).ToString();
- product.ProductAdditionalData.ReferencedProduct09 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(57).ToString();
- product.ProductAdditionalData.ReferencedProduct10 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(58).ToString();
- product.ProductAdditionalData.CpuChipset = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(59).ToString();
- product.ProductAdditionalData.Gpu1MemoryDescription = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(60).ToString();
- product.ProductAdditionalData.Gpu2MemoryDescription = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(61).ToString();
- product.ProductAdditionalData.GpuSliCrossfireText = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(62).ToString();
- product.ProductAdditionalData.MemoryComplete = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(63).ToString();
- product.ProductAdditionalData.ScopeOfDelivery = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(64).ToString();
- product.ProductAdditionalData.Colour = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(65).ToString();
- product.ProductAdditionalData.ScreenComplete = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(66).ToString();
- product.ProductAdditionalData.MemoryCardsSlots = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(67).ToString();
- product.ProductAdditionalData.OsCompatible = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(68).ToString();
- product.ProductAdditionalData.SoftwareSalesText = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(69).ToString();
- product.ProductAdditionalData.Usb20Total = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(70).ToString();
- product.ProductAdditionalData.Vga = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(71).ToString();
- product.ProductAdditionalData.KeyFeature1 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(72).ToString();
- product.ProductAdditionalData.KeyFeature2 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(73).ToString();
- product.ProductAdditionalData.KeyFeature3 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(74).ToString();
- product.ProductAdditionalData.ComPortUtms = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(75).ToString();
- product.ProductAdditionalData.InterfaceType4 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(76).ToString();
- product.ProductAdditionalData.MicrophonesIntegrated = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(77).ToString();
- product.ProductAdditionalData.WebCamDescription = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(78).ToString();
- product.ProductAdditionalData.Nic2Type = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(79).ToString();
- product.ProductAdditionalData.OddComplete = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(80).ToString();
- product.ProductAdditionalData.Material = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(81).ToString();
- product.ProductAdditionalData.SmartCardSlots = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(82).ToString();
- product.ProductAdditionalData.ArticleDimensions1 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(83).ToString();
- product.ProductAdditionalData.ArticleWeight = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(84).ToString();
- product.ProductAdditionalData.AudioLineIn = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(85).ToString();
- product.ProductAdditionalData.AudioLineOut = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(86).ToString();
- product.ProductAdditionalData.AudioType = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(87).ToString();
- product.ProductAdditionalData.DockingConnectorForPortReplicator = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(88).ToString();
- product.ProductAdditionalData.Dvi = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(89).ToString();
- product.ProductAdditionalData.ESata = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(90).ToString();
- product.ProductAdditionalData.HddComplete = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(91).ToString();
- product.ProductAdditionalData.Hdmi = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(92).ToString();
- product.ProductAdditionalData.InterfaceType2 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(93).ToString();
- product.ProductAdditionalData.KensingtonLockSupport = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(94).ToString();
- product.ProductAdditionalData.MemoryCapacityTotal = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(95).ToString();
- product.ProductAdditionalData.MemoryTechnology = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(96).ToString();
- product.ProductAdditionalData.ModemType = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(97).ToString();
- product.ProductAdditionalData.ScreenSize = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(98).ToString();
- product.ProductAdditionalData.ScreenSizeIntegrated = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(99).ToString();
- product.ProductAdditionalData.ScreenTypeIntegrated = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(100).ToString();
- product.ProductAdditionalData.SerialRs232 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(101).ToString();
- product.ProductAdditionalData.SimCardSlots = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(102).ToString();
- product.ProductAdditionalData.AwardPicture1 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(103).ToString();
- product.ProductAdditionalData.AwardPicture2 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(104).ToString();
- product.ProductAdditionalData.AwardPicture3 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(105).ToString();
- product.ProductAdditionalData.AwardPicture4 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(106).ToString();
- product.ProductAdditionalData.AwardPicture5 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(107).ToString();
- product.ProductAdditionalData.AwardUrl1 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(108).ToString();
- product.ProductAdditionalData.AwardUrl2 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(109).ToString();
- product.ProductAdditionalData.AwardUrl3 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(110).ToString();
- product.ProductAdditionalData.AwardUrl4 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(111).ToString();
- product.ProductAdditionalData.AwardUrl5 = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(112).ToString();
- product.ProductAdditionalData.ScreenResponseTime = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(113).ToString();
- product.ProductAdditionalData.Nic1Type = _xlWorksheet.GetOrCreateRow(row).GetOrCreateCell(114).ToString();
- product.Id = TakeLongFromCell(row, 115);
- return product;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement