// // GET: /Product/ public ViewResult Index() { List <Products> prodList = new List <Products> { }; EbayClientClient c = new EbayClientClient(); var cat = c.GetCategoryCount(); var s = from i in cat select i.category_id; string[] cats = s.ToArray(); var result = c.ItemByCategory(cats[1]).ToList(); foreach (tblItem t in result) { Products p = new Products { Id = t.item_id, item_title = t.item_title, gallery_url = t.gallery_url, listing_url = t.listing_url, tblCategory = t.item_category }; prodList.Add(p); } return(View(prodList)); }
public ActionResult Create(string products) { EbayClientClient c = new EbayClientClient(); List<Products> prodList = new List<Products> { }; string s = Request.Form["keyword"]; var result = c.FindByKeyWord(s); foreach (tblItem t in result) { Products p = new Products { Id = t.item_id, item_title = t.item_title, gallery_url = t.gallery_url, listing_url = t.listing_url, tblCategory = t.item_category }; prodList.Add(p); } return View(prodList); }
public ActionResult Create(string products) { EbayClientClient c = new EbayClientClient(); List <Products> prodList = new List <Products> { }; string s = Request.Form["keyword"]; var result = c.FindByKeyWord(s); foreach (tblItem t in result) { Products p = new Products { Id = t.item_id, item_title = t.item_title, gallery_url = t.gallery_url, listing_url = t.listing_url, tblCategory = t.item_category }; prodList.Add(p); } return(View(prodList)); }
// // GET: /Product/ public ViewResult Index() { List<Products> prodList = new List<Products> { }; EbayClientClient c = new EbayClientClient(); var cat = c.GetCategoryCount(); var s = from i in cat select i.category_id; string[] cats = s.ToArray(); var result = c.ItemByCategory(cats[1]).ToList(); foreach (tblItem t in result) { Products p = new Products { Id = t.item_id, item_title = t.item_title, gallery_url = t.gallery_url, listing_url = t.listing_url, tblCategory = t.item_category }; prodList.Add(p); } return View(prodList); }