Example #1
0
        public ActionResult Index()
        {
            string     asin = "B07Z93JQS6";
            AmazonTest tst  = new AmazonTest();

            //CSObject obj = tst.test("B07MWLD3VX");
            //List <MainASINs> lstmainASINs = dAmazon.getEnabledASINs();

            //foreach (MainASINs mainASINs in lstmainASINs)
            //{
            try
            {
                //currentASIN = mainASINs.ASIN;
                CSObject objCountStock = amzAutomation.test(asin);

                if (objCountStock != null)
                {
                    dAmazon.InsertTrackingRecord(objCountStock);
                }
                //System.Threading.Thread.Sleep(10 * 1000);
            }
            catch (Exception ex)
            {
            }


            return(View());
        }
Example #2
0
        public void TrackASINs(int groupId)
        {
            DAmazon    dAmazon       = new DAmazon();
            AmazonTest amzAutomation = new AmazonTest();

            List <MainASINs> lstmainASINs = dAmazon.getEnabledASINs(groupId);

            foreach (MainASINs mainASINs in lstmainASINs)
            {
                try
                {
                    CSObject objCountStock = amzAutomation.test(mainASINs.ASIN);

                    if (objCountStock != null)
                    {
                        dAmazon.InsertTrackingRecord(objCountStock);
                    }
                }
                catch (Exception ex)
                {
                }
                System.Threading.Thread.Sleep(2 * 60 * 1000); // 1.5 Minute
            }
            GC.Collect();
        }
Example #3
0
        public ActionResult TrackASINs(int groupId)
        {
            List <MainASINs> lstmainASINs = dAmazon.getEnabledASINs(groupId);

            foreach (MainASINs mainASINs in lstmainASINs)
            {
                try
                {
                    CSObject objCountStock = amzAutomation.test(mainASINs.ASIN);

                    if (objCountStock != null)
                    {
                        dAmazon.InsertTrackingRecord(objCountStock);
                    }
                }
                catch (Exception ex)
                {
                }
                System.Threading.Thread.Sleep(2 * 60 * 1000); // 1.5 Minute
            }
            return(View());
        }