예제 #1
0
 private void LoadObjectToForm(Entities.RaoVat.RunnerCrawler runnerCrawler)
 {
     spinId.Value             = runnerCrawler.id;
     spinMaxDeep.Value        = runnerCrawler.max_deep;
     spinMaxItem.Value        = runnerCrawler.max_item;
     spinNumberThread.Value   = runnerCrawler.number_thread;
     spinRecrawler.Value      = runnerCrawler.second_sleep_recrawler;
     ckFindNewItem.Checked    = runnerCrawler.is_find_new;
     ckReloadData.Checked     = runnerCrawler.is_reload_item;
     txtDescription.Text      = runnerCrawler.description;
     txtName.Text             = runnerCrawler.name;
     txtRootLink.Text         = QT.Entities.Common.ConvertToString(runnerCrawler.root_link);
     cboWebSite.SelectedValue = runnerCrawler.website_id;
 }
예제 #2
0
        public FrmCrawlerRaoVat2(int RunnerCrawlerID)
        {
            InitializeComponent();

            this.raovatSqlAdapter = new RaoVatSQLAdapter(new Entities.Data.SqlDb(QT.Entities.Server.ConnectionStringCrawler));
            this.RunnerCrawlerID  = RunnerCrawlerID;
            this.adapterProduct   = new ProductSaleNewAdapter(new Entities.Data.SqlDb(QT.Entities.Server.ConnectionStringCrawler));
            this.RunnerCrawler    = adapterProduct.GetRunnerCrawler(this.RunnerCrawlerID);
            this.Text             = this.RunnerCrawler.name;
            this.websiteRaoVat    = adapterProduct.GetWebSiteRaoVat(this.RunnerCrawler.website_id);
            this.configXPath      = raovatSqlAdapter.GetConfigByID(this.websiteRaoVat.config_id);
            this.mongoDbAdapter   = new MongoDbRaoVat();
            if (configXPath == null)
            {
                this.Close();
            }
        }