Example #1
0
 private void btAllHistory_Click(object sender, EventArgs e)
 {
     UncheckMenu();
     //crawlerAllSanPhamCuToolStripMenuItem.Checked = true;
     _command = Common.ListWebCommand.CrawlerAllSanPhamCu;
     ExcuteCommand(_command, e);
     FileLog.WriteText(_pageIndex.ToString() + "\r\n" + _pageCount.ToString(), "pageIndex.log");
 }
Example #2
0
 private void btRunAllQueue_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     UncheckMenu();
     //crawlerAllQueueToolStripMenuItem.Checked = true;
     _command = Common.ListWebCommand.CrawlerAllQueue;
     ExcuteCommand(_command, e);
     FileLog.WriteText(_pageIndex.ToString() + "\r\n" + _pageCount.ToString(), "pageIndex.log");
 }
Example #3
0
        private void AddNewProductMerchanttoolStripMenuItem_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.AddNewProductMerchant;
            ExcuteCommand(_command, e);
        }
Example #4
0
        private void loadImageToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.LoadImage;
            ExcuteCommand(_command, e);
        }
Example #5
0
 private void addNew(EventArgs e)
 {
     QT.Moduls.Company.DBComTableAdapters.Job_WebsiteConfigLogTableAdapter adtJob = new QT.Moduls.Company.DBComTableAdapters.Job_WebsiteConfigLogTableAdapter();
     adtJob.Connection.ConnectionString = Server.ConnectionString;
     Company.frmAddWeb frm = new Company.frmAddWeb();
     frm.Text = "Thêm mới website";
     if (frm.ShowDialog() == DialogResult.OK)
     {
         TimeSpan timestartup = new TimeSpan(0, 1, 1, 0);
         TimeSpan timeSleep   = new TimeSpan(0, 1, 1, 0);
         Uri      uri         = new Uri(frm.Website);
         String   domain      = uri.Host.ToLower();
         domain = domain.Replace("www.", "");
         Alexa a = new Alexa();
         a = Common.GetRankAlexa(uri.Host);
         try
         {
             this.companyTableAdapter1.Insert(
                 Common.GetIDCompany(domain),
                 "",
                 "",
                 frm.Website,
                 domain,
                 DateTime.Now,
                 "",
                 "",
                 "",
                 "",
                 Common.CompanyStatus.NOTCONFIG,
                 "",
                 a.AlexaRankContries,
                 a.AlexaRank,
                 timestartup,
                 timeSleep,
                 0,
                 0,
                 DateTime.Now,
                 DateTime.Now,
                 30,
                 0,
                 0,
                 0,
                 "",
                 DateTime.Now,
                 0, 0, "", false, 0, DateTime.Now.AddYears(-1), DateTime.Now.AddYears(-1));
             adtJob.Insert(QT.Users.User.UserID, Common.GetIDCompany(domain), "", "", QT.Users.JobNhapLieuStatus.NhapMoi, DateTime.Now);
             LogJobAdapter.SaveLog(JobName.FrmCompany_AddNew, "Thêm mới công ty " + domain, Convert.ToInt64(Common.GetIDCompany(domain)), (int)JobTypeData.Company);
         }
         catch (Exception)
         {
             MessageBox.Show("Website này đã có trong hệ thống");
         }
         _command            = Common.ListWebCommand.ViewProfile;
         GetIDCompanyCurrent = Common.GetIDCompany(domain);
         ExcuteCommand(_command, e);
     }
 }
Example #6
0
        private void viewThongKeLuotClick_Click(object sender, EventArgs e)
        {
            IsExcuteCommand = true;
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.ViewThongKeClick;
            ExcuteCommand(_command, e);
        }
Example #7
0
        private void btnViewProduct1_Click(object sender, EventArgs e)
        {
            IsExcuteCommand = true;
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.ViewProduct1;
            ExcuteCommand(_command, e);
        }
Example #8
0
        private void StatisticsPriceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IsExcuteCommand = true;
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.StatisticsPrice;
            ExcuteCommand(_command, e);
        }
Example #9
0
        //private void crawlerAllQueueToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //    IsExcuteCommand = true;
        //    ToolStripMenuItem tm = (ToolStripMenuItem)sender;
        //    UncheckMenu();
        //    tm.Checked = true;
        //    _command = Common.ListWebCommand.CrawlerAllQueue;
        //    ExcuteCommand(_command, e);
        //    FileLog.WriteText(_pageIndex.ToString() + "\r\n" + _pageCount.ToString(), "pageIndex.log");
        //}
        private void ReLoadToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IsExcuteCommand = true;
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.ReloadManual;
            ExcuteCommand(_command, e);
        }
Example #10
0
        private void updateCategoryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IsExcuteCommand = true;
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.UpdateCategory;
            ExcuteCommand(_command, e);
        }
Example #11
0
        private void btnMapCatAndClassAuto_Click(object sender, EventArgs e)
        {
            IsExcuteCommand = true;
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.MapCatAndClassForCompany;
            ExcuteCommand(_command, e);
        }
Example #12
0
        private void btnPushQueueFindData_Click(object sender, EventArgs e)
        {
            IsExcuteCommand = true;
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.PushToJobCrawler;
            ExcuteCommand(_command, e);
        }
Example #13
0
        private void btnCrawlerInRedis_Click(object sender, EventArgs e)
        {
            IsExcuteCommand = true;
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.CrawlProductInRedis;
            ExcuteCommand(_command, e);
        }
Example #14
0
        private void btnCrawlerByQueue_Click(object sender, EventArgs e)
        {
            IsExcuteCommand = true;
            ToolStripMenuItem tm = (ToolStripMenuItem)sender;

            UncheckMenu();
            tm.Checked = true;
            _command   = Common.ListWebCommand.CrawlerByNewSystem;
            ExcuteCommand(_command, e);
        }