예제 #1
0
        //
        // 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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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));
        }
예제 #4
0
        //
        // 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);
        }