public static List<AdiProduct> GetAllUpdateProducts() { List<AdiProduct> updateAdiProducts = new List<AdiProduct>(); //FinalTableManager finalTableTableAdapter = new FinalTableManager(finalcon); ////finalTableTableAdapter.Connection = finalcon; //var oDataTable = finalTableTableAdapter.GetAllAdiProducts(); List<WebSpider.AdiGlobal.Objects.AdiExport.Final_Table> updateProducts = new List<WebSpider.AdiGlobal.Objects.AdiExport.Final_Table>(); String ConnStr = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Persist Security Info=True", Settings.GetValue("FinalTable")); UpdateFinalTableManager ftManager = new UpdateFinalTableManager(ConnStr); updateProducts = ftManager.GetAllAdiProducts(); updateAdiProducts = updateProducts.Select(x => new AdiProduct() { VendorModel = x.VDR_PART, ProductDescription = x.VDR_IT_DSC, AdiNumber = x.AID_PART, Price = x.AID_COST, SmallImage = x.AID_IMG1, BigImage = x.AID_IMG2, VendorName = x.AID_VENDOR }).ToList(); return updateAdiProducts; }
public static List<WebSpider.AdiGlobal.Objects.AdiExport.Final_Table> GetUpdateProducts() { List<WebSpider.AdiGlobal.Objects.AdiExport.Final_Table> updateProducts = new List<WebSpider.AdiGlobal.Objects.AdiExport.Final_Table>(); String ConnStr = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Persist Security Info=True", Settings.GetValue("FinalTable")); UpdateFinalTableManager ftManager = new UpdateFinalTableManager(ConnStr); updateProducts = ftManager.GetAllAdiProducts(); return updateProducts; }