예제 #1
0
 private static void ConnectToDb()
 {
     try
     {
         sqlDb = new Data.SqlDb(QT.Entities.Server.ConnectionString);
     }
     catch (Exception ex)
     {
     }
 }
예제 #2
0
 public LogErrorToDb()
 {
     try
     {
         sqlDb = new Data.SqlDb(QT.Entities.Server.ConnectionStringCrawler);
     }
     catch (Exception ex)
     {
     }
 }
예제 #3
0
 public void SaveError(string code, string url, int configID, string detail)
 {
     try
     {
         if (sqlDb == null)
         {
             sqlDb = new Data.SqlDb(QT.Entities.Server.ConnectionStringCrawler);
         }
         sqlDb.RunQuery("INSERT INTO [dbo].[LogErrorCrawl] ([id],[code],[detail],[configId], [url]) values (@id, @code, @detail, @configid, @url)",
                        System.Data.CommandType.Text, new SqlParameter[] {
             sqlDb.CreateParamteter("id", Guid.NewGuid().ToString(), System.Data.SqlDbType.NVarChar),
             sqlDb.CreateParamteter("code", code, System.Data.SqlDbType.NVarChar),
             sqlDb.CreateParamteter("url", url, System.Data.SqlDbType.NVarChar),
             sqlDb.CreateParamteter("detail", detail, System.Data.SqlDbType.NVarChar),
             sqlDb.CreateParamteter("configid", configID, System.Data.SqlDbType.NVarChar),
         });
     }
     catch (Exception ex)
     {
         log.ErrorFormat("{0}", ex.Message);
     }
 }
예제 #4
0
 public CrawlerProductAdapter(Data.SqlDb sqlDb)
 {
     // TODO: Complete member initialization
     this.sqlDb = sqlDb;
 }
예제 #5
0
 public RaoVatSQLAdapter(QT.Entities.Data.SqlDb sqlDb)
 {
     this.sqlDb = sqlDb;
 }
예제 #6
0
 public PriceLogAdapter(Data.SqlDb sqlDb)
 {
     // TODO: Complete member initialization
     this.sqlDb = sqlDb;
 }